|
VR-Engage
2.2
|
This class extends DtTriangleOutputInterface to provide specialized handling of terrain triangles for the Vortex physics engine. It collects triangles, filters them based on surface type, handles coordinate conversions, and provides timing metrics for performance analysis.
#include <pagedTerrainRequest.h>
Public Types | |
| using | TerrainTriangleStructList = std::vector<DtVortexTriangleStructure> |
Public Member Functions | |
| DtVortexTriangleOutputInterface (DtTerrainProcessPolygonsBox bb, const unsigned int reserveSize) | |
| virtual | ~DtVortexTriangleOutputInterface () |
| virtual void | processTriangle (const DtTerrainTriangleStruct &triangle) override |
| virtual bool | processTriangles () const override |
| void | setProcessTriangles (bool value) |
| void | setForcePaging (bool page) |
| virtual bool | forcePaging () const override |
| int | requestId () const |
| void | setRequestId (int id) |
| int | sourceId () const |
| void | setSourceId (int id) |
| void | setMaterialMap (std::shared_ptr< DtSurfaceToVxMaterialMapper > mapper) |
| void | setCoordinateConversion (DtCoordinateConvert *coordConv) |
| void | setGeocentricTerrain (bool isGeo) |
| void | setIsDynamicTerrain (bool dynamic=false) |
| bool | isDynamicTerrain () const |
| DtTerrainProcessPolygonsBox | boundingBox () const |
| void | startGetTrianglesProcessTime () |
| void | endGetTrianglesProcessTime () |
| double | getTrianglesTime () const |
| void | startCollisionGeometryProcessTime () |
| void | endCollisionGeometryProcessTime () |
| double | collisionGeometryTime () const |
| void | startTriangleMeshProcessTime () |
| void | endTriangleMeshProcessTime () |
| double | triangleMeshTime () const |
| virtual const TerrainTriangleStructList & | triangles () const |
| virtual unsigned | triangleCount () const |
| virtual void | clearTriangleList () |
Protected Attributes | |
| bool | myIsDynamicTerrain |
| bool | myIsGeocentric |
| bool | myRequestFinished |
| bool | myForcePaging |
| bool | myProcessTriangles |
| HiResClock::time_point | myGetTrianglesStartTime |
| HiResClock::time_point | myGetTrianglesEndTime |
| HiResClock::time_point | myCollisionGeometryStartTime |
| HiResClock::time_point | myCollisionGeometryEndTime |
| HiResClock::time_point | myTriangleMeshStartTime |
| HiResClock::time_point | myTriangleMeshEndTime |
| int | myRequestId |
| int | mySourceId |
| DtTerrainProcessPolygonsBox | myBoundingBox |
| DtCoordinateConvert * | myCoordConvert |
| std::shared_ptr< DtSurfaceToVxMaterialMapper > | myMaterialMapper |
| unsigned int | myTriangleCount |
| TerrainTriangleStructList | myTriangleList |
| tbb::spin_mutex | myProcessTriangleMutex |
| using makVre::DtVortexTriangleOutputInterface::TerrainTriangleStructList = std::vector<DtVortexTriangleStructure> |
Type definition for a collection of triangles.
| makVre::DtVortexTriangleOutputInterface::DtVortexTriangleOutputInterface | ( | DtTerrainProcessPolygonsBox | bb, |
| const unsigned int | reserveSize ) |
Constructor with bounding box and capacity specification.
Initializes the triangle output interface with a given bounding box and pre-allocates memory for triangles to improve performance.
| bb | Bounding box defining the terrain area to process |
| reserveSize | Number of triangles to pre-allocate memory for |
|
virtual |
Destructor.
Cleans up resources by clearing the triangle list.
|
overridevirtual |
Processes a terrain triangle and adds it to the collection.
Filters triangles based on surface type, performs coordinate conversion if needed, and adds valid triangles to the internal collection. This method is thread-safe.
| triangle | The terrain triangle to process |
|
overridevirtual |
Checks if triangles should be processed.
| void makVre::DtVortexTriangleOutputInterface::setProcessTriangles | ( | bool | value | ) |
Sets whether triangles should be processed.
| value | True to enable triangle processing, false to disable |
| void makVre::DtVortexTriangleOutputInterface::setForcePaging | ( | bool | page | ) |
Sets whether to force paging of terrain data.
| page | True to force paging, false otherwise |
|
overridevirtual |
Checks if paging is forced.
| int makVre::DtVortexTriangleOutputInterface::requestId | ( | ) | const |
Gets the request identifier.
| void makVre::DtVortexTriangleOutputInterface::setRequestId | ( | int | id | ) |
Sets the request identifier.
| id | The new request identifier |
| int makVre::DtVortexTriangleOutputInterface::sourceId | ( | ) | const |
Gets the source identifier.
| void makVre::DtVortexTriangleOutputInterface::setSourceId | ( | int | id | ) |
Sets the source identifier.
| id | The new source identifier |
| void makVre::DtVortexTriangleOutputInterface::setMaterialMap | ( | std::shared_ptr< DtSurfaceToVxMaterialMapper > | mapper | ) |
Sets the material mapper for surface filtering.
| mapper | The material mapper to use for filtering triangles |
| void makVre::DtVortexTriangleOutputInterface::setCoordinateConversion | ( | DtCoordinateConvert * | coordConv | ) |
Sets the coordinate conversion object.
| coordConv | The coordinate converter to use for geocentric conversions |
| void makVre::DtVortexTriangleOutputInterface::setGeocentricTerrain | ( | bool | isGeo | ) |
Sets whether the terrain is in geocentric coordinates.
| isGeo | True if terrain is in geocentric coordinates, false if it's in local coordinates |
| void makVre::DtVortexTriangleOutputInterface::setIsDynamicTerrain | ( | bool | dynamic = false | ) |
Sets whether this represents dynamic terrain.
| dynamic | True if this represents dynamic terrain, false for static terrain |
| bool makVre::DtVortexTriangleOutputInterface::isDynamicTerrain | ( | ) | const |
Checks if this represents dynamic terrain.
| DtTerrainProcessPolygonsBox makVre::DtVortexTriangleOutputInterface::boundingBox | ( | ) | const |
Gets the bounding box.
| void makVre::DtVortexTriangleOutputInterface::startGetTrianglesProcessTime | ( | ) |
Starts timing the triangle collection process.
| void makVre::DtVortexTriangleOutputInterface::endGetTrianglesProcessTime | ( | ) |
Ends timing the triangle collection process.
| double makVre::DtVortexTriangleOutputInterface::getTrianglesTime | ( | ) | const |
Gets the time taken to collect triangles in milliseconds.
| void makVre::DtVortexTriangleOutputInterface::startCollisionGeometryProcessTime | ( | ) |
Starts timing the collision geometry generation process.
| void makVre::DtVortexTriangleOutputInterface::endCollisionGeometryProcessTime | ( | ) |
Ends timing the collision geometry generation process.
| double makVre::DtVortexTriangleOutputInterface::collisionGeometryTime | ( | ) | const |
Gets the time taken to generate collision geometry in milliseconds.
| void makVre::DtVortexTriangleOutputInterface::startTriangleMeshProcessTime | ( | ) |
Starts timing the triangle mesh generation process.
| void makVre::DtVortexTriangleOutputInterface::endTriangleMeshProcessTime | ( | ) |
Ends timing the triangle mesh generation process.
| double makVre::DtVortexTriangleOutputInterface::triangleMeshTime | ( | ) | const |
Gets the time taken to generate triangle mesh in milliseconds.
|
virtual |
Gets the collected triangles.
|
virtual |
Gets the number of collected triangles.
|
virtual |
Clears the triangle list.
Removes all collected triangles from memory.
|
protected |
Flag indicating if this represents dynamic terrain.
|
protected |
Flag indicating if terrain is in geocentric coordinates.
|
protected |
Flag indicating if the request has been completed.
|
protected |
Flag indicating if paging should be forced.
|
protected |
Flag indicating if triangles should be processed.
|
protected |
Start time for triangle collection.
|
protected |
End time for triangle collection.
|
protected |
Start time for collision geometry generation.
|
protected |
End time for collision geometry generation.
|
protected |
Start time for triangle mesh generation.
|
protected |
End time for triangle mesh generation.
|
protected |
Identifier for this request.
|
protected |
Source identifier for this terrain data.
|
protected |
Bounding box defining the terrain area.
|
protected |
Converter for geocentric coordinates.
|
protected |
Mapper for filtering surfaces.
|
protected |
Number of triangles collected.
|
protected |
List of collected triangles.
|
protected |
Mutex for thread-safe triangle processing.