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

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

Classes

struct  DtCollisionSegmentDefinitionData
 Struct for Cigi Collision Request Data. More...
 
struct  DtCollisionSegmentResponseData
 Struct for Collision Response Data. More...
 

Public Types

enum  CollisionTypeEnum { Entity = 0, NonEntity }
 

Public Member Functions

virtual ~DtCollisionResponder ()
 Destructor. More...
 
virtual void processCollisionDetectionSegmentDefinitions ()
 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. More...
 
void enableCollisionSegmentDefinitions (const std::list< unsigned int > &segmentIdList)
 Enables and disables a list of segment IDs that are located in myCollisionSegmentDefinitions. More...
 
void disableCollisionSegmentDefinitions (const std::list< unsigned int > &segmentIdList)
 
void deleteSegmentDefinitions (const std::list< unsigned int > &segmentIdList)
 Delete the list of segments IDs from the myCollisionSegmentDefinitions map Called when entities are destroyed. More...
 
virtual void generateCollisionSegmentResponse (DtCollisionSegmentResponseData &collResponse)
 Makes a call to the DtCigiConnection to send out a collision segment response Converts IDs if required from DtUnique to CIGI or DIS. More...
 

Public Attributes

boost::signal< void(DtCollisionSegmentDefinitionData *)> signal_collisionSegmentCheckRequest
 Signal to Intersection Handler. More...
 

Protected Member Functions

 DtCollisionResponder (DtCigiConnection &connection)
 Constructor. More...
 
void processCollisionDetectionSegmentDefinition (CigiBaseCollDetSegDef &collSegReq)
 Connected to signal_collisionDetectionSegmentDefinitionReceived Processes base cigi packet requests into version specific methods. More...
 
void processCollDetSegDefReqV3 (CigiCollDetSegDefV3 &collDetDef)
 V3 Takes Cigi Collision Detection Segment Definition and adds it to the map for processing. More...
 
void processCollDetSegDefReqV4 (CigiCollDetSegDefV4 &collDetDef)
 V4 Takes Cigi Collision Detection Segment Definition and adds it to the map for processing. More...
 
void sendCollisionDetectionSegmentDefinition (DtCollisionSegmentDefinitionData &collSegData)
 Send the Collision Detection Definition to the intersection handler, as it has access to the render thread. More...
 

Protected Attributes

DtCigiConnectionmyConnection
 
std::map< unsigned int,
DtCollisionSegmentDefinitionData
myCollisionSegmentDefinitions
 Map for Collision Detection Segment Definitions CigiConnection calls processCollisionDetectionSegmentDefinitions to process this map. More...
 

Private Member Functions

DtCollisionResponderoperator= (const DtCollisionResponder &orig)
 (Unimplemented) Assignment Operator More...
 
 DtCollisionResponder (const DtCollisionResponder &orig)
 (Unimplemented) Copy CTOR More...
 

Friends

class DtCollisionResponderCreator
 

Detailed Description

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.

Member Enumeration Documentation

Enumerator
Entity 
NonEntity 

Constructor & Destructor Documentation

virtual makVrv::DtCollisionResponder::~DtCollisionResponder ( )
virtual

Destructor.

makVrv::DtCollisionResponder::DtCollisionResponder ( DtCigiConnection connection)
protected

Constructor.

makVrv::DtCollisionResponder::DtCollisionResponder ( const DtCollisionResponder orig)
private

(Unimplemented) Copy CTOR

Member Function Documentation

virtual void makVrv::DtCollisionResponder::processCollisionDetectionSegmentDefinitions ( )
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 void makVrv::DtCollisionResponder::generateCollisionSegmentResponse ( DtCollisionSegmentResponseData collResponse)
virtual

Makes a call to the DtCigiConnection to send out a collision segment response Converts IDs if required from DtUnique to CIGI or DIS.

void makVrv::DtCollisionResponder::processCollisionDetectionSegmentDefinition ( CigiBaseCollDetSegDef &  collSegReq)
protected

Connected to signal_collisionDetectionSegmentDefinitionReceived Processes base cigi packet requests into version specific methods.

void makVrv::DtCollisionResponder::processCollDetSegDefReqV3 ( CigiCollDetSegDefV3 &  collDetDef)
protected

V3 Takes Cigi Collision Detection Segment Definition and adds it to the map for processing.

void makVrv::DtCollisionResponder::processCollDetSegDefReqV4 ( CigiCollDetSegDefV4 &  collDetDef)
protected

V4 Takes Cigi Collision Detection Segment Definition and adds it to the map for processing.

void makVrv::DtCollisionResponder::sendCollisionDetectionSegmentDefinition ( DtCollisionSegmentDefinitionData collSegData)
protected

Send the Collision Detection Definition to the intersection handler, as it has access to the render thread.

DtCollisionResponder& makVrv::DtCollisionResponder::operator= ( const DtCollisionResponder orig)
private

(Unimplemented) Assignment Operator

Friends And Related Function Documentation

friend class DtCollisionResponderCreator
friend

Member Data Documentation

boost::signal<void( DtCollisionSegmentDefinitionData* )> makVrv::DtCollisionResponder::signal_collisionSegmentCheckRequest

Signal to Intersection Handler.

DtCigiConnection& makVrv::DtCollisionResponder::myConnection
protected
std::map<unsigned int, DtCollisionSegmentDefinitionData> makVrv::DtCollisionResponder::myCollisionSegmentDefinitions
protected

Map for Collision Detection Segment Definitions CigiConnection calls processCollisionDetectionSegmentDefinitions to process this map.

Signals are sent to Intersection handler to check for collisions.


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

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)