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

Method FindModelType

Rtxpt/SampleGame/GameScene.cpp:85–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83// }
84
85std::shared_ptr<game::ModelType> GameScene::FindModelType(const std::string& modelTypeName)
86{
87 if (modelTypeName == "")
88 return nullptr;
89 auto it = std::find_if(m_modelTypes.begin(), m_modelTypes.end(), [ &modelTypeName ](const std::shared_ptr<game::ModelType>& pt) { return pt->GetModelName() == modelTypeName; });
90 if (it == m_modelTypes.end())
91 return nullptr;
92 return *it;
93}
94
95std::shared_ptr<game::PropBase> GameScene::CreatePropFromFile(const std::string& name, const std::filesystem::path& storagePath, const Json::Value& jsonRoot)
96{

Callers 1

LoadMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected