![]() |
VR-Forces 4.0.4 Class Documentation
|
This class handles all of the intersection processing for HAT/HOT and LOS requests. More...
Public Member Functions | |
| DtCigiIntersectionHandler (DtDe &de, DtCigiDriver &driver, DtCigiConnection &connection, bool usingThread) | |
| Constructor. | |
| virtual | ~DtCigiIntersectionHandler () |
| Destructor. | |
Protected Member Functions | |
| 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 ¤tLocal, bool &foundIntersection) |
| Calculates the height of the terrain below currentLocal. | |
Protected Attributes | |
| DtDe & | myDe |
| DtCigiDriver & | myDriver |
| DtSignalConnectionManager | myConnections |
| bool | myUseThreadFlag |
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.
| makVrv::DtCigiIntersectionHandler::DtCigiIntersectionHandler | ( | DtDe & | de, |
| DtCigiDriver & | driver, | ||
| DtCigiConnection & | connection, | ||
| bool | usingThread | ||
| ) |
Constructor.
| virtual makVrv::DtCigiIntersectionHandler::~DtCigiIntersectionHandler | ( | ) | [virtual] |
Destructor.
| virtual void makVrv::DtCigiIntersectionHandler::slot_onHatHotRequest | ( | DtUniqueID | entityId, |
| const DtVector & | localPosition, | ||
| unsigned int | hotId, | ||
| bool | hatRequested, | ||
| unsigned int | lastHostFrameNumber | ||
| ) | [protected, virtual] |
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 | ||
| ) | [protected, virtual] |
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.
| entityId | The unique ID of the entity used in calculations. If this is 0, a database location is used in the calculation. |
| localPosition | The database location, or entity offset if the entityId is 0. |
| hotId | The HOT ID to respond with. |
| hatRequested | If true, calculates height above terrain. Calculates height of terrain if false. |
| lastHostFrameNumber | The 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 | ||
| ) | [protected, virtual] |
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 | ||
| ) | [protected, virtual] |
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.
| srcId | The unique ID of the source entity used in calculations. If this is 0, a database location is used in the calculation. |
| srcLocation | The database location of the source location, or entity offset if the srcId is 0. |
| dstId | The unique ID of the source entity used in calculations. If this is 0, a database location is used in the calculation. |
| dstLocation | The database location of the source location, or entity offset if the srcId is 0. |
| losId | The LOS ID to respond with. |
| hostFrame | The last host frame received before the calculation takes place |
| virtual void makVrv::DtCigiIntersectionHandler::setDatabaseCoordinateFromEntity | ( | DtUniqueID | entity, |
| const DtVector & | entityCoord, | ||
| DtVector & | databaseCoord | ||
| ) | [protected, virtual] |
Looks up the entity and uses the entity coordinates to calculate the database coordinate.
| entity | The unique ID of the entity. |
| entityCoord | The entity coordinates (X out the front, Y out the right, Z down) |
| databaseCoord | Filled in with the database coordinate. |
| virtual double makVrv::DtCigiIntersectionHandler::groundHeight | ( | const DtVector & | currentLocal, |
| bool & | foundIntersection | ||
| ) | [protected, virtual] |
Calculates the height of the terrain below currentLocal.
| currentLocal | The point in database coordinates. |
| foundIntersection | Set to true if an intersection exists, false otherwise. |
DtDe& makVrv::DtCigiIntersectionHandler::myDe [protected] |
DtCigiDriver& makVrv::DtCigiIntersectionHandler::myDriver [protected] |