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

A DtEnvironmentalIconCenteringUpdater updates the attached scene object to be centered in the center of mass of a closed area or along the center of the line of an unclosed area. More...

Inheritance diagram for makVrv::DtEnvironmentalIconCenteringUpdater:
Inheritance graph
[legend]

Public Member Functions

 DtEnvironmentalIconCenteringUpdater (DtDe &de, DtUniqueID id)
 CTOR.
virtual ~DtEnvironmentalIconCenteringUpdater ()
 DTOR.
virtual bool needsUpdate (DtTime tNow)
 Does this updater need to update?
virtual void update (DtTime tNow)
 Calls centerIcon()
virtual void setSceneObject (DtSceneObject *sceneObject)
 Set the scene object to be updated.
virtual void setEnvironmentalSceneObject (DtSceneObject *sceneObject)
 Set the scene object that contains the original environmental (line or area).
virtual void setOrderGroup (int)
 Sets the z order on which to place the icons.
- Public Member Functions inherited from makVrv::DtTickable
virtual ~DtTickable ()
 Virtual DTOR.

Protected Member Functions

virtual void centerIcon ()
 Find the actual position and orientation based on the attach points and offsets.
virtual DtVector calculateGeometricCenter () const
 Calculates the geometric center of the polygonal area.
virtual DtVector calculateLineCenter () const
 Calculates the point on the center of the line given the line distance.
virtual DtVector centerOnLine (int startIndex, int endIndex, double lengthOnLine) const
 Centers the point on the given line segment.
Slots

Called when an object is to be deleted

virtual void slot_sceneObjectToBeDeleted (const DtUniqueID &id)
 Called when a model is added to the scene object.
virtual void slot_modelAdded (DtModel *)
 Called when a model is added to the scene object.
virtual void slot_modelRemoved (DtModel *)
 Called when a model is removed from the scene object.
- Protected Member Functions inherited from makVrv::DtTickable
 DtTickable (DtTickableManagerInterface *manager)
 CTOR.
 DtTickable ()
 Unimplemented default CTOR.

Protected Attributes

DtDemyDe
 The display engine.
DtUniqueID myUniqueId
 This distributed object's unique identifier.
DtSceneObjectmySceneObject
 A pointer to the current scene object being updated.
DtPolygonModelmyEnvironmentalPolygonModel
 A pointer to the current environmental model object.
DtLineModelmyEnvironmentalLineModel
DtSceneObjectmyEnvironmentalSceneObject
 A pointer tothe current environmental scene object agent.
std::vector< DtVectormyPoints
 Points that were last used for calculation.
int myOrderGroup
bool myUpdate
- Protected Attributes inherited from makVrv::DtTickable
DtTickableManagerInterfacemyManager
 Pointer to manager for removal during destruction.

Detailed Description

A DtEnvironmentalIconCenteringUpdater updates the attached scene object to be centered in the center of mass of a closed area or along the center of the line of an unclosed area.

Setting the control points or whether or not an item is closed will cause a recalculation of the center

Constructor & Destructor Documentation

makVrv::DtEnvironmentalIconCenteringUpdater::DtEnvironmentalIconCenteringUpdater ( DtDe de,
DtUniqueID  id 
)

CTOR.

virtual makVrv::DtEnvironmentalIconCenteringUpdater::~DtEnvironmentalIconCenteringUpdater ( )
virtual

DTOR.

Member Function Documentation

virtual bool makVrv::DtEnvironmentalIconCenteringUpdater::needsUpdate ( DtTime  tNow)
virtual

Does this updater need to update?

Implements makVrv::DtTickable.

virtual void makVrv::DtEnvironmentalIconCenteringUpdater::update ( DtTime  tNow)
virtual

Calls centerIcon()

Implements makVrv::DtTickable.

virtual void makVrv::DtEnvironmentalIconCenteringUpdater::setSceneObject ( DtSceneObject sceneObject)
virtual

Set the scene object to be updated.

Parameters
[in]sceneObjectis the scene object to receive updates.
virtual void makVrv::DtEnvironmentalIconCenteringUpdater::setEnvironmentalSceneObject ( DtSceneObject sceneObject)
virtual

Set the scene object that contains the original environmental (line or area).

Parameters
[in]sceneObjectis the scene object to look at for positional changes.
virtual void makVrv::DtEnvironmentalIconCenteringUpdater::setOrderGroup ( int  )
virtual

Sets the z order on which to place the icons.

virtual void makVrv::DtEnvironmentalIconCenteringUpdater::centerIcon ( )
protectedvirtual

Find the actual position and orientation based on the attach points and offsets.

virtual DtVector makVrv::DtEnvironmentalIconCenteringUpdater::calculateGeometricCenter ( ) const
protectedvirtual

Calculates the geometric center of the polygonal area.

virtual DtVector makVrv::DtEnvironmentalIconCenteringUpdater::calculateLineCenter ( ) const
protectedvirtual

Calculates the point on the center of the line given the line distance.

virtual DtVector makVrv::DtEnvironmentalIconCenteringUpdater::centerOnLine ( int  startIndex,
int  endIndex,
double  lengthOnLine 
) const
protectedvirtual

Centers the point on the given line segment.

virtual void makVrv::DtEnvironmentalIconCenteringUpdater::slot_sceneObjectToBeDeleted ( const DtUniqueID id)
protectedvirtual

Called when a model is added to the scene object.

virtual void makVrv::DtEnvironmentalIconCenteringUpdater::slot_modelAdded ( DtModel )
protectedvirtual

Called when a model is added to the scene object.

virtual void makVrv::DtEnvironmentalIconCenteringUpdater::slot_modelRemoved ( DtModel )
protectedvirtual

Called when a model is removed from the scene object.

Member Data Documentation

DtDe& makVrv::DtEnvironmentalIconCenteringUpdater::myDe
protected

The display engine.

DtUniqueID makVrv::DtEnvironmentalIconCenteringUpdater::myUniqueId
protected

This distributed object's unique identifier.

DtSceneObject* makVrv::DtEnvironmentalIconCenteringUpdater::mySceneObject
protected

A pointer to the current scene object being updated.

DtPolygonModel* makVrv::DtEnvironmentalIconCenteringUpdater::myEnvironmentalPolygonModel
protected

A pointer to the current environmental model object.

Only one may be valid, however, both pointers are around for convenience

DtLineModel* makVrv::DtEnvironmentalIconCenteringUpdater::myEnvironmentalLineModel
protected
DtSceneObject* makVrv::DtEnvironmentalIconCenteringUpdater::myEnvironmentalSceneObject
protected

A pointer tothe current environmental scene object agent.

std::vector<DtVector> makVrv::DtEnvironmentalIconCenteringUpdater::myPoints
protected

Points that were last used for calculation.

int makVrv::DtEnvironmentalIconCenteringUpdater::myOrderGroup
protected
bool makVrv::DtEnvironmentalIconCenteringUpdater::myUpdate
protected

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

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)