VR-Forces 4.0.4 Class Documentation
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
DtAutoAggregateDisaggregateController Class Reference

End User Description: This controller is active only if auto aggregation is enabled for the simulation engine. More...

Inheritance diagram for DtAutoAggregateDisaggregateController:
Inheritance graph
[legend]

List of all members.

Public Types

enum  DtResolutionTransitionMode { DtNotTransitioning, DtDisaggregating, DtAggregating }
typedef enum
DtAutoAggregateDisaggregateController::DtResolutionTransitionMode 
DtResolutionTransitionMode

Public Member Functions

 DtAutoAggregateDisaggregateController (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=NULL, DtReaderWriterRegistry *parentRegistry=0)
 constructor
virtual ~DtAutoAggregateDisaggregateController ()
 destructor
virtual bool init ()
 Calls createPSR()
virtual DtString type () const
 This returns the string DtAutoAggregateDisaggregateControllerType (defined above), used to uniquely identify the type of component.
virtual void tick ()
 Update control values.

Static Public Member Functions

static void settingConsumerCallback (const DtSettingsObject *settingsObject, void *usr)
 Callback for handling changes to the automatic aggregation/disaggregation mode setting.
static DtSimComponentcreator (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc, DtReaderWriterRegistry *parentRegistry)
 This is called by the factory.

Protected Member Functions

virtual void startAutoAggregating ()
virtual bool autoAggregatingIsComplete ()
virtual void onAutoAggregationComplete ()
virtual void startAutoDisaggregation ()
virtual bool autoDisaggregatingIsComplete ()
virtual void onAutoDisaggregationComplete ()
virtual bool insideDisaggregationArea () const
 Returns true if there are no intersections between the aggregates bounding box *with any high-res area, false otherwise.
virtual bool withinDisaggregationDistanceOfHostileEntity () const
 Returns true if within disaggregation distance with at least one individual entity.
virtual void processSetting (const DtBoolSetting *setting)
 Sets myAutoAggregationDisaggrationEnabled with value in setting.
virtual void sendAggregateStateRequest (DtAggregateState aggregateState)
 Send aggregate state request to ourself.
 DtAutoAggregateDisaggregateController (const DtAutoAggregateDisaggregateController &orig)
 copy constructor - not implemented
DtAutoAggregateDisaggregateControlleroperator= (const DtAutoAggregateDisaggregateController &orig)
 assignment operator - not implemented
virtual bool shouldDisaggregate () const
virtual bool shouldAggregate () const
virtual bool autoAggregationDisaggregationEnabled () const
virtual void initLocalToAggregateCoordTransform (const DtVector &aggregateLocalPostion, double aggregateHeading, DtCoordTransform &resultTransform) const
 Initializes local-to-aggregate transform, taking just heading into account.
virtual DtManagedObjectListConstPtr disaggregationAreas () const
virtual void initBodyToLocalTransform (const DtVector &localPosition, const DtDcm &localToBodyDcm, DtCoordTransform &bodyToLocalTransform) const
virtual void initLocalToTopoTransform (const DtVector &localPosition, DtCoordTransform &transform) const
virtual void getAggregatedFootprint (const DtCoordTransform &bodyToLocalTransform, const DtCoordTransform &localToTopoTranform, DtPolygon2D::DtVertexContainer &vertices) const
void getDisaggregatedFootprint (const DtCoordTransform &bodyToLocalTransform, const DtCoordTransform &localToTopoTransform, DtPolygon2D::DtVertexContainer &vertices) const
void getTranslatedFootprint (double halfLength, double halfWidth, double halfHeight, const DtCoordTransform &bodyToLocalTransform, const DtCoordTransform &localToTopoTransform, DtPolygon2D::DtVertexContainer &vertices) const
virtual void getLocalAreaFootprint (const DtVrfObject &object, const DtCoordTransform &localToTopoTransform, DtPolygon2D::DtVertexContainer &vertices) const
virtual DtManagedObjectListConstPtr getHostileEntityList () const
virtual DtManagedObjectListConstPtr getHostileAggregateList () const
virtual bool withinDisaggregationDistance (const DtVrfObject &target) const
virtual double maxDisaggregationDistance (const DtVrfObject &target) const

Protected Attributes

DtVrfObjectManagermyObjectManager
DtVrfAggregateStateRepositorymyAggregateStateRepository
DtResolutionTransitionMode myTransitionMode
bool myAutoAggregationDisaggrationEnabled
 Flag indicating whether or not automatic aggregation/disaggregation is enabled.
DtVrfObjectmyAggregatedFootprintDebuggingObject
 for debugging
DtVrfObjectmyDisaggregatedFootprintDebuggingObject
DtManagedObjectListConstPtr myHostileAggregateList
DtManagedObjectListConstPtr myHostileEntityList
DtManagedObjectListConstPtr myDisaggregationAreasList

Detailed Description

End User Description: This controller is active only if auto aggregation is enabled for the simulation engine.

If so, this controller monitors the auto-aggregation triggers, such as the entities overlap with disaggregation areas, and proximity to hostile forces. This controller sends DtSetAggregateState to change the aggregation state of the object. Uses Descriptor Type: DtComponentDescriptor


Member Typedef Documentation


Member Enumeration Documentation

Enumerator:
DtNotTransitioning 
DtDisaggregating 
DtAggregating 

Constructor & Destructor Documentation

constructor

destructor

copy constructor - not implemented


Member Function Documentation

Calls createPSR()

Reimplemented from DtControllerComponent.

This returns the string DtAutoAggregateDisaggregateControllerType (defined above), used to uniquely identify the type of component.

Reimplemented from DtControllerComponent.

virtual void DtAutoAggregateDisaggregateController::tick ( ) [virtual]

Update control values.

Reimplemented from DtSimComponent.

static void DtAutoAggregateDisaggregateController::settingConsumerCallback ( const DtSettingsObject settingsObject,
void *  usr 
) [static]

Callback for handling changes to the automatic aggregation/disaggregation mode setting.

Calls processSetting.

static DtSimComponent* DtAutoAggregateDisaggregateController::creator ( const DtString name,
DtVrfObject owner,
DtSimManager simManager,
DtComponentDescriptor desc,
DtReaderWriterRegistry parentRegistry 
) [static]

This is called by the factory.

virtual void DtAutoAggregateDisaggregateController::startAutoAggregating ( ) [protected, virtual]

Returns true if there are no intersections between the aggregates bounding box *with any high-res area, false otherwise.

Returns true if within disaggregation distance with at least one individual entity.

virtual void DtAutoAggregateDisaggregateController::processSetting ( const DtBoolSetting setting) [protected, virtual]

Sets myAutoAggregationDisaggrationEnabled with value in setting.

virtual void DtAutoAggregateDisaggregateController::sendAggregateStateRequest ( DtAggregateState  aggregateState) [protected, virtual]

Send aggregate state request to ourself.

DtAutoAggregateDisaggregateController& DtAutoAggregateDisaggregateController::operator= ( const DtAutoAggregateDisaggregateController orig) [protected]

assignment operator - not implemented

virtual bool DtAutoAggregateDisaggregateController::shouldDisaggregate ( ) const [protected, virtual]
virtual bool DtAutoAggregateDisaggregateController::shouldAggregate ( ) const [protected, virtual]
virtual void DtAutoAggregateDisaggregateController::initLocalToAggregateCoordTransform ( const DtVector aggregateLocalPostion,
double  aggregateHeading,
DtCoordTransform &  resultTransform 
) const [protected, virtual]

Initializes local-to-aggregate transform, taking just heading into account.

virtual void DtAutoAggregateDisaggregateController::initBodyToLocalTransform ( const DtVector localPosition,
const DtDcm &  localToBodyDcm,
DtCoordTransform &  bodyToLocalTransform 
) const [protected, virtual]
virtual void DtAutoAggregateDisaggregateController::initLocalToTopoTransform ( const DtVector localPosition,
DtCoordTransform &  transform 
) const [protected, virtual]
virtual void DtAutoAggregateDisaggregateController::getAggregatedFootprint ( const DtCoordTransform &  bodyToLocalTransform,
const DtCoordTransform &  localToTopoTranform,
DtPolygon2D::DtVertexContainer vertices 
) const [protected, virtual]
void DtAutoAggregateDisaggregateController::getDisaggregatedFootprint ( const DtCoordTransform &  bodyToLocalTransform,
const DtCoordTransform &  localToTopoTransform,
DtPolygon2D::DtVertexContainer vertices 
) const [protected]
void DtAutoAggregateDisaggregateController::getTranslatedFootprint ( double  halfLength,
double  halfWidth,
double  halfHeight,
const DtCoordTransform &  bodyToLocalTransform,
const DtCoordTransform &  localToTopoTransform,
DtPolygon2D::DtVertexContainer vertices 
) const [protected]
virtual void DtAutoAggregateDisaggregateController::getLocalAreaFootprint ( const DtVrfObject object,
const DtCoordTransform &  localToTopoTransform,
DtPolygon2D::DtVertexContainer vertices 
) const [protected, virtual]
virtual bool DtAutoAggregateDisaggregateController::withinDisaggregationDistance ( const DtVrfObject target) const [protected, virtual]
virtual double DtAutoAggregateDisaggregateController::maxDisaggregationDistance ( const DtVrfObject target) const [protected, virtual]
Returns:
Compares target's max disaggregation distance parameter with our aggregate's value for max disaggregation distance, and returns whichever value is larger.

Member Data Documentation

Flag indicating whether or not automatic aggregation/disaggregation is enabled.

Default is false.

for debugging


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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)