![]() |
VR-Forces Developer's Guide
|
Debug Draw Manager (back end) that receive (DIS/HLA) messages from a VRF GUI and then connect to the debugDrawRenderer (front end) with a non DIS/HLA UDP protocol. It will then send draw information to the debugDrawRenderer upon GUI request.
Public Types | |
| using | DtTerrainGeometryMap = std::unordered_map< DtTerrainGeometryId, std::vector< DtTerrainTriangleStruct > > |
Public Member Functions | |
| DtDebugDrawManager (DtSimulationServices *simManager) | |
| virtual | ~DtDebugDrawManager () |
| virtual void | tick () |
| virtual void | sendDrawTerrainSkinRequest (const std::string &EntityId, const std::vector< DtTerrainTriangleStruct > &triangles, DtIfDebugDrawTerrain::DtSkinColorMode skinDrawMode, float colorAlpha) |
| virtual void | sendDeleteTerrainSkinRequest (const std::string &EntityId) |
| virtual void | sendDrawTerrainNormalRequest (const std::string &EntityId, const std::vector< DtTerrainTriangleStruct > &triangles) |
| virtual void | sendDeleteTerrainNormalRequest (const std::string &EntityId) |
| virtual void | sendElevationTileRequest (const std::string &EntityId, const std::vector< makVrf::DtLine > &lines, const std::vector< makVrf::DtColorPoint > &points) |
| virtual void | sendDeleteElevationTileRequest (const std::string &EntityId) |
| virtual void | sendProceduralTreeTileRequest (const std::string &EntityId, const std::vector< makVrf::DtLine > &lines) |
| virtual void | sendDeleteProceduralTreeTileRequest (const std::string &EntityId) |
| virtual void | sendLastIntersections (const std::string &EntityId, const std::vector< makVrf::DtLine > &lines, const std::vector< makVrf::DtColorPoint > &pointList) |
| virtual void | sendDeleteLastIntersections (const std::string &EntityId, int refresh) |
| virtual void | sendCollisionRequest (const std::string &EntityId, const std::vector< makVrf::DtLine > &lines) |
| virtual void | sendDeleteCollisionRequest (const std::string &EntityId) |
| virtual void | sendQueryRequest (const std::string &EntityId, const std::vector< makVrf::DtLine > &lines) |
| virtual void | sendDeleteQueryRequest (const std::string &EntityId) |
| virtual void | sendPageOutNodeBSRequest (const std::string &EntityId, const DtNodeBoundingList &nodeBoundingList) |
| virtual void | sendDeletePageOutNodeBSRequest (const std::string &EntityId) |
| virtual void | sendPageInNodeBSRequest (const std::string &EntityId, const DtNodeBoundingList &nodeBoundingList) |
| virtual void | sendDeletePageInNodeBSRequest (const std::string &EntityId) |
| virtual void | sendFeatureLinearRequest (const std::string &EntityId, const std::vector< makVrf::DtLine > &lines) |
| virtual void | sendDeleteFeatureLinearRequest (const std::string &EntityId) |
| virtual void | addLinearFeatures (MAKVRinTerra::DtFeatureGeometry &geom, float offset, bool &upVectorInit, DtVector &upVector, unsigned red, unsigned green, unsigned blue) |
| virtual void | addPointFeatures (MAKVRinTerra::DtFeatureGeometry &geom, float offset, unsigned red, unsigned green, unsigned blue) |
| virtual void | addArealFeatures (MAKVRinTerra::DtFeatureGeometry &geom, float offset, bool &upVectorInit, DtVector &upVector, unsigned red, unsigned green, unsigned blue) |
| virtual void | offsetNavMesh (std::list< DtNavArea::DtNavTriangleInfo > &triangles, float offset) |
| virtual void | sendDrawNavMeshRequest (const std::string &EntityId, const std::list< DtNavArea::DtNavTriangleInfo > &triangles, bool enableColor, float alpha) |
| virtual void | sendDeleteNavMeshRequest (const std::string &EntityId) |
| virtual DtTerrainGeometryMap & | terrainGeometryMap () |
Static Public Member Functions | |
| static void | tickCallback (void *args) |
| static void | messageConectorCallback (DtSimMessage *msg, void *usr) |
| static void | messageTerrainCallback (DtSimMessage *msg, void *usr) |
| static void | messageFeatureCallback (DtSimMessage *msg, void *usr) |
| static void | messageNavMeshCallback (DtSimMessage *msg, void *usr) |
Protected Member Functions | |
| virtual bool | init () |
| virtual void | connect () |
| virtual void | disconnect () |
| virtual void | setIp (const std::string &serverAddress) |
| virtual void | setPort (unsigned int port) |
| virtual void | color (unsigned &rmix, unsigned &gmix, unsigned &bmix) |
| void | newFilterArea (DtIfDebugDrawFeature *msgContent) |
| void | addFeature (const MAKVRinTerra::DtFeature &feature) |
| virtual void | checkForAddedFeature () |
| virtual void | deleteLinearFeature () |
| virtual void | sendFeatures (std::vector< std::shared_ptr< MAKVRinTerra::DtFeature > > &newFeatures) |
| DtSimulationServices * | simulationServices () const |
| virtual DtTerrainProcessPolygonsBox | boundingBox (DtVector topLeftCorner, DtVector topRightCorner, DtVector bottomLeftCorner, DtVector bottomRightCorner) |
| virtual void | handleConnection (makVrf::DtDebugDrawConnector *connection) |
| virtual void | handleDisconnection (makVrf::DtDebugDrawConnector *connection) |
| virtual void | handleTerrainAreaResponse (makVrf::DtBaseMessage *msg) |
| virtual void | handleFeatureResponse (makVrf::DtBaseMessage *msg) |
| virtual DtVector | geocentricToDatabase (const DtVector &geocentricVector) const |
| virtual DtVector | databaseToGeocentric (const DtVector &dbVector) const |
| virtual DtPoint | databaseToGeocentric (const DtPoint &dbPoint) const |
Protected Attributes | |
| DtSimulationServices * | mySimulationServices |
| std::string | myServerAddress |
| unsigned int | myPort |
| bool | myIsConnected |
| unsigned int | myVisId |
| makVrf::DtDebugDrawConnector * | myConnector |
| std::unique_ptr < MAKVRinTerra::DtFeatureSet > | myFeatureSet |
| MAKVRinTerra::DtFeatureSet::DetachCallback | myDetacher |
| std::string | myFeatureQuery |
| float | myFeatureOffset |
| bool | myClampFeature |
| tbb::spin_mutex | myMutex |
| std::vector< makVrf::DtLine > | myFeaturePoint |
| std::vector< makVrf::DtLine > | myFeatureLinear |
| std::vector< makVrf::DtLine > | myFeatureAreal |
| std::vector< std::shared_ptr < MAKVRinTerra::DtFeature > > | myPendingPageInFeatures |
| bool | myInit |
| std::atomic< unsigned > | myNumEmptyTick |
| bool | myFeatureToSend |
| bool | myCheckForAddedFeature |
| bool | myDrawPointFeature |
| bool | myDrawLinearFeature |
| bool | myDrawArealFeature |
| tbb::task_arena | myArena |
| DtTerrainGeometryMap | myTerrainGeometryMap |
| using DtDebugDrawManager::DtTerrainGeometryMap = std::unordered_map<DtTerrainGeometryId, std::vector<DtTerrainTriangleStruct> > |
| DtDebugDrawManager::DtDebugDrawManager | ( | DtSimulationServices * | simManager | ) |
|
virtual |
|
virtual |
The update function.
|
static |
This callback is registered on the sim manager's tick list. The sim manager calls this function when it is ticked.
|
static |
Receive messages from the GUI via HLA/DIS to connect/disconnect the manager/renderer.
|
static |
Receive messages from the GUI via HLA/DIS to render terrain information the manager/renderer.
|
static |
Receive messages from the GUI via HLA/DIS to render feature information the manager/renderer.
|
static |
Receive messages from the GUI via HLA/DIS to render NavMesh information the manager/renderer.
|
virtual |
*** Terrain functions ***
send a terrain skin request (this is the main request for the terrain area)
|
virtual |
send delete terrain skin request (this delete the terrain area and all related drawing)
|
virtual |
send a terrain skin normal request (this is the main request for the terrain area)
|
virtual |
send delete terrain skin normal request
|
virtual |
send a Elevation tile request
|
virtual |
send a delete Elevation tile request
|
virtual |
send a Procedural Tree tile request
|
virtual |
send a delete Procedural Tree tile request
|
virtual |
send a Last terrain intersections
|
virtual |
send a delete Last terrain intersections
|
virtual |
send a Collision object request
|
virtual |
send a delete Collision Object request
|
virtual |
send a Query line request
|
virtual |
send a delete Query line request
|
virtual |
send a PageOutNodeBS request
|
virtual |
send a delete PageOutNodeBS request
|
virtual |
send a PageInNodeBS request
|
virtual |
send a delete PageInNodeBS request
|
virtual |
*** Feature functions ***
send a Feature request
|
virtual |
send a delete Feature request
|
virtual |
parse the feature query and add linear
|
virtual |
parse the feature query and add points
|
virtual |
parse the feature query and add areal
|
virtual |
*** NavMesh functions ***
offset each triangles in the normal direction
|
virtual |
send a nav mesh request
|
virtual |
send delete nav mesh request
|
virtual |
|
protectedvirtual |
initializes the client
|
protectedvirtual |
connect to the tcpConnector
|
protectedvirtual |
disconnect from the tcpConnector
|
protectedvirtual |
set the IP to connect to (GUI)
set the port to connect to (GUI)
|
protectedvirtual |
get a random color
|
protected |
set a new boundary area to query the features
|
protected |
add new features to a list in an asynchronous fashion after a newFilterArea was called
|
protectedvirtual |
check if new features have been added by addFeature()
|
protectedvirtual |
|
protectedvirtual |
|
inlineprotected |
get the sim manager pointer
|
protectedvirtual |
calculate frustum bounding box
|
protectedvirtual |
handle the connection
|
protectedvirtual |
handle the disconnection
|
protectedvirtual |
handle the terrain area response from the server
|
protectedvirtual |
handle the feature response from the server
|
protectedvirtual |
Convert a point from the simulation's terrain database coordinate system to geocentric (ECEF) coordinates. Debug-draw geometry is sent to the renderer in geocentric coordinates - a projection-independent frame - so that it renders in the correct location even when the simulation and the GUI use terrains with different projections. The renderer converts back into its own scene coordinate system on receipt. Returns the input unchanged if the physical world is not available.
|
protectedvirtual |
Convert a point from the simulation's terrain database coordinate system to geocentric (ECEF) coordinates. Debug-draw geometry is sent to the renderer in geocentric coordinates - a projection-independent frame - so that it renders in the correct location even when the simulation and the GUI use terrains with different projections. The renderer converts back into its own scene coordinate system on receipt. Returns the input unchanged if the physical world is not available.
|
protectedvirtual |
Convert a point from geocentric (ECEF) coordinates to the simulation's terrain database coordinate system. Query areas (frustum corners) are received from the GUI in geocentric coordinates - a projection-independent frame - so that the queried terrain area matches the requested screen position even when the simulation and the GUI use terrains with different projections. Returns the input unchanged if the physical world is not available.
|
protected |
|
protected |
debug draw renderer ip
|
protected |
are we currently connected to the debug draw renderer
|
protected |
connector object that is used to send message from the debugDrawManager and debugDrawRenderer
|
protected |
set of queried feature
|
protected |
|
protected |
Query string in the form described in appData\settings\featureconfig.txt.
|
protected |
Feature Offset.
|
protected |
Feature Offset.
|
mutableprotected |
Mutex.
|
protected |
List of points (converted to line) to send to the renderer.
|
protected |
List of linear to send to the renderer.
|
protected |
List of areal to send to the renderer.
|
protected |
list of queried features asynchronously added
|
protected |
was the manager initialized
|
protected |
counter used to check the number of tick that happen between added features
|
protected |
set to true when we need to send features to the renderer
|
protected |
flag that trigger the tick function that will send the new features
|
protected |
Flag to draw the point features.
|
protected |
Flag to draw the linear features.
|
protected |
Flag to draw the areal features.
|
protected |
|
protected |
Holds the geometry of any geometry instances the debug drawer has retrieved from the terrain.