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

Method setNodeProperties

COLLADAMax/src/COLLADAMaxSceneGraphCreator.cpp:40–59  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

38
39 //------------------------------
40 void SceneGraphCreator::setNodeProperties( const COLLADAFW::Node* node, ImpNode* importNode )
41 {
42 const String& newNodeName = node->getName();
43 if ( !newNodeName.empty() )
44 {
45#ifdef UNICODE
46 WideString wideNodeName = COLLADABU::StringUtils::toWideString(newNodeName.c_str());
47 importNode->SetName(wideNodeName.c_str());
48#else
49 importNode->SetName(newNodeName.c_str());
50#endif
51 }
52
53 // set transform. we always do this. If there is an animation, the controller will be changed
54 COLLADABU::Math::Matrix4 transformationMatrix;
55 node->getTransformationMatrix(transformationMatrix);
56 Matrix3 maxTransformationMatrix;
57 Matrix4ToMaxMatrix3(maxTransformationMatrix, transformationMatrix);
58 importNode->SetTransform(0, maxTransformationMatrix);
59 }
60
61 //------------------------------
62 bool SceneGraphCreator::create()

Callers

nothing calls this directly

Calls 4

c_strMethod · 0.80
getNameMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected