MCPcopy Create free account
hub / github.com/ValveSoftware/steam-audio / createStaticMesh

Method createStaticMesh

core/src/core/api_scene.cpp:130–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128}
129
130IPLerror CScene::createStaticMesh(IPLStaticMeshSettings* settings,
131 IStaticMesh** staticMesh)
132{
133 if (!settings || !staticMesh)
134 return IPL_STATUS_FAILURE;
135
136 if (settings->numVertices <= 0 || settings->numTriangles <= 0 || settings->numMaterials <= 0)
137 return IPL_STATUS_FAILURE;
138
139 try
140 {
141 auto _staticMesh = reinterpret_cast<CStaticMesh*>(gMemory().allocate(sizeof(CStaticMesh), Memory::kDefaultAlignment));
142 new (_staticMesh) CStaticMesh(this, settings);
143 *staticMesh = _staticMesh;
144 }
145 catch (Exception exception)
146 {
147 return static_cast<IPLerror>(exception.status());
148 }
149
150 return IPL_STATUS_SUCCESS;
151}
152
153IPLerror CScene::loadStaticMesh(ISerializedObject* serializedObject,
154 IPLProgressCallback progressCallback,

Callers 1

CStaticMeshMethod · 0.45

Calls 2

statusMethod · 0.80
allocateMethod · 0.45

Tested by

no test coverage detected