MCPcopy Create free account
hub / github.com/NVIDIA-RTX/RTXPT / ModelInstance

Method ModelInstance

Rtxpt/SampleGame/GameModel.cpp:152–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150}
151
152ModelInstance::ModelInstance( const std::string & name, const std::shared_ptr<ModelType> & modelType, const std::shared_ptr<donut::engine::SceneGraphNode> & parentNode )
153 : m_modelType(modelType)
154{
155 assert( modelType != nullptr );
156 const std::shared_ptr<class ExtendedScene> & scene = modelType->GetGame().GetScene();
157 m_node = std::make_shared<SceneGraphNode>();
158
159 m_node = scene->GetSceneGraph()->Attach(parentNode, m_node);
160 m_node->SetName(name);
161
162 scene->GetSceneGraph()->Attach(m_node, modelType->GetNode()); // each model type has its own root node
163
164 MapLightControllers( m_node.get() );
165}
166
167void ModelInstance::MapLightControllers( SceneGraphNode* node )
168{

Callers

nothing calls this directly

Calls 1

GetSceneMethod · 0.80

Tested by

no test coverage detected