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

Method CStaticMesh

core/src/core/api_scene.cpp:215–234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213// --------------------------------------------------------------------------------------------------------------------
214
215CStaticMesh::CStaticMesh(CScene* scene,
216 IPLStaticMeshSettings* settings)
217{
218 auto _context = scene->mHandle.context();
219 if (!_context)
220 throw Exception(Status::Failure);
221
222 auto _scene = scene->mHandle.get();
223 if (!_scene)
224 throw Exception(Status::Failure);
225
226 auto _vertices = reinterpret_cast<Vector3f*>(settings->vertices);
227 auto _triangles = reinterpret_cast<Triangle*>(settings->triangles);
228 auto _materials = reinterpret_cast<Material*>(settings->materials);
229
230 new (&mHandle) Handle<ipl::IStaticMesh>(_scene->createStaticMesh(
231 settings->numVertices, settings->numTriangles,
232 settings->numMaterials, _vertices, _triangles,
233 settings->materialIndices, _materials), _context);
234}
235
236CStaticMesh::CStaticMesh(CScene* scene,
237 ISerializedObject* serializedObject)

Callers

nothing calls this directly

Calls 4

ExceptionClass · 0.85
contextMethod · 0.45
getMethod · 0.45
createStaticMeshMethod · 0.45

Tested by

no test coverage detected