| 213 | // -------------------------------------------------------------------------------------------------------------------- |
| 214 | |
| 215 | CStaticMesh::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 | |
| 236 | CStaticMesh::CStaticMesh(CScene* scene, |
| 237 | ISerializedObject* serializedObject) |
nothing calls this directly
no test coverage detected