![]() |
VR-Forces 5.0.2 Developer's Guide
|
This class handles the processing of Collision Segment Defintion packets It catches signals from DtCigiSignalProcessor with CigiBaseCollDetSegDef packets, and splits processing into version specific (V3 & V4) methods. Signals are raised for the DtCigiIntersectionHandler to catch and process, as it has access to the render thread and this class does not. The Collision Response Data struct is declared in this class for tidyness, it is not used here, it is utilised by the DtCigiIntersectionHandler. This class does not call sendCollisionDetectionSegmentDefinition, as all collision segment responses are continuous. Instead the DtCigiConnection calls this class's process method to process the map of Collision Segment definitions, which are then sent to the Intersection handler. Cigi Entities contain a list of segment definitions associated with them, this class adds/removes from those lists, and segments are deleted from from the map in this class when entities are destroyed. Note that if packets are received with the same segment ID they are over overwritten. A segment ID will exist with an entity even if the segment is disabled, until it is over written or that entity is destroyed. ** As we do not support the Collision Reporting Enable flag on entities, collision segments must be turned off manually, or set the entity to invisible.
Classes | |
| struct | DtCollisionSegmentDefinitionData |
| struct | DtCollisionSegmentResponseData |
Public Types | |
| enum | CollisionTypeEnum { Entity = 0, NonEntity } |
Public Member Functions | |
| virtual | ~DtCollisionResponder () |
| virtual void | processCollisionDetectionSegmentDefinitions () |
| void | enableCollisionSegmentDefinitions (const std::list< unsigned int > &segmentIdList) |
| void | disableCollisionSegmentDefinitions (const std::list< unsigned int > &segmentIdList) |
| void | deleteSegmentDefinitions (const std::list< unsigned int > &segmentIdList) |
| virtual void | generateCollisionSegmentResponse (DtCollisionSegmentResponseData &collResponse) |
Public Attributes | |
| boost::signalslib::signal < void(DtCollisionSegmentDefinitionData *)> | signal_collisionSegmentCheckRequest |
Protected Member Functions | |
| DtCollisionResponder (DtCigiConnection &connection) | |
| void | processCollisionDetectionSegmentDefinition (CigiBaseCollDetSegDef &collSegReq) |
| void | processCollDetSegDefReqV3 (CigiCollDetSegDefV3 &collDetDef) |
| void | processCollDetSegDefReqV4 (CigiCollDetSegDefV4 &collDetDef) |
| void | sendCollisionDetectionSegmentDefinition (DtCollisionSegmentDefinitionData &collSegData) |
Protected Attributes | |
| DtCigiConnection & | myConnection |
| std::map< unsigned int, DtCollisionSegmentDefinitionData > | myCollisionSegmentDefinitions |
Private Member Functions | |
| DtCollisionResponder & | operator= (const DtCollisionResponder &orig) |
| DtCollisionResponder (const DtCollisionResponder &orig) | |
Friends | |
| class | DtCollisionResponderCreator |
|
virtual |
Destructor.
|
protected |
Constructor.
|
private |
(Unimplemented) Copy CTOR
|
virtual |
Process Collision Segment Definitions that have been requested Check performed each frame for all definitions Signals are sent to Intersection handler to check for collisions. May need threaded for large volumes // TODO?
| void makVrv::DtCollisionResponder::enableCollisionSegmentDefinitions | ( | const std::list< unsigned int > & | segmentIdList | ) |
Enables and disables a list of segment IDs that are located in myCollisionSegmentDefinitions. These are called by entities when they are set to inactive/active.
| void makVrv::DtCollisionResponder::disableCollisionSegmentDefinitions | ( | const std::list< unsigned int > & | segmentIdList | ) |
| void makVrv::DtCollisionResponder::deleteSegmentDefinitions | ( | const std::list< unsigned int > & | segmentIdList | ) |
Delete the list of segments IDs from the myCollisionSegmentDefinitions map Called when entities are destroyed.
|
virtual |
Makes a call to the DtCigiConnection to send out a collision segment response Converts IDs if required from DtUnique to CIGI or DIS.
|
protected |
Connected to signal_collisionDetectionSegmentDefinitionReceived Processes base cigi packet requests into version specific methods.
|
protected |
V3 Takes Cigi Collision Detection Segment Definition and adds it to the map for processing.
|
protected |
V4 Takes Cigi Collision Detection Segment Definition and adds it to the map for processing.
|
protected |
Send the Collision Detection Definition to the intersection handler, as it has access to the render thread.
|
private |
(Unimplemented) Assignment Operator
|
friend |
| boost::signalslib::signal<void( DtCollisionSegmentDefinitionData* )> makVrv::DtCollisionResponder::signal_collisionSegmentCheckRequest |
Signal to Intersection Handler.
|
protected |
|
protected |
Map for Collision Detection Segment Definitions CigiConnection calls processCollisionDetectionSegmentDefinitions to process this map. Signals are sent to Intersection handler to check for collisions.