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 | Protected Member Functions | Protected Attributes | Friends
makVrv::DtCigiIntersectionHandler Class Reference

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

Public Member Functions

virtual ~DtCigiIntersectionHandler ()
 Destructor. More...
 

Protected Member Functions

 DtCigiIntersectionHandler (DtDe &de, DtCigiConnection &connection)
 Constructor. More...
 
virtual void slot_onHatHotRequest (const DtHatHotResponder::DtHatHotRequestData &request)
 Slot called when signal_hatHotRequested is received from the CIGI connection. More...
 
virtual void performHatHotRequest (const DtHatHotResponder::DtHatHotRequestData &request)
 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. More...
 
virtual void slot_lineOfSightCheckRequest (DtCigiLosRequest *request, bool takeOwnership)
 Slot called when signal_losSegRequested is received from the CIGI connection. More...
 
virtual void performLineOfSightRequest (DtCigiLosRequest *request, bool takeOwnership)
 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. More...
 
virtual void slot_onCollisionSegmentCheckRequest (DtCollisionResponder::DtCollisionSegmentDefinitionData *request)
 Slot called when signal_collisionSegmentCheckRequest is called from collision handler. More...
 
virtual void performCollisionSegmentRequest (DtCollisionResponder::DtCollisionSegmentDefinitionData *request)
 Performs intersection request with a line segment and generates collision segment responses based on intersections Called from performCollisionSegmentRequest, and calls generateCollisionSegmentResponse This method runs in the render thread if DtCigiConnection is running in a thread. More...
 
virtual void setDatabaseCoordinateFromEntity (DtUniqueID entity, const DtVector &entityCoord, DtVector &databaseCoord)
 Looks up the entity and uses the entity coordinates to calculate the database coordinate. More...
 
virtual void setEntityCoordinateFromDatabase (DtUniqueID entity, const DtVector &databaseCoord, DtVector &entityCoord)
 Looks up the entity and uses the entity's position and orientation to transformn the database coordinate into the entity's coordinate system. More...
 
virtual void setGeodeticCoordinateFromDatabase (const DtVector &from, DtGeodeticCoord &to)
 Utility function sets a geodetic coordinate from a database coordinate. More...
 
virtual void getNormalAzAndEl (const DtVector &databaseCoord, const DtVector &normal, float &normalAz, float &normalEl)
 Get the azimuth and elevation of the supplied normal wrt north and up. More...
 
virtual double groundHeight (const DtVector &currentLocal, bool &foundIntersection)
 Calculates the height of the terrain below currentLocal. More...
 
virtual double groundHeightExtended (const DtVector &currentLocal, bool &foundIntersection, float &normalAzimuth, float &normalElevation, int &elementType)
 Calculates the height of the terrain below currentLocal. More...
 
virtual void generateLosBasicResponse (DtCigiLosBasicResponse *losResponse)
 Generate a line-of-sight basic response. More...
 
virtual void generateLosExtendedResponse (DtCigiLosExtendedResponse *losResponse)
 Generate a line-of-sight extended response. More...
 
virtual void generateHatHotResponse (const DtHatHotResponder::DtHatHotResponseData *hatHotReponse)
 Generate a line-of-sight response. More...
 
virtual void generateCollisionSegmentResponse (DtCollisionResponder::DtCollisionSegmentResponseData &collResponse)
 Generate the collision segment response. More...
 
virtual DtCigiLosBasicResponsecreateBasicResponse (const DtVector &start, DtIntersectorResult &result, unsigned int respCount, DtCigiLosRequest *req)
 
virtual DtCigiLosBasicResponsecreateBasicNoIsectResponse (DtCigiLosRequest *req)
 
virtual DtCigiLosExtendedResponsecreateExtendedResponse (const DtVector &start, DtIntersectorResult &result, unsigned int respCount, DtCigiLosRequest *req)
 
virtual DtCigiLosExtendedResponsecreateExtendedNoIsectResponse (DtCigiLosRequest *req)
 

Protected Attributes

DtDemyDe
 
DtCigiConnectionmyCigiConnection
 
DtSignalConnectionManager myConnections
 

Friends

class DtCigiIntersectionHandlerCreator
 

Detailed Description

This class handles all of the intersection processing for HAT/HOT, LOS , and Collision segment 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 ( const DtHatHotResponder::DtHatHotRequestData request)
protectedvirtual

Slot called when signal_hatHotRequested is received from the CIGI connection.

Passes on the request to performHatHotRequest.

virtual void makVrv::DtCigiIntersectionHandler::performHatHotRequest ( const DtHatHotResponder::DtHatHotRequestData request)
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.

virtual void makVrv::DtCigiIntersectionHandler::slot_lineOfSightCheckRequest ( DtCigiLosRequest request,
bool  takeOwnership 
)
protectedvirtual

Slot called when signal_losSegRequested is received from the CIGI connection.

Passes on the request to performLineOfSightRequest.

virtual void makVrv::DtCigiIntersectionHandler::performLineOfSightRequest ( DtCigiLosRequest request,
bool  takeOwnership 
)
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::slot_onCollisionSegmentCheckRequest ( DtCollisionResponder::DtCollisionSegmentDefinitionData request)
protectedvirtual

Slot called when signal_collisionSegmentCheckRequest is called from collision handler.

Passes request to performCollisionSegmentRequest. Will queue performCollisionSegmentRequest up for the render thread if using thread

virtual void makVrv::DtCigiIntersectionHandler::performCollisionSegmentRequest ( DtCollisionResponder::DtCollisionSegmentDefinitionData request)
protectedvirtual

Performs intersection request with a line segment and generates collision segment responses based on intersections Called from performCollisionSegmentRequest, and calls generateCollisionSegmentResponse This method runs in the render thread if DtCigiConnection is running in a thread.

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 void makVrv::DtCigiIntersectionHandler::setEntityCoordinateFromDatabase ( DtUniqueID  entity,
const DtVector databaseCoord,
DtVector entityCoord 
)
protectedvirtual

Looks up the entity and uses the entity's position and orientation to transformn the database coordinate into the entity's coordinate system.

Parameters
entityThe unique ID of the entity.
databaseCoordThe coordinate to transform
entityCoordThe result in entity coordinates
virtual void makVrv::DtCigiIntersectionHandler::setGeodeticCoordinateFromDatabase ( const DtVector from,
DtGeodeticCoord &  to 
)
protectedvirtual

Utility function sets a geodetic coordinate from a database coordinate.

virtual void makVrv::DtCigiIntersectionHandler::getNormalAzAndEl ( const DtVector databaseCoord,
const DtVector normal,
float &  normalAz,
float &  normalEl 
)
protectedvirtual

Get the azimuth and elevation of the supplied normal wrt north and up.

If the database is geocentric, create a topo system at the location of the databaseCoord; otherwise it can be ignored, as the normal is already wrt north and up

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 double makVrv::DtCigiIntersectionHandler::groundHeightExtended ( const DtVector currentLocal,
bool foundIntersection,
float &  normalAzimuth,
float &  normalElevation,
int elementType 
)
protectedvirtual

Calculates the height of the terrain below currentLocal.

Parameters
currentLocalThe point in database coordinates.
foundIntersectionSet to true if an intersection exists, false otherwise.
normalAzimuthif there is an intersection is set to the insects normal az
normalElevationif there is an intersection is set to the insects normal elev
elementTypeset if intersection, best we can do for cigi material code
Returns
The height of the terrain.
virtual void makVrv::DtCigiIntersectionHandler::generateLosBasicResponse ( DtCigiLosBasicResponse losResponse)
protectedvirtual

Generate a line-of-sight basic response.

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

Parameters
losResponsePointer to the info needed to construct a CIGI los response packet
virtual void makVrv::DtCigiIntersectionHandler::generateLosExtendedResponse ( DtCigiLosExtendedResponse losResponse)
protectedvirtual

Generate a line-of-sight extended response.

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

Parameters
losResponsePointer to the info needed to construct a CIGI los response packet
virtual void makVrv::DtCigiIntersectionHandler::generateHatHotResponse ( const DtHatHotResponder::DtHatHotResponseData hatHotReponse)
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.

virtual void makVrv::DtCigiIntersectionHandler::generateCollisionSegmentResponse ( DtCollisionResponder::DtCollisionSegmentResponseData collResponse)
protectedvirtual

Generate the collision segment response.

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

virtual DtCigiLosBasicResponse* makVrv::DtCigiIntersectionHandler::createBasicResponse ( const DtVector start,
DtIntersectorResult result,
unsigned int  respCount,
DtCigiLosRequest req 
)
protectedvirtual
virtual DtCigiLosBasicResponse* makVrv::DtCigiIntersectionHandler::createBasicNoIsectResponse ( DtCigiLosRequest req)
protectedvirtual
virtual DtCigiLosExtendedResponse* makVrv::DtCigiIntersectionHandler::createExtendedResponse ( const DtVector start,
DtIntersectorResult result,
unsigned int  respCount,
DtCigiLosRequest req 
)
protectedvirtual
virtual DtCigiLosExtendedResponse* makVrv::DtCigiIntersectionHandler::createExtendedNoIsectResponse ( DtCigiLosRequest req)
protectedvirtual

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 Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)