MCPcopy Create free account
hub / github.com/KhronosGroup/OpenCOLLADA / addMatrixParameter

Method addMatrixParameter

COLLADAStreamWriter/src/COLLADASWTechnique.cpp:280–294  ·  view source on GitHub ↗

---------------------------------------------------------------

Source from the content-addressed store, hash-verified

278
279 //---------------------------------------------------------------
280 void Technique::addMatrixParameter(const String &paramName, const double matrix[][4], const String &sid, const String &type, const String& tagName) const
281 {
282 mSW->openElement(tagName == "" ? paramName : tagName);
283 if (!sid.empty())
284 mSW->appendAttribute(CSWC::CSW_ATTRIBUTE_SID, sid);
285 else if (!paramName.empty())
286 mSW->appendAttribute(CSWC::CSW_ATTRIBUTE_SID, paramName);
287 if (!type.empty())
288 mSW->appendAttribute(CSWC::CSW_ATTRIBUTE_TYPE, type);
289 mSW->appendValues(matrix[0][0], matrix[0][1], matrix[0][2], matrix[0][3]);
290 mSW->appendValues(matrix[1][0], matrix[1][1], matrix[1][2], matrix[1][3]);
291 mSW->appendValues(matrix[2][0], matrix[2][1], matrix[2][2], matrix[2][3]);
292 mSW->appendValues(matrix[3][0], matrix[3][1], matrix[3][2], matrix[3][3]);
293 mSW->closeElement();
294 }
295
296 //---------------------------------------------------------------
297 void Technique::closeTechnique()

Callers

nothing calls this directly

Calls 5

openElementMethod · 0.80
emptyMethod · 0.45
appendAttributeMethod · 0.45
appendValuesMethod · 0.45
closeElementMethod · 0.45

Tested by

no test coverage detected