VR-Engage  2.2
Loading...
Searching...
No Matches
makVre::DtVortexTriangleOutputInterface Class Reference

Detailed Description

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>

Inheritance diagram for makVre::DtVortexTriangleOutputInterface:
[legend]

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 TerrainTriangleStructListtriangles () 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
 
DtCoordinateConvertmyCoordConvert
 
std::shared_ptr< DtSurfaceToVxMaterialMappermyMaterialMapper
 
unsigned int myTriangleCount
 
TerrainTriangleStructList myTriangleList
 
tbb::spin_mutex myProcessTriangleMutex
 

Member Typedef Documentation

◆ TerrainTriangleStructList

Type definition for a collection of triangles.

Constructor & Destructor Documentation

◆ DtVortexTriangleOutputInterface()

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.

Parameters
bbBounding box defining the terrain area to process
reserveSizeNumber of triangles to pre-allocate memory for

◆ ~DtVortexTriangleOutputInterface()

virtual makVre::DtVortexTriangleOutputInterface::~DtVortexTriangleOutputInterface ( )
virtual

Destructor.

Cleans up resources by clearing the triangle list.

Member Function Documentation

◆ processTriangle()

virtual void makVre::DtVortexTriangleOutputInterface::processTriangle ( const DtTerrainTriangleStruct & triangle)
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.

Parameters
triangleThe terrain triangle to process

◆ processTriangles()

virtual bool makVre::DtVortexTriangleOutputInterface::processTriangles ( ) const
overridevirtual

Checks if triangles should be processed.

Returns
True if triangle processing is enabled, false otherwise

◆ setProcessTriangles()

void makVre::DtVortexTriangleOutputInterface::setProcessTriangles ( bool value)

Sets whether triangles should be processed.

Parameters
valueTrue to enable triangle processing, false to disable

◆ setForcePaging()

void makVre::DtVortexTriangleOutputInterface::setForcePaging ( bool page)

Sets whether to force paging of terrain data.

Parameters
pageTrue to force paging, false otherwise

◆ forcePaging()

virtual bool makVre::DtVortexTriangleOutputInterface::forcePaging ( ) const
overridevirtual

Checks if paging is forced.

Returns
True if paging is forced, false otherwise

◆ requestId()

int makVre::DtVortexTriangleOutputInterface::requestId ( ) const

Gets the request identifier.

Returns
The current request identifier

◆ setRequestId()

void makVre::DtVortexTriangleOutputInterface::setRequestId ( int id)

Sets the request identifier.

Parameters
idThe new request identifier

◆ sourceId()

int makVre::DtVortexTriangleOutputInterface::sourceId ( ) const

Gets the source identifier.

Returns
The current source identifier

◆ setSourceId()

void makVre::DtVortexTriangleOutputInterface::setSourceId ( int id)

Sets the source identifier.

Parameters
idThe new source identifier

◆ setMaterialMap()

void makVre::DtVortexTriangleOutputInterface::setMaterialMap ( std::shared_ptr< DtSurfaceToVxMaterialMapper > mapper)

Sets the material mapper for surface filtering.

Parameters
mapperThe material mapper to use for filtering triangles

◆ setCoordinateConversion()

void makVre::DtVortexTriangleOutputInterface::setCoordinateConversion ( DtCoordinateConvert * coordConv)

Sets the coordinate conversion object.

Parameters
coordConvThe coordinate converter to use for geocentric conversions

◆ setGeocentricTerrain()

void makVre::DtVortexTriangleOutputInterface::setGeocentricTerrain ( bool isGeo)

Sets whether the terrain is in geocentric coordinates.

Parameters
isGeoTrue if terrain is in geocentric coordinates, false if it's in local coordinates

◆ setIsDynamicTerrain()

void makVre::DtVortexTriangleOutputInterface::setIsDynamicTerrain ( bool dynamic = false)

Sets whether this represents dynamic terrain.

Parameters
dynamicTrue if this represents dynamic terrain, false for static terrain

◆ isDynamicTerrain()

bool makVre::DtVortexTriangleOutputInterface::isDynamicTerrain ( ) const

Checks if this represents dynamic terrain.

Returns
True if this represents dynamic terrain, false for static terrain

◆ boundingBox()

DtTerrainProcessPolygonsBox makVre::DtVortexTriangleOutputInterface::boundingBox ( ) const

Gets the bounding box.

Returns
The bounding box defining the terrain area

◆ startGetTrianglesProcessTime()

void makVre::DtVortexTriangleOutputInterface::startGetTrianglesProcessTime ( )

Starts timing the triangle collection process.

◆ endGetTrianglesProcessTime()

void makVre::DtVortexTriangleOutputInterface::endGetTrianglesProcessTime ( )

Ends timing the triangle collection process.

◆ getTrianglesTime()

double makVre::DtVortexTriangleOutputInterface::getTrianglesTime ( ) const

Gets the time taken to collect triangles in milliseconds.

Returns
The time taken to collect triangles in milliseconds

◆ startCollisionGeometryProcessTime()

void makVre::DtVortexTriangleOutputInterface::startCollisionGeometryProcessTime ( )

Starts timing the collision geometry generation process.

◆ endCollisionGeometryProcessTime()

void makVre::DtVortexTriangleOutputInterface::endCollisionGeometryProcessTime ( )

Ends timing the collision geometry generation process.

◆ collisionGeometryTime()

double makVre::DtVortexTriangleOutputInterface::collisionGeometryTime ( ) const

Gets the time taken to generate collision geometry in milliseconds.

Returns
The time taken to generate collision geometry in milliseconds

◆ startTriangleMeshProcessTime()

void makVre::DtVortexTriangleOutputInterface::startTriangleMeshProcessTime ( )

Starts timing the triangle mesh generation process.

◆ endTriangleMeshProcessTime()

void makVre::DtVortexTriangleOutputInterface::endTriangleMeshProcessTime ( )

Ends timing the triangle mesh generation process.

◆ triangleMeshTime()

double makVre::DtVortexTriangleOutputInterface::triangleMeshTime ( ) const

Gets the time taken to generate triangle mesh in milliseconds.

Returns
The time taken to generate triangle mesh in milliseconds

◆ triangles()

virtual const TerrainTriangleStructList & makVre::DtVortexTriangleOutputInterface::triangles ( ) const
virtual

Gets the collected triangles.

Returns
Constant reference to the list of collected triangles

◆ triangleCount()

virtual unsigned makVre::DtVortexTriangleOutputInterface::triangleCount ( ) const
virtual

Gets the number of collected triangles.

Returns
The number of triangles collected

◆ clearTriangleList()

virtual void makVre::DtVortexTriangleOutputInterface::clearTriangleList ( )
virtual

Clears the triangle list.

Removes all collected triangles from memory.

Member Data Documentation

◆ myIsDynamicTerrain

bool makVre::DtVortexTriangleOutputInterface::myIsDynamicTerrain
protected

Flag indicating if this represents dynamic terrain.

◆ myIsGeocentric

bool makVre::DtVortexTriangleOutputInterface::myIsGeocentric
protected

Flag indicating if terrain is in geocentric coordinates.

◆ myRequestFinished

bool makVre::DtVortexTriangleOutputInterface::myRequestFinished
protected

Flag indicating if the request has been completed.

◆ myForcePaging

bool makVre::DtVortexTriangleOutputInterface::myForcePaging
protected

Flag indicating if paging should be forced.

◆ myProcessTriangles

bool makVre::DtVortexTriangleOutputInterface::myProcessTriangles
protected

Flag indicating if triangles should be processed.

◆ myGetTrianglesStartTime

HiResClock::time_point makVre::DtVortexTriangleOutputInterface::myGetTrianglesStartTime
protected

Start time for triangle collection.

◆ myGetTrianglesEndTime

HiResClock::time_point makVre::DtVortexTriangleOutputInterface::myGetTrianglesEndTime
protected

End time for triangle collection.

◆ myCollisionGeometryStartTime

HiResClock::time_point makVre::DtVortexTriangleOutputInterface::myCollisionGeometryStartTime
protected

Start time for collision geometry generation.

◆ myCollisionGeometryEndTime

HiResClock::time_point makVre::DtVortexTriangleOutputInterface::myCollisionGeometryEndTime
protected

End time for collision geometry generation.

◆ myTriangleMeshStartTime

HiResClock::time_point makVre::DtVortexTriangleOutputInterface::myTriangleMeshStartTime
protected

Start time for triangle mesh generation.

◆ myTriangleMeshEndTime

HiResClock::time_point makVre::DtVortexTriangleOutputInterface::myTriangleMeshEndTime
protected

End time for triangle mesh generation.

◆ myRequestId

int makVre::DtVortexTriangleOutputInterface::myRequestId
protected

Identifier for this request.

◆ mySourceId

int makVre::DtVortexTriangleOutputInterface::mySourceId
protected

Source identifier for this terrain data.

◆ myBoundingBox

DtTerrainProcessPolygonsBox makVre::DtVortexTriangleOutputInterface::myBoundingBox
protected

Bounding box defining the terrain area.

◆ myCoordConvert

DtCoordinateConvert* makVre::DtVortexTriangleOutputInterface::myCoordConvert
protected

Converter for geocentric coordinates.

◆ myMaterialMapper

std::shared_ptr<DtSurfaceToVxMaterialMapper> makVre::DtVortexTriangleOutputInterface::myMaterialMapper
protected

Mapper for filtering surfaces.

◆ myTriangleCount

unsigned int makVre::DtVortexTriangleOutputInterface::myTriangleCount
protected

Number of triangles collected.

◆ myTriangleList

TerrainTriangleStructList makVre::DtVortexTriangleOutputInterface::myTriangleList
protected

List of collected triangles.

◆ myProcessTriangleMutex

tbb::spin_mutex makVre::DtVortexTriangleOutputInterface::myProcessTriangleMutex
protected

Mutex for thread-safe triangle processing.


The documentation for this class was generated from the following file: