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

Method CInstancedMesh

core/src/core/api_scene.cpp:313–328  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

311// --------------------------------------------------------------------------------------------------------------------
312
313CInstancedMesh::CInstancedMesh(CScene* scene,
314 IPLInstancedMeshSettings* settings)
315{
316 auto _context = scene->mHandle.context();
317 if (!_context)
318 throw Exception(Status::Failure);
319
320 auto _scene = scene->mHandle.get();
321 auto _subScene = reinterpret_cast<CScene*>(settings->subScene)->mHandle.get();
322 if (!_scene || !_subScene)
323 throw Exception(Status::Failure);
324
325 auto _transform = reinterpret_cast<Matrix4x4f&>(settings->transform).transposedCopy();
326
327 new (&mHandle) Handle<ipl::IInstancedMesh>(_scene->createInstancedMesh(_subScene, _transform), _context);
328}
329
330IInstancedMesh* CInstancedMesh::retain()
331{

Callers

nothing calls this directly

Calls 5

ExceptionClass · 0.85
transposedCopyMethod · 0.80
contextMethod · 0.45
getMethod · 0.45
createInstancedMeshMethod · 0.45

Tested by

no test coverage detected