MCPcopy Create free account
hub / github.com/carbonengine/trinity / Initialize

Method Initialize

trinity/Tr2InstancedMesh.cpp:60–72  ·  view source on GitHub ↗

-------------------------------------------------------------------------------------- Description: Implements IInitialize interface. Starts loading instance geometry resource if mesh has non-empty path and loading is not deferred. Also initializes Tr2Mesh. Return Value: true If initialization is successfull false Otherwise --------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

58// false Otherwise
59// --------------------------------------------------------------------------------------
60bool Tr2InstancedMesh::Initialize()
61{
62 if( !m_deferGeometryLoad )
63 {
64 if( !m_instanceGeometryResPath.empty() )
65 {
66 TriGeometryResPtr res;
67 BeResMan->GetResource( m_instanceGeometryResPath.c_str(), "", res );
68 m_loadedGeometryResource = res;
69 }
70 }
71 return Tr2Mesh::Initialize();
72}
73
74// --------------------------------------------------------------------------------------
75// Description:

Callers

nothing calls this directly

Calls 3

emptyMethod · 0.80
InitializeFunction · 0.50
GetResourceMethod · 0.45

Tested by

no test coverage detected