VR-Forces 4.2 Class Documentation
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
makVrf::DtVrfCircleManipulationHandler Class Reference

The handler for creating and manipulating circles/ellipses. More...

Inheritance diagram for makVrf::DtVrfCircleManipulationHandler:
Inheritance graph
[legend]

Public Member Functions

 DtVrfCircleManipulationHandler (makVrv::DtDe &)
virtual ~DtVrfCircleManipulationHandler ()
virtual void setXRadius (double)
 Sets the xRadius of the circle. Will interally update the second point of the listener.
virtual void setXRadiusWithHeading (double, double)
 If heading is defined will use that when setting to X point to also rotate to that heading.
virtual double xRadius () const
virtual void setYRadius (double)
 Sets the yRadius of the circle. Will internally update the third point of the listener.
virtual double yRadius () const
virtual void setHeading (double)
 Sets the orientation of the circle.
virtual double heading () const
virtual bool isCircle () const
 Returns true if this object is a circle.
virtual bool isEllipse () const
 Returns true if this object is an ellipse.
virtual void setLocation (int index, const DtVector &location, bool resetOrigin=true)
 Overridden to rework given point to account for radius and orientation.
- Public Member Functions inherited from makVrf::DtVrfShapeManipulationHandler
 DtVrfShapeManipulationHandler (makVrv::DtDe &)
virtual ~DtVrfShapeManipulationHandler ()
virtual void setPoints (const std::vector< DtVector > &pts)
virtual void setPoints (const std::vector< DtGeodeticCoord > &pts)
const std::vector< DtVector > & points () const
virtual bool createVrfObject ()
 Creates the scene object with the current handler settings for location, orientation, name, type, etc...A call to createObject must be made before using this function.
virtual bool createVrfObject (DtVrfObjectFacadeInterface *)
virtual void addControlPoint (const DtVector &location, int index=-1)
virtual void removeControlPoint (int index)
virtual void setAltitudeAboveSeaLevel (int, double)
 Set altitude above sea level for the particular point.
virtual double altitudeAboveSeaLevel (int) const
virtual void setAltitudeAboveTerrain (int, double)
 Set altitude above terrain for the particular point.
virtual double altitudeAboveTerrain (int) const
virtual bool shapeAtMinimum () const
 Returns true if the shape has the minimum number of points to create.
virtual bool shapeAtMinimum (DtEnvironmentStateView *)
virtual bool canDeleteAPoint (DtEnvironmentStateView *)
 Returns true if a point can be deleted from this object.
virtual bool shapeAtMaximum () const
 Returns true if the shape has the minimum number of points to create.
virtual bool shapeAtMaximum (DtEnvironmentStateView *)
virtual int numVertices () const
 Returns the number of vertices in the principal object.
virtual void setEditingPoint (int)
virtual int editingPoint () const
virtual DtGeodeticCoord geodeticPosition (int) const
virtual DtVector localLocation (int index) const
 location + altitude
virtual std::vector
< DtGeodeticCoord > 
geodeticPositions () const
virtual void removePoint (int)
virtual double altitudeForAltitudeType (int) const
 Return the altitude given the current altitude type set. Goes to facade for information.
virtual bool freehand () const
 Returns true if in freehand mode.
virtual bool canChangeArrowStyle () const
 Returns true if the arrow style can be changed.
virtual bool canChangeArrowSize () const
virtual bool canFill () const
virtual bool canChangePenStyle () const
virtual void setPointSamplingRate (int)
 Sets the sampling rate for points.
virtual int pointSamplingRate () const
virtual void setLineWidth (int)
 Sets the line width of the line or outside of area.
virtual int lineWidth () const
virtual void setPenStyle (int)
 Sets the pen style of the line or the style of the area border.
virtual int penStyle () const
virtual void setFillStyle (int)
 Sets the fill style of the area.
virtual int fillStyle () const
virtual bool fixedWidthSizing () const
 Returns whether or not line is in fixed width sizing mode.
virtual void setForce (int)
 Sets the force of the object.
virtual void setColor (int)
virtual int color () const
virtual void setLabel (const std::string &)
 Sets label of item. Default is no-op.
virtual std::string label () const
virtual int arrowStyle () const
 Returns information about the current arrow settings from the visualizer.
virtual int arrowHeadPlacement () const
virtual int arrowSize () const
virtual double initialArrowSize (bool fixedWidthSizing, double initialSize) const
 For a newly created object returns initial arrow size.
- Public Member Functions inherited from makVrf::DtVrfObjectManipulationHandlerBaseClass
 DtVrfObjectManipulationHandlerBaseClass (makVrv::DtDe &)
virtual ~DtVrfObjectManipulationHandlerBaseClass ()
virtual bool createObject (const DtEntityType &entType, int force, DtCreationSignalType creationSignal=DtNoCreationSignal, const std::string &keywords="")
 Starts the process of object creation.
virtual bool createObject (const DtString &key, const DtString &associatedData, DtCreationSignalType creationSignal=DtNoCreationSignal, const std::string &keywords="")
 Starts the process of terrain prop creation.
int force () const
virtual void setAllowCreationOnMouseClick (bool flag)
virtual bool allowCreationOnMouseClick () const
virtual DtVector clampToGround (const DtVector &) const
virtual DtGeodeticCoord clampToGround (const DtGeodeticCoord &) const
virtual bool attachObjectToMouse () const
virtual void setLocation (const DtVector &loc)
virtual void setLocation (const DtVector &loc, double altAboveGround)
virtual void stop ()
 Stop an ongoing creation process.
virtual void deferredStop ()
 Stops on a post tick callback.
virtual void setOverlay (const std::string &name)
virtual std::string getNextCreatingName (bool includeCurrent=false)
virtual void setAltitudeAboveGL (double alt, bool setInProcessor=true)
virtual void setAltitudeAboveSL (double alt, bool setInProcessor=true)
virtual void setAltitudeClampType (DtAltitudeClampType type)
void setCreating (bool b)
bool creating () const
virtual
DtVrfObjectFacadeInterface
principalObjectImage () const
virtual makVrv::DtUniqueID principalObjectID () const
virtual void setUserData (const std::string &userData)
virtual const std::string & userData () const
virtual void slot_onAltitudeIsDragging (bool)
virtual void hideObject (const makVrv::DtUniqueID &id, bool hide)
virtual void setPublishObject (bool)
 Set whether or not to publish object. Default is true.
virtual bool publishObject () const
virtual void setObjectName (const std::string &name)
virtual bool isUniqueName () const
 Returns true if the specified name is unique as set.
virtual double groundHeight (const DtVector &localPosition, DtVector *localGround=0) const
 find the height of the ground (ENU coordinate system) at localPosition (DB coordinates).
virtual void setAltitudeAllowed (bool)
bool altitudeAllowed () const
virtual const std::string & objectName () const
virtual void setAnchorMouseToOrigin (bool)
 If true (default is false) will anchor the position of the mouse to the origin of the object when editing.
virtual bool anchorMouseToOrigin () const
virtual void setAnchorPositionIsMouse (bool)
 If false (default is true) will have the anchor position be the principal object. By default it is the mouse position.
virtual bool anchorPositionIsMouse () const
virtual DtVector localLocation ()
 location + altitude
virtual DtVector convertGeocentricToGround (const DtVector &geoc, double &altitude) const
virtual void setShowPropertiesDialogBeforeCreate (bool)
virtual bool showPropertiesDialogBeforeCreate () const
virtual bool keywordsContain (const std::string &) const
 Return true if the list of keywords contains the specified one.
virtual std::string keyword (const std::string &) const
virtual bool waitingToStop () const
virtual void cancel ()
 Cancels any current work. Default calls slot_onCancel.
virtual bool noStyle () const
 Return true if the item should not show the style button.

Protected Member Functions

virtual void initializeEventProcessor ()
virtual void slot_onHeadingChanged (double heading)
virtual void slot_onPrincipalStateViewUpdated (DtVrlinkSimulatedBaseStateView *principalStateView, const makVrv::DtUniqueID &principalSceneObjectId)
 Override to center on principal object.
virtual void moveSelectedPoint (const DtVector &location, double altAboveGround)
 Override to only allow during free rotate.
virtual
DtVrfObjectFacadeInterface
createLocalRepresentation (DtVrlinkSimulatedBaseStateView *editStateView, makVrv::DtUniqueID sceneObjectId, DtVrlinkSimulatedBaseStateView *principalStateView)
virtual void objectCreated (DtVrfObjectFacadeInterface *)
 Called when an object is created, if state view is present will set to be projected if projected.
virtual void setAttachObjectToMouse (bool flag)
 Override to set to free rotate if editing and not attached to mouse.
virtual DtVector setAltitudeToOrigin (const DtVector &) const
 Sets the altitude of the supplied point (local) to the same altitude as the origin and returns that new point.
virtual void slot_onPlace (makVrv::DtUniqueID id, const DtVector &location, double altAboveGround)
 Override to allow completion finish on left click as well as right click (left click seems more natural with circles)
virtual void getMinMaxVertices (const DtEntityType &creatingType, int &minVert, int &maxVert) const
 Returns the minimum/maximum vertices of the given type.
- Protected Member Functions inherited from makVrf::DtVrfShapeManipulationHandler
virtual void postCreateInitialize ()
virtual void editSelectedObjects (const makVrv::DtUniqueID &principalID, makVrv::DtChannel &initiatingChannel, double waitTimeAfterComplete=0.)
 Starts the process of object editing.
virtual void slot_onEditComplete (makVrv::DtUniqueID id, const DtVector &location, double altAboveGround)
virtual bool modifyVrfObjects ()
virtual void slot_onComplete ()
virtual void slot_onCancel ()
virtual void slot_onLocationChanged (const DtVector &location, double altAboveGround)
virtual void slot_onAltitudeChanged (const DtVector &location, double altitude)
virtual
DtVrfObjectFacadeInterface
createLocalRepresentation (DtVrlinkSimulatedBaseStateView *editStateView=0)
 returns true if successful, false otherwise
virtual DtVector addControlPoint (int index=-1)
virtual bool isArea (const DtEntityType &type) const
virtual bool isRoute (const DtEntityType &type) const
virtual bool isObstacle (const DtEntityType &type) const
virtual bool isPhaseline (const DtEntityType &type) const
virtual DtEnvironmentalCreationData environmentalCreationData (const std::string &name, const DtEntityType &, int force) const
virtual void updateLocationOffset (const DtVector &local, DtEnvironmentalFacadeCollection *env, int pos)
virtual void modifyVrfObject (DtEnvironmentalFacadeCollection *objectImage)
 Called for each object to be modified.
- Protected Member Functions inherited from makVrf::DtVrfObjectManipulationHandlerBaseClass
virtual void slot_simObjectEntryToBeRemoved (const makVrv::DtSimObjectEntry &)
 Called when a sim object entry is removed. If we are editing this entry then cancel this process.
virtual bool typeIsValidForEditingByHandler (const makVrv::DtElementEntry::ElementType &, const DtEntityType &) const
 Override to not allow a particular element type to be editable. By default all are.
virtual std::string stripNumbers (const std::string &base) const
virtual void warpMouseToLocation (makVrv::DtChannel *channel, const DtVector &location) const
virtual void initializeEdit ()
 Initializes editing of objects.
virtual void slot_onStateViewUpdated (DtVrlinkSimulatedBaseStateView *editStateView, makVrv::DtUniqueID sceneObjectId, DtVrlinkSimulatedBaseStateView *principalStateView)
virtual bool centerOn (const makVrv::DtUniqueID &id, DtVector *centerPos=0, const DtVector *centerHere=0, bool centerOnOnlyIfMousePositionIsOffWindow=true) const
 If centerHere is non-null use that geocentric value as the center point.
virtual void setObjectImageAsAnchor (DtVrfObjectFacadeInterface *objectImage, const DtVector &geocLocation, bool resetOrigin=false)
virtual void setObjectImageRelativeToPrincipal (DtVrfObjectFacadeInterface *objectImage, const DtVector &thisGeocLocation, const DtTaitBryan &thisGeocOrientation, const DtVector &prGeocLocation, const DtTaitBryan &prGeocOrientation)
virtual void initializeInterfaceForEdit (DtVrfObjectFacadeInterface *, makVrv::DtUniqueID, const makVrv::DtVrlinkSimulatedBaseState &, const DtVector &principalLocation, const DtTaitBryan &principalOrientation)
virtual void calculateAnchor (const DtVector &localAnchor)
virtual void calculateAnchorBasedOnMousePosition (makVrv::DtChannel &channel)
virtual void parseKeywords (const std::string &)

Protected Attributes

double myHeading
- Protected Attributes inherited from makVrf::DtVrfShapeManipulationHandler
int myMaxVertices
int myMinVertices
DtGeodeticCoord myLastPosition
bool myRecentered
DtVector myRecenteredPos
int myPointSamplingRate
std::vector< DtVectormyControlPoints
 Used to refactor points for sampling rate change.
- Protected Attributes inherited from makVrf::DtVrfObjectManipulationHandlerBaseClass
bool myCreating
bool myAttachObjectToMouse
int myForce
makVrv::DtDe & myDe
bool mySignalManipulation
bool myAllowCreationOnClick
std::string myObjectName
std::string myOverlay
DtVrfObjectManipulationEventProcessormyEventProcessor
bool myAltitudeIsDragging
bool myAltitudeAllowed
makVrv::DtChannel * myHiddenChannel
std::string myUserData
std::string myKey
std::string myKeyData
DtCreationSignalType mySignalCreation
VrfObjectEditFacadeList myObjectImages
DtReferenceEllipsoid * myReferenceForConversion
DtAltitudeClampType myAltitudeClampType
bool myOverlayChanged
bool myShowPropertiesDialogBeforeCreate
DtGeodeticCoord myAnchorPosition
bool myAnchorMouseToOrigin
bool myAnchorPositionIsMouse
DtTimedSection * myDeferredStopTimer
double myTotalTimeElapsed
double myDeferStopFor
bool myPublishObject
std::vector< std::string > myKeywords
int myCursorCount

Additional Inherited Members

- Public Types inherited from makVrf::DtVrfObjectManipulationHandlerBaseClass
typedef std::vector
< DtVrfObjectFacadeInterface * > 
VrfObjectEditFacadeList
- Public Attributes inherited from makVrf::DtVrfShapeManipulationHandler
boost::signal< void(const
DtVector &, int)> 
signal_pointLocationChanged
boost::signal< void()> signal_pointSamplingRateChanged

Detailed Description

The handler for creating and manipulating circles/ellipses.

Constructor & Destructor Documentation

makVrf::DtVrfCircleManipulationHandler::DtVrfCircleManipulationHandler ( makVrv::DtDe &  )
virtual makVrf::DtVrfCircleManipulationHandler::~DtVrfCircleManipulationHandler ( )
virtual

Member Function Documentation

virtual void makVrf::DtVrfCircleManipulationHandler::setXRadius ( double  )
virtual

Sets the xRadius of the circle. Will interally update the second point of the listener.

virtual void makVrf::DtVrfCircleManipulationHandler::setXRadiusWithHeading ( double  ,
double   
)
virtual

If heading is defined will use that when setting to X point to also rotate to that heading.

virtual double makVrf::DtVrfCircleManipulationHandler::xRadius ( ) const
virtual
virtual void makVrf::DtVrfCircleManipulationHandler::setYRadius ( double  )
virtual

Sets the yRadius of the circle. Will internally update the third point of the listener.

virtual double makVrf::DtVrfCircleManipulationHandler::yRadius ( ) const
virtual
virtual void makVrf::DtVrfCircleManipulationHandler::setHeading ( double  )
virtual

Sets the orientation of the circle.

Will internally update the second point to be the angle offset from the origin. Heading is in radians

Reimplemented from makVrf::DtVrfObjectManipulationHandlerBaseClass.

virtual double makVrf::DtVrfCircleManipulationHandler::heading ( ) const
virtual
virtual bool makVrf::DtVrfCircleManipulationHandler::isCircle ( ) const
virtual

Returns true if this object is a circle.

virtual bool makVrf::DtVrfCircleManipulationHandler::isEllipse ( ) const
virtual

Returns true if this object is an ellipse.

virtual void makVrf::DtVrfCircleManipulationHandler::setLocation ( int  index,
const DtVector location,
bool  resetOrigin = true 
)
virtual

Overridden to rework given point to account for radius and orientation.

Reimplemented from makVrf::DtVrfShapeManipulationHandler.

virtual void makVrf::DtVrfCircleManipulationHandler::initializeEventProcessor ( )
protectedvirtual
virtual void makVrf::DtVrfCircleManipulationHandler::slot_onHeadingChanged ( double  heading)
protectedvirtual
virtual void makVrf::DtVrfCircleManipulationHandler::slot_onPrincipalStateViewUpdated ( DtVrlinkSimulatedBaseStateView principalStateView,
const makVrv::DtUniqueID &  principalSceneObjectId 
)
protectedvirtual

Override to center on principal object.

Reimplemented from makVrf::DtVrfObjectManipulationHandlerBaseClass.

Reimplemented in makVrf::DtVrfIndirectArtilleryManipulationHandler.

virtual void makVrf::DtVrfCircleManipulationHandler::moveSelectedPoint ( const DtVector location,
double  altAboveGround 
)
protectedvirtual

Override to only allow during free rotate.

Reimplemented from makVrf::DtVrfShapeManipulationHandler.

virtual DtVrfObjectFacadeInterface* makVrf::DtVrfCircleManipulationHandler::createLocalRepresentation ( DtVrlinkSimulatedBaseStateView editStateView,
makVrv::DtUniqueID  sceneObjectId,
DtVrlinkSimulatedBaseStateView principalStateView 
)
protectedvirtual
virtual void makVrf::DtVrfCircleManipulationHandler::objectCreated ( DtVrfObjectFacadeInterface )
protectedvirtual

Called when an object is created, if state view is present will set to be projected if projected.

virtual void makVrf::DtVrfCircleManipulationHandler::setAttachObjectToMouse ( bool  flag)
protectedvirtual

Override to set to free rotate if editing and not attached to mouse.

Reimplemented from makVrf::DtVrfObjectManipulationHandlerBaseClass.

virtual DtVector makVrf::DtVrfCircleManipulationHandler::setAltitudeToOrigin ( const DtVector ) const
protectedvirtual

Sets the altitude of the supplied point (local) to the same altitude as the origin and returns that new point.

virtual void makVrf::DtVrfCircleManipulationHandler::slot_onPlace ( makVrv::DtUniqueID  id,
const DtVector location,
double  altAboveGround 
)
protectedvirtual

Override to allow completion finish on left click as well as right click (left click seems more natural with circles)

Reimplemented from makVrf::DtVrfShapeManipulationHandler.

virtual void makVrf::DtVrfCircleManipulationHandler::getMinMaxVertices ( const DtEntityType &  creatingType,
int &  minVert,
int &  maxVert 
) const
protectedvirtual

Returns the minimum/maximum vertices of the given type.

If there is a facade and keywords will use that for information as well

Reimplemented from makVrf::DtVrfShapeManipulationHandler.

Member Data Documentation

double makVrf::DtVrfCircleManipulationHandler::myHeading
protected

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

Document ID: Generated on Sun Nov 24 19:49:21 EST 2013 from SVN revision 133924
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)