| 311 | // -------------------------------------------------------------------------------------------------------------------- |
| 312 | |
| 313 | CInstancedMesh::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 | |
| 330 | IInstancedMesh* CInstancedMesh::retain() |
| 331 | { |
nothing calls this directly
no test coverage detected