MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / loadModel

Method loadModel

radiantcore/model/NullModelLoader.h:36–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34 }
35
36 scene::INodePtr loadModel(const std::string& modelName) override
37 {
38 // Initialise the paths, this is all needed for realisation
39 std::string path = rootPath(modelName);
40 std::string name = os::getRelativePath(modelName, path);
41
42 // Try to load the model from the given VFS path
43 NullModelPtr model =
44 std::static_pointer_cast<NullModel>(loadModelFromPath(name));
45
46 model->setModelPath(modelName);
47 model->setFilename(name);
48
49 // Construct a NullModelNode using this resource
50 return std::make_shared<NullModelNode>(model);
51 }
52
53 // Required function, not implemented.
54 IModelPtr loadModelFromPath(const std::string& name) override

Callers

nothing calls this directly

Calls 4

getRelativePathFunction · 0.85
rootPathFunction · 0.70
setModelPathMethod · 0.45
setFilenameMethod · 0.45

Tested by

no test coverage detected