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

This class handles all of the intersection processing for HAT/HOT and LOS requests. More...

Public Member Functions

virtual ~DtCigiIntersectionHandler ()
 Destructor.

Protected Member Functions

 DtCigiIntersectionHandler (DtDe &de, DtCigiConnection &connection)
 Constructor.
virtual void slot_onHatHotRequest (DtUniqueID entityId, const DtVector &localPosition, unsigned int hotId, bool hatRequested, unsigned int lastHostFrameNumber)
 Slot called when signal_hatHotRequested is received from the CIGI connection.
virtual void performHatHotRequest (DtUniqueID entityId, const DtVector &localPosition, unsigned int hotId, bool hatRequested, unsigned int lastHostFrameNumber)
 Performs the HAT/HOT calculation and calls generateHatHotResponse on the DtCigiDriver, which will (possibly) put it on the simulation function queue, telling the DtCigiConnection to queue up the response and send it the next time it sends CIGI messages.
virtual void slot_onLineOfSightRequest (DtUniqueID srcId, const DtVector &srcLocation, DtUniqueID dstId, const DtVector &dstLocation, int losId, int hostFrame)
 Slot called when signal_losSegRequested is received from the CIGI connection.
virtual void performLineOfSightRequest (DtUniqueID srcId, const DtVector &srcLocation, DtUniqueID dstId, const DtVector &dstLocation, int losId, int hostFrame)
 Performs the line of sigh calculation and calls generateLosResponse on the DtCigiDriver, which will (possibly) put it on the simulation function queue, telling the DtCigiConnection to queue up the response and send it the next time it sends CIGI messages.
virtual void setDatabaseCoordinateFromEntity (DtUniqueID entity, const DtVector &entityCoord, DtVector &databaseCoord)
 Looks up the entity and uses the entity coordinates to calculate the database coordinate.
virtual double groundHeight (const DtVector &currentLocal, bool &foundIntersection)
 Calculates the height of the terrain below currentLocal.
virtual void generateLosResponse (int losId, DtUniqueID entityId, bool visible, double range, int responseCount, int hostFrame)
 Generate a line-of-sight response.
virtual void generateHatHotResponse (double height, unsigned int hotId, bool hat, unsigned int lastFrame, bool valid)
 Generate a line-of-sight response.

Protected Attributes

DtDemyDe
DtCigiConnectionmyCigiConnection
DtSignalConnectionManager myConnections

Friends

class DtCigiIntersectionHandlerCreator

Detailed Description

This class handles all of the intersection processing for HAT/HOT and LOS requests.

It receives signals from the DtCigiConnection when these requests are received and tells the DtCigiDriver to generate responses. If running the CIGI driver in a separate thread, will use the driver's driver function queue to perform the operations.

Constructor & Destructor Documentation

virtual makVrv::DtCigiIntersectionHandler::~DtCigiIntersectionHandler ( )
virtual

Destructor.

makVrv::DtCigiIntersectionHandler::DtCigiIntersectionHandler ( DtDe de,
DtCigiConnection connection 
)
protected

Constructor.

Member Function Documentation

virtual void makVrv::DtCigiIntersectionHandler::slot_onHatHotRequest ( DtUniqueID  entityId,
const DtVector localPosition,
unsigned int  hotId,
bool  hatRequested,
unsigned int  lastHostFrameNumber 
)
protectedvirtual

Slot called when signal_hatHotRequested is received from the CIGI connection.

Passes on the request to performHatHotRequest.

virtual void makVrv::DtCigiIntersectionHandler::performHatHotRequest ( DtUniqueID  entityId,
const DtVector localPosition,
unsigned int  hotId,
bool  hatRequested,
unsigned int  lastHostFrameNumber 
)
protectedvirtual

Performs the HAT/HOT calculation and calls generateHatHotResponse on the DtCigiDriver, which will (possibly) put it on the simulation function queue, telling the DtCigiConnection to queue up the response and send it the next time it sends CIGI messages.

Parameters
entityIdThe unique ID of the entity used in calculations. If this is 0, a database location is used in the calculation.
localPositionThe database location, or entity offset if the entityId is 0.
hotIdThe HOT ID to respond with.
hatRequestedIf true, calculates height above terrain. Calculates height of terrain if false.
lastHostFrameNumberThe last host frame received before the calculation takes place
virtual void makVrv::DtCigiIntersectionHandler::slot_onLineOfSightRequest ( DtUniqueID  srcId,
const DtVector srcLocation,
DtUniqueID  dstId,
const DtVector dstLocation,
int  losId,
int  hostFrame 
)
protectedvirtual

Slot called when signal_losSegRequested is received from the CIGI connection.

Passes on the request to performLineOfSightRequest.

virtual void makVrv::DtCigiIntersectionHandler::performLineOfSightRequest ( DtUniqueID  srcId,
const DtVector srcLocation,
DtUniqueID  dstId,
const DtVector dstLocation,
int  losId,
int  hostFrame 
)
protectedvirtual

Performs the line of sigh calculation and calls generateLosResponse on the DtCigiDriver, which will (possibly) put it on the simulation function queue, telling the DtCigiConnection to queue up the response and send it the next time it sends CIGI messages.

Parameters
srcIdThe unique ID of the source entity used in calculations. If this is 0, a database location is used in the calculation.
srcLocationThe database location of the source location, or entity offset if the srcId is 0.
dstIdThe unique ID of the source entity used in calculations. If this is 0, a database location is used in the calculation.
dstLocationThe database location of the source location, or entity offset if the srcId is 0.
losIdThe LOS ID to respond with.
hostFrameThe last host frame received before the calculation takes place
virtual void makVrv::DtCigiIntersectionHandler::setDatabaseCoordinateFromEntity ( DtUniqueID  entity,
const DtVector entityCoord,
DtVector databaseCoord 
)
protectedvirtual

Looks up the entity and uses the entity coordinates to calculate the database coordinate.

Parameters
entityThe unique ID of the entity.
entityCoordThe entity coordinates (X out the front, Y out the right, Z down)
databaseCoordFilled in with the database coordinate.
virtual double makVrv::DtCigiIntersectionHandler::groundHeight ( const DtVector currentLocal,
bool foundIntersection 
)
protectedvirtual

Calculates the height of the terrain below currentLocal.

Parameters
currentLocalThe point in database coordinates.
foundIntersectionSet to true if an intersection exists, false otherwise.
Returns
The height of the terrain.
virtual void makVrv::DtCigiIntersectionHandler::generateLosResponse ( int  losId,
DtUniqueID  entityId,
bool  visible,
double  range,
int  responseCount,
int  hostFrame 
)
protectedvirtual

Generate a line-of-sight response.

Calls DtLosResponder::generateLosResponse directly if the driver is in a single thread or queue the response on myConnectionThreadFunctions queue if run in a separate thread.

Parameters
losIdThe ID of the LOS response
entityIdThe unique ID of the entity that was intersected
visibleSet to true if there were no intersection
rangeDistance from the source before an intersection was hit.
responseCountThe number of intersections made with the request.
hostFrameThe last host frame when the calculation was made.
virtual void makVrv::DtCigiIntersectionHandler::generateHatHotResponse ( double  height,
unsigned int  hotId,
bool  hat,
unsigned int  lastFrame,
bool  valid 
)
protectedvirtual

Generate a line-of-sight response.

Calls DtCigiConnection::sendHatHotResponse directly if the driver is in a single thread or queue the response on myConnectionThreadFunctions queue if run in a separate thread.

Parameters
heightThe HAT/HOT
hotIdThe ID of the HAT/HOT response
hatHAT if true, HOT if false
lastFrameThe last host frame when the calculation was made.
validTrue if an intersection was made

Friends And Related Function Documentation

friend class DtCigiIntersectionHandlerCreator
friend

Member Data Documentation

DtDe& makVrv::DtCigiIntersectionHandler::myDe
protected
DtCigiConnection& makVrv::DtCigiIntersectionHandler::myCigiConnection
protected
DtSignalConnectionManager makVrv::DtCigiIntersectionHandler::myConnections
protected

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

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)