VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
DtDebugDrawManager Class Reference

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. More...

Public Member Functions

 DtDebugDrawManager (DtSimManager *simManager)
 
virtual ~DtDebugDrawManager ()
 
virtual void tick ()
 The update function. More...
 
virtual void sendDrawTerrainSkinRequest (const std::string &EntityId, std::vector< DtTerrainTriangleStruct > &triangles, DtIfDebugDrawTerrain::DtSkinColorMode skinDrawMode, float colorAlpha)
 *** Terrain functions *** More...
 
virtual void sendDeleteTerrainSkinRequest (const std::string &EntityId)
 send delete terrain skin request (this delete the terrain area and all related drawing) More...
 
virtual void sendDrawTerrainNormalRequest (const std::string &EntityId, std::vector< DtTerrainTriangleStruct > &triangles)
 send a terrain skin normal request (this is the main request for the terrain area) More...
 
virtual void sendDeleteTerrainNormalRequest (const std::string &EntityId)
 send delete terrain skin normal request More...
 
virtual void sendElevationTileRequest (const std::string &EntityId, std::vector< makVrf::DtLine > &lines)
 send a Elevation tile request More...
 
virtual void sendDeleteElevationTileRequest (const std::string &EntityId)
 send a delete Elevation tile request More...
 
virtual void sendProceduralTreeTileRequest (const std::string &EntityId, std::vector< makVrf::DtLine > &lines)
 send a Procedural Tree tile request More...
 
virtual void sendDeleteProceduralTreeTileRequest (const std::string &EntityId)
 send a delete Procedural Tree tile request More...
 
virtual void sendCollisionRequest (const std::string &EntityId, std::vector< makVrf::DtLine > &lines)
 send a Collision object request More...
 
virtual void sendDeleteCollisionRequest (const std::string &EntityId)
 send a delete Collision Object request More...
 
virtual void sendQueryRequest (const std::string &EntityId, std::vector< makVrf::DtLine > &lines)
 send a Query line request More...
 
virtual void sendDeleteQueryRequest (const std::string &EntityId)
 send a delete Query line request More...
 
virtual void sendPageOutNodeBSRequest (const std::string &EntityId, DtNodeBoundingList &nodeBoundingList)
 send a PageOutNodeBS request More...
 
virtual void sendDeletePageOutNodeBSRequest (const std::string &EntityId)
 send a delete PageOutNodeBS request More...
 
virtual void sendPageInNodeBSRequest (const std::string &EntityId, DtNodeBoundingList &nodeBoundingList)
 send a PageInNodeBS request More...
 
virtual void sendDeletePageInNodeBSRequest (const std::string &EntityId)
 send a delete PageInNodeBS request More...
 
virtual void sendFeatureLinearRequest (const std::string &EntityId, std::vector< makVrf::DtLine > &lines)
 *** Feature functions *** More...
 
virtual void sendDeleteFeatureLinearRequest (const std::string &EntityId)
 send a delete Feature request More...
 
virtual void addLinearFeatures (MAKVRinTerra::DtFeatureGeometry &geom, float offset, bool addToAreal, bool &upVectorInit, DtVector &upVector, unsigned red, unsigned green, unsigned blue)
 parse the feature query and add linear (good for linear and areal feature) More...
 
virtual void addPointFeatures (MAKVRinTerra::DtFeatureGeometry &geom, float offset, unsigned red, unsigned green, unsigned blue)
 parse the feature query and add linear (good for linear and areal feature) More...
 
virtual void offsetNavMesh (std::list< DtNavArea::DtNavTriangleInfo > &triangles, float offset)
 *** NavMesh functions *** More...
 
virtual void sendDrawNavMeshRequest (const std::string &EntityId, std::list< DtNavArea::DtNavTriangleInfo > &triangles, bool enableColor, float alpha)
 send a nav mesh request More...
 
virtual void sendDeleteNavMeshRequest (const std::string &EntityId)
 send delete nav mesh request More...
 

Static Public Member Functions

static void tickCallback (void *args)
 This callback is registered on the sim manager's tick list. More...
 
static void messageConectorCallback (DtSimMessage *msg, void *usr)
 Receive messages from the GUI via HLA/DIS to connect/disconnect the manager/renderer. More...
 
static void messageTerrainCallback (DtSimMessage *msg, void *usr)
 Receive messages from the GUI via HLA/DIS to render terrain information the manager/renderer. More...
 
static void messageFeatureCallback (DtSimMessage *msg, void *usr)
 Receive messages from the GUI via HLA/DIS to render feature information the manager/renderer. More...
 
static void messageNavMeshCallback (DtSimMessage *msg, void *usr)
 Receive messages from the GUI via HLA/DIS to render NavMesh information the manager/renderer. More...
 

Protected Member Functions

virtual bool init ()
 initializes the client More...
 
virtual void connect ()
 connect to the tcpConnector More...
 
virtual void disconnect ()
 disconnect from the tcpConnector More...
 
virtual void setIp (const std::string &serverAddress)
 set the IP to connect to (GUI) More...
 
virtual void setPort (unsigned int port)
 set the port to connect to (GUI) More...
 
virtual void color (unsigned &rmix, unsigned &gmix, unsigned &bmix)
 get a random color More...
 
void newFilterArea (DtIfDebugDrawFeature *msgContent)
 set a new boundary area to query the features More...
 
void addFeature (const MAKVRinTerra::DtFeature &feature)
 add new features to a list in an asynchronous fashion after a newFilterArea was called More...
 
virtual void checkForAddedFeature ()
 check if new features have been added by addFeature() More...
 
virtual void deleteLinearFeature ()
 
virtual void sendFeatures (std::vector< boost::shared_ptr< MAKVRinTerra::DtFeature > > &newFeatures)
 
virtual DtSimManagersimManager ()
 get the sim manager pointer More...
 
virtual DtTerrainProcessPolygonsBox boundingBox (DtVector topLeftCorner, DtVector topRightCorner, DtVector bottomLeftCorner, DtVector bottomRightCorner)
 calculate frustum bounding box More...
 
virtual void handleConnection (makVrf::DtDebugDrawConnector *connection)
 handle the connection More...
 
virtual void handleDisconnection (makVrf::DtDebugDrawConnector *connection)
 handle the disconnection More...
 
virtual void handleTerrainAreaResponse (makVrf::DtBaseMessage *msg)
 handle the terrain area response from the server More...
 
virtual void handleFeatureResponse (makVrf::DtBaseMessage *msg)
 handle the feature response from the server More...
 

Protected Attributes

DtSimManagermySimManager
 currently selected sim manager More...
 
std::string myServerAddress
 debug draw renderer ip More...
 
unsigned int myPort
 debug draw renderer port More...
 
bool myIsConnected
 are we currently connected to the debug draw renderer More...
 
unsigned int myVisId
 counter for the number of features More...
 
makVrf::DtDebugDrawConnectormyConnector
 connector object that is used to send message from the debugDrawManager and debugDrawRenderer More...
 
boost::scoped_ptr
< MAKVRinTerra::DtFeatureSet
myFeatureSet
 set of queried feature More...
 
MAKVRinTerra::DtFeatureSet::DetachCallback myDetacher
 
std::string myFeatureQuery
 Query string in the form described in appData\settings\featureconfig.txt. More...
 
float myFeatureOffset
 Feature Offset. More...
 
tbb::spin_mutex myMutex
 Mutex. More...
 
std::vector< makVrf::DtLinemyFeaturePoint
 List of points (converted to line) to send to the renderer. More...
 
std::vector< makVrf::DtLinemyFeatureLinear
 List of linear to send to the renderer. More...
 
std::vector< makVrf::DtLinemyFeatureAreal
 List of areal to send to the renderer. More...
 
std::vector< boost::shared_ptr
< MAKVRinTerra::DtFeature > > 
myPendingPageInFeatures
 list of queried features asynchronously added More...
 
bool myInit
 was the manager initialized More...
 
tbb::atomic< unsignedmyNumEmptyTick
 counter used to check the number of tick that happen between added features More...
 
bool myFeatureToSend
 set to true when we need to send features to the renderer More...
 
bool myCheckForAddedFeature
 flag that trigger the tick function that will send the new features More...
 
bool myDrawPointFeature
 Flag to draw the point features. More...
 
bool myDrawLinearFeature
 Flag to draw the linear features. More...
 
bool myDrawArealFeature
 Flag to draw the areal features. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

DtDebugDrawManager::DtDebugDrawManager ( DtSimManager simManager)
virtual DtDebugDrawManager::~DtDebugDrawManager ( )
virtual

Member Function Documentation

virtual void DtDebugDrawManager::tick ( )
virtual

The update function.

static void DtDebugDrawManager::tickCallback ( void *  args)
static

This callback is registered on the sim manager's tick list.

The sim manager calls this function when it is ticked.

static void DtDebugDrawManager::messageConectorCallback ( DtSimMessage msg,
void *  usr 
)
static

Receive messages from the GUI via HLA/DIS to connect/disconnect the manager/renderer.

static void DtDebugDrawManager::messageTerrainCallback ( DtSimMessage msg,
void *  usr 
)
static

Receive messages from the GUI via HLA/DIS to render terrain information the manager/renderer.

static void DtDebugDrawManager::messageFeatureCallback ( DtSimMessage msg,
void *  usr 
)
static

Receive messages from the GUI via HLA/DIS to render feature information the manager/renderer.

static void DtDebugDrawManager::messageNavMeshCallback ( DtSimMessage msg,
void *  usr 
)
static

Receive messages from the GUI via HLA/DIS to render NavMesh information the manager/renderer.

virtual void DtDebugDrawManager::sendDrawTerrainSkinRequest ( const std::string &  EntityId,
std::vector< DtTerrainTriangleStruct > &  triangles,
DtIfDebugDrawTerrain::DtSkinColorMode  skinDrawMode,
float  colorAlpha 
)
virtual

*** Terrain functions ***

send a terrain skin request (this is the main request for the terrain area)

virtual void DtDebugDrawManager::sendDeleteTerrainSkinRequest ( const std::string &  EntityId)
virtual

send delete terrain skin request (this delete the terrain area and all related drawing)

virtual void DtDebugDrawManager::sendDrawTerrainNormalRequest ( const std::string &  EntityId,
std::vector< DtTerrainTriangleStruct > &  triangles 
)
virtual

send a terrain skin normal request (this is the main request for the terrain area)

virtual void DtDebugDrawManager::sendDeleteTerrainNormalRequest ( const std::string &  EntityId)
virtual

send delete terrain skin normal request

virtual void DtDebugDrawManager::sendElevationTileRequest ( const std::string &  EntityId,
std::vector< makVrf::DtLine > &  lines 
)
virtual

send a Elevation tile request

virtual void DtDebugDrawManager::sendDeleteElevationTileRequest ( const std::string &  EntityId)
virtual

send a delete Elevation tile request

virtual void DtDebugDrawManager::sendProceduralTreeTileRequest ( const std::string &  EntityId,
std::vector< makVrf::DtLine > &  lines 
)
virtual

send a Procedural Tree tile request

virtual void DtDebugDrawManager::sendDeleteProceduralTreeTileRequest ( const std::string &  EntityId)
virtual

send a delete Procedural Tree tile request

virtual void DtDebugDrawManager::sendCollisionRequest ( const std::string &  EntityId,
std::vector< makVrf::DtLine > &  lines 
)
virtual

send a Collision object request

virtual void DtDebugDrawManager::sendDeleteCollisionRequest ( const std::string &  EntityId)
virtual

send a delete Collision Object request

virtual void DtDebugDrawManager::sendQueryRequest ( const std::string &  EntityId,
std::vector< makVrf::DtLine > &  lines 
)
virtual

send a Query line request

virtual void DtDebugDrawManager::sendDeleteQueryRequest ( const std::string &  EntityId)
virtual

send a delete Query line request

virtual void DtDebugDrawManager::sendPageOutNodeBSRequest ( const std::string &  EntityId,
DtNodeBoundingList nodeBoundingList 
)
virtual

send a PageOutNodeBS request

virtual void DtDebugDrawManager::sendDeletePageOutNodeBSRequest ( const std::string &  EntityId)
virtual

send a delete PageOutNodeBS request

virtual void DtDebugDrawManager::sendPageInNodeBSRequest ( const std::string &  EntityId,
DtNodeBoundingList nodeBoundingList 
)
virtual

send a PageInNodeBS request

virtual void DtDebugDrawManager::sendDeletePageInNodeBSRequest ( const std::string &  EntityId)
virtual

send a delete PageInNodeBS request

virtual void DtDebugDrawManager::sendFeatureLinearRequest ( const std::string &  EntityId,
std::vector< makVrf::DtLine > &  lines 
)
virtual

*** Feature functions ***

send a Feature request

virtual void DtDebugDrawManager::sendDeleteFeatureLinearRequest ( const std::string &  EntityId)
virtual

send a delete Feature request

virtual void DtDebugDrawManager::addLinearFeatures ( MAKVRinTerra::DtFeatureGeometry geom,
float  offset,
bool  addToAreal,
bool upVectorInit,
DtVector upVector,
unsigned  red,
unsigned  green,
unsigned  blue 
)
virtual

parse the feature query and add linear (good for linear and areal feature)

virtual void DtDebugDrawManager::addPointFeatures ( MAKVRinTerra::DtFeatureGeometry geom,
float  offset,
unsigned  red,
unsigned  green,
unsigned  blue 
)
virtual

parse the feature query and add linear (good for linear and areal feature)

virtual void DtDebugDrawManager::offsetNavMesh ( std::list< DtNavArea::DtNavTriangleInfo > &  triangles,
float  offset 
)
virtual

*** NavMesh functions ***

offset each triangles in the normal direction

virtual void DtDebugDrawManager::sendDrawNavMeshRequest ( const std::string &  EntityId,
std::list< DtNavArea::DtNavTriangleInfo > &  triangles,
bool  enableColor,
float  alpha 
)
virtual

send a nav mesh request

virtual void DtDebugDrawManager::sendDeleteNavMeshRequest ( const std::string &  EntityId)
virtual

send delete nav mesh request

virtual bool DtDebugDrawManager::init ( )
protectedvirtual

initializes the client

virtual void DtDebugDrawManager::connect ( )
protectedvirtual

connect to the tcpConnector

virtual void DtDebugDrawManager::disconnect ( )
protectedvirtual

disconnect from the tcpConnector

virtual void DtDebugDrawManager::setIp ( const std::string &  serverAddress)
protectedvirtual

set the IP to connect to (GUI)

virtual void DtDebugDrawManager::setPort ( unsigned int  port)
protectedvirtual

set the port to connect to (GUI)

virtual void DtDebugDrawManager::color ( unsigned rmix,
unsigned gmix,
unsigned bmix 
)
protectedvirtual

get a random color

void DtDebugDrawManager::newFilterArea ( DtIfDebugDrawFeature msgContent)
protected

set a new boundary area to query the features

void DtDebugDrawManager::addFeature ( const MAKVRinTerra::DtFeature feature)
protected

add new features to a list in an asynchronous fashion after a newFilterArea was called

virtual void DtDebugDrawManager::checkForAddedFeature ( )
protectedvirtual

check if new features have been added by addFeature()

virtual void DtDebugDrawManager::deleteLinearFeature ( )
protectedvirtual
virtual void DtDebugDrawManager::sendFeatures ( std::vector< boost::shared_ptr< MAKVRinTerra::DtFeature > > &  newFeatures)
protectedvirtual
virtual DtSimManager* DtDebugDrawManager::simManager ( )
protectedvirtual

get the sim manager pointer

virtual DtTerrainProcessPolygonsBox DtDebugDrawManager::boundingBox ( DtVector  topLeftCorner,
DtVector  topRightCorner,
DtVector  bottomLeftCorner,
DtVector  bottomRightCorner 
)
protectedvirtual

calculate frustum bounding box

virtual void DtDebugDrawManager::handleConnection ( makVrf::DtDebugDrawConnector connection)
protectedvirtual

handle the connection

virtual void DtDebugDrawManager::handleDisconnection ( makVrf::DtDebugDrawConnector connection)
protectedvirtual

handle the disconnection

virtual void DtDebugDrawManager::handleTerrainAreaResponse ( makVrf::DtBaseMessage msg)
protectedvirtual

handle the terrain area response from the server

virtual void DtDebugDrawManager::handleFeatureResponse ( makVrf::DtBaseMessage msg)
protectedvirtual

handle the feature response from the server

Member Data Documentation

DtSimManager* DtDebugDrawManager::mySimManager
protected

currently selected sim manager

std::string DtDebugDrawManager::myServerAddress
protected

debug draw renderer ip

unsigned int DtDebugDrawManager::myPort
protected

debug draw renderer port

bool DtDebugDrawManager::myIsConnected
protected

are we currently connected to the debug draw renderer

unsigned int DtDebugDrawManager::myVisId
protected

counter for the number of features

makVrf::DtDebugDrawConnector* DtDebugDrawManager::myConnector
protected

connector object that is used to send message from the debugDrawManager and debugDrawRenderer

boost::scoped_ptr<MAKVRinTerra::DtFeatureSet> DtDebugDrawManager::myFeatureSet
protected

set of queried feature

MAKVRinTerra::DtFeatureSet::DetachCallback DtDebugDrawManager::myDetacher
protected
std::string DtDebugDrawManager::myFeatureQuery
protected

Query string in the form described in appData\settings\featureconfig.txt.

float DtDebugDrawManager::myFeatureOffset
protected

Feature Offset.

tbb::spin_mutex DtDebugDrawManager::myMutex
mutableprotected

Mutex.

std::vector<makVrf::DtLine> DtDebugDrawManager::myFeaturePoint
protected

List of points (converted to line) to send to the renderer.

std::vector<makVrf::DtLine> DtDebugDrawManager::myFeatureLinear
protected

List of linear to send to the renderer.

std::vector<makVrf::DtLine> DtDebugDrawManager::myFeatureAreal
protected

List of areal to send to the renderer.

std::vector< boost::shared_ptr<MAKVRinTerra::DtFeature> > DtDebugDrawManager::myPendingPageInFeatures
protected

list of queried features asynchronously added

bool DtDebugDrawManager::myInit
protected

was the manager initialized

tbb::atomic<unsigned> DtDebugDrawManager::myNumEmptyTick
protected

counter used to check the number of tick that happen between added features

bool DtDebugDrawManager::myFeatureToSend
protected

set to true when we need to send features to the renderer

bool DtDebugDrawManager::myCheckForAddedFeature
protected

flag that trigger the tick function that will send the new features

bool DtDebugDrawManager::myDrawPointFeature
protected

Flag to draw the point features.

bool DtDebugDrawManager::myDrawLinearFeature
protected

Flag to draw the linear features.

bool DtDebugDrawManager::myDrawArealFeature
protected

Flag to draw the areal features.


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

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)