| 128 | } |
| 129 | |
| 130 | IPLerror 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 | |
| 153 | IPLerror CScene::loadStaticMesh(ISerializedObject* serializedObject, |
| 154 | IPLProgressCallback progressCallback, |
no test coverage detected