VR-Forces 4.0.4 Class Documentation
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes
makVrf::DtVrfObjectManipulationManager Class Reference

The Master Scenario Settings Dialog. More...

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

List of all members.

Public Types

enum  DtEditingType { Mouse = 0, Context, MousePositionOrigin }

Public Member Functions

 DtVrfObjectManipulationManager (makVrv::DtDe &)
virtual ~DtVrfObjectManipulationManager ()
bool creatingObject () const
DtVrfObjectManipulationHandlerBaseClasscurrentObjectManipulationHandler ()
virtual void addObjectManipulationHandler (const DtEntityType &, DtVrfObjectManipulationHandlerCreatorInterface *)
 Adds an object manipulation handler by entity type.
virtual void removeObjectManipulationHandler (const DtEntityType &)
virtual
makVrv::DtElementEntry::ElementType 
mapKindToType (int) const
 Maps the entity kind to the particular element type. Used to create a manipulation handler if specific type does not exist.
virtual void addKindToTypeMapping (int, const makVrv::DtElementEntry::ElementType &)
 Adds a mapping of kind to type.
virtual bool hasTypeToKindMapping (const makVrv::DtElementEntry::ElementType &) const
 Returns true if there is an element type to kind mapping.
virtual void addObjectManipulationHandler (const makVrv::DtElementEntry::ElementType &, DtVrfObjectManipulationHandlerCreatorInterface *)
 Adds an object manipulation handler by element type.
virtual void removeObjectManipulationHandler (const makVrv::DtElementEntry::ElementType &)
virtual bool isEditable (const makVrv::DtUniqueID &) const
 Returns whether or not the item is editable.
virtual void setEditable (const makVrv::DtUniqueID &, bool)
virtual std::vector< DtVectorconvertToLocal (const std::vector< DtVector > &geocentric) const
 Takes a list of points in geocentric and returns a list of points in local coordinates.
virtual bool isEditingOrCreating () const
 Returns true if in editing or creating mode.
virtual void createObject (const DtEntityType &, int force, DtCreationSignalType creationSignal=DtNoCreationSignal)
 Starts the process of object creation.
virtual void setLocation (const DtVector &loc)
 Tells the creation handler to move its facade to the given location.
virtual void createTerrainProp (const DtString &propType, const DtString &propModelDef)
 Starts the process of prop creation.
virtual void stop ()
 If current handler, then stop it.
bool editingObjects () const
void setAllowEditing (bool b)
bool allowEditing () const
virtual void editSelectedObjects (const makVrv::DtUniqueID &principalID, makVrv::DtChannel &initiatingChannel, const DtEditingType &edtype=Mouse)
 Starts the process of object editing.
virtual void deleteSelected ()
 delete the current selection(s)
virtual void deleteProp (makVrv::DtUniqueID id)
virtual void deleteVertex (const makVrv::DtUniqueID &vertexId)
virtual void deleteVertex (const makVrv::DtUniqueID &shapeId, const DtVector &dbLocation)
virtual void addVertexBefore (const makVrv::DtUniqueID &vertexId)
virtual void addVertexBefore (const makVrv::DtUniqueID &shapeId, const DtVector &dbLocation)
virtual void addVertexBeforeSelected ()
virtual void addVertexAfter (const makVrv::DtUniqueID &vertexId)
virtual void addVertexAfter (const makVrv::DtUniqueID &shapeId, const DtVector &dbLocation)
virtual void addVertexAfterSelected ()
virtual int indexOfVertex (DtEnvironmentStateView *shapeStateView, const DtVector &dbVtxLocation) const
 Get the index of a vertex in its parent shape, given its location.
virtual bool getVertexLocation (const makVrv::DtUniqueID &vertexId, DtVector &dbLocation) const
 get the (local, database) location of the specified vertexId.
virtual void requestAndProcessEnvState (const makVrv::DtUniqueID &sceneId, ProcessEnvStateFunction *processor)
 Request and env process state, and when the signal fires that it is available, call the function pointed to be processor.
virtual void setWaitTimeAfterComplete (double)
 Set the time to wait to show objects after complete editing. Default is .3 seconds.
virtual double waitTimeAfterComplete () const
bool shapeAtMinimum (DtEnvironmentStateView *shapeStateView) const
bool shapeAtMaximum (DtEnvironmentStateView *shapeStateView) const

Static Public Member Functions

static
DtVrfObjectManipulationManager
instance (makVrv::DtDe &de)
 Returns instance of the messager.

Public Attributes

boost::signal< void()> signal_stopped
boost::signal< void(const
DtEntityType &, int,
makVrf::DtCreationSignalType)> 
signal_creatingObject
boost::signal< void(const
DtEntityType &, std::string,
int, const std::vector
< DtVector > &, double, bool,
bool, std::string)> 
signal_createObject
boost::signal< void()> signal_creatingTerrainProp
boost::signal< void(const
DtString &, const DtString &)> 
signal_createTerrainProp
boost::signal< void(DtVrfObjectFacadeInterface
*, bool)> 
signal_objectFacadeCreated
boost::signal< void(DtVrfObjectFacadeInterface *)> signal_objectFacadeAboutToBeRemoved
boost::signal< void(makVrv::DtElementID)> signal_unhandledEdit
boost::signal< void(const
makVrv::DtUniqueID
&, DtEditingType)> 
signal_editingObject
boost::signal< void(const
makVrv::DtUniqueID
&, DtEditingType)> 
signal_editingTerrainProp
boost::signal< void(const
makVrv::DtSelectionManager::IdSet
&, DtEditingType)> 
signal_editingObjects
boost::signal< void(const
makVrv::DtSelectionManager::IdSet
&, DtEditingType)> 
signal_editingTerrainProps
boost::signal< void()> signal_editStopped
boost::signal< void()> signal_editingNotAllowed

Protected Types

typedef
DtOrderedEntityTypeList
< DtVrfObjectManipulationHandlerCreatorInterface * > 
VrfObjectManipulationCreators
typedef boost::function< void(DtEnvironmentStateView *)> ProcessEnvStateFunction
typedef boost::unordered_map
< makVrv::DtUniqueID, bool
EditableMap
typedef boost::unordered_map
< int,
makVrv::DtElementEntry::ElementType
KindToTypeMap
typedef boost::unordered_map
< makVrv::DtElementEntry::ElementType,
DtVrfObjectManipulationHandlerCreatorInterface * > 
TypeCreatorMap

Protected Member Functions

virtual void slot_onCreationStopped (DtVrfObjectManipulationHandlerBaseClass *)
virtual void slot_onTerrainPropCreationStopped (DtVrfObjectManipulationHandlerBaseClass *)
 This get called when the manipulationHandler signals the signal_stopped signal.
virtual void slot_onCreateObject (const DtEntityType &, std::string, int, const std::vector< DtVector > &, double entityHeading, bool clamp, bool isAggregated, std::string userData)
virtual void slot_onCreateTerrainProp (const DtString &propType, const DtString &propModelDef)
 This gets called when the manipulationHandler signals the signal_createTerrainProp signal.
virtual
DtVrfObjectManipulationHandlerBaseClass
manipulationHandlerFor (const DtEntityType &) const
 Will return a new manipulation handler based on the supplied type. Caller must delete handler when complete.
virtual
DtVrfObjectManipulationHandlerBaseClass
manipulationHandlerFor (const makVrv::DtElementEntry::ElementType &) const
virtual void onInputDriverToBeDestroyed (makVrv::DtInputDriver *inputDriver)
virtual void cleanup ()
virtual void onObjectFacadeCreated (DtVrfObjectFacadeInterface *, bool editing)
 Called when a handler creates an object facade, resend the signal from this manager.
virtual void onObjectFacadeAboutToBeRemoved (DtVrfObjectFacadeInterface *)
 Called when a handler is about to remove a facade, resend the signal from this manager.
virtual void slot_editStopped (DtVrfObjectManipulationHandlerBaseClass *)
virtual void slot_stateReturned (DtEnvironmentStateView *shapeStateView, const makVrv::DtUniqueID &shapeId, ProcessEnvStateFunction *processor)
virtual void deleteVertexUsingState (DtEnvironmentStateView *shapeStateView, const makVrv::DtUniqueID &shapeId, const DtVector &dbVtxLocation)
virtual void addVertexUsingState (DtEnvironmentStateView *shapeStateView, const makVrv::DtUniqueID &shapeId, const DtVector &dbVtxLocation, bool before)
virtual void restoreSelectionState (DtVrfObjectManipulationHandlerBaseClass *handler)
virtual void slot_onTick ()
virtual void slot_onAttributesChanged (const makVrv::DtElementData::EntryAttributesList &signalList)
bool isOnIdList (makVrv::DtUniqueID id, const makVrv::DtSelectionManager::IdSet &list)
virtual void addHandlerToBeCleanedUp (DtVrfObjectManipulationHandlerBaseClass *)

Protected Attributes

makVrv::DtDemyDe
VrfObjectManipulationCreators myManipulationHandlers
DtVrfObjectManipulationHandlerBaseClassmyCurrentObjectManipulationHandler
DtVrfEditManagerEventProcessormyEventProcessor
makVrv::DtSelectionManager::IdSet mySavedSelectionState
makVrv::DtSelectionManager::IdSet myRemainingSavedSelections
EditableMap myEditableMap
KindToTypeMap myKindToTypeMap
TypeCreatorMap myTypeCreators
double myWaitTimeAfterComplete
std::vector
< DtVrfObjectManipulationHandlerBaseClass * > 
myHandlersToBeCleanedUp

Detailed Description

The Master Scenario Settings Dialog.


Member Typedef Documentation


Member Enumeration Documentation

Enumerator:
Mouse 
Context 
MousePositionOrigin 

Constructor & Destructor Documentation


Member Function Documentation

Returns instance of the messager.

Adds an object manipulation handler by entity type.

If type does not exist in map will map to element type and attempt to use that

virtual void makVrf::DtVrfObjectManipulationManager::removeObjectManipulationHandler ( const DtEntityType &  ) [virtual]

Maps the entity kind to the particular element type. Used to create a manipulation handler if specific type does not exist.

Adds a mapping of kind to type.

Returns true if there is an element type to kind mapping.

Adds an object manipulation handler by element type.

If type does not exist will not start creation/editing process

Returns whether or not the item is editable.

This is the element id of the item in question. It will look up the state view information based on the id and check as to whether or not the item with the given ID is editable

virtual std::vector<DtVector> makVrf::DtVrfObjectManipulationManager::convertToLocal ( const std::vector< DtVector > &  geocentric) const [virtual]

Takes a list of points in geocentric and returns a list of points in local coordinates.

Returns true if in editing or creating mode.

This get called when the manipulationHandler signals the signal_stopped signal.

virtual void makVrf::DtVrfObjectManipulationManager::slot_onCreateObject ( const DtEntityType &  ,
std::string  ,
int  ,
const std::vector< DtVector > &  ,
double  entityHeading,
bool  clamp,
bool  isAggregated,
std::string  userData 
) [protected, virtual]
virtual void makVrf::DtVrfObjectManipulationManager::slot_onCreateTerrainProp ( const DtString propType,
const DtString propModelDef 
) [protected, virtual]

This gets called when the manipulationHandler signals the signal_createTerrainProp signal.

Will return a new manipulation handler based on the supplied type. Caller must delete handler when complete.

virtual void makVrf::DtVrfObjectManipulationManager::cleanup ( ) [protected, virtual]

Called when a handler creates an object facade, resend the signal from this manager.

Called when a handler is about to remove a facade, resend the signal from this manager.

virtual void makVrf::DtVrfObjectManipulationManager::createObject ( const DtEntityType &  ,
int  force,
DtCreationSignalType  creationSignal = DtNoCreationSignal 
) [virtual]

Starts the process of object creation.

Uses the factory to figure out which handler should be used to create the object. If signalCreation is true, signals that the object should be created and where rather than actually creating it

virtual void makVrf::DtVrfObjectManipulationManager::setLocation ( const DtVector loc) [virtual]

Tells the creation handler to move its facade to the given location.

virtual void makVrf::DtVrfObjectManipulationManager::createTerrainProp ( const DtString propType,
const DtString propModelDef 
) [virtual]

Starts the process of prop creation.

If current handler, then stop it.

virtual void makVrf::DtVrfObjectManipulationManager::editSelectedObjects ( const makVrv::DtUniqueID principalID,
makVrv::DtChannel initiatingChannel,
const DtEditingType edtype = Mouse 
) [virtual]

Starts the process of object editing.

Uses the factory to figure out which handler should be used to edit the objects. The principal id is the ID of the object actually moused on

delete the current selection(s)

virtual void makVrf::DtVrfObjectManipulationManager::deleteVertex ( const makVrv::DtUniqueID vertexId) [virtual]
virtual void makVrf::DtVrfObjectManipulationManager::deleteVertex ( const makVrv::DtUniqueID shapeId,
const DtVector dbLocation 
) [virtual]
virtual void makVrf::DtVrfObjectManipulationManager::addVertexBefore ( const makVrv::DtUniqueID shapeId,
const DtVector dbLocation 
) [virtual]
virtual void makVrf::DtVrfObjectManipulationManager::addVertexAfter ( const makVrv::DtUniqueID vertexId) [virtual]
virtual void makVrf::DtVrfObjectManipulationManager::addVertexAfter ( const makVrv::DtUniqueID shapeId,
const DtVector dbLocation 
) [virtual]
virtual int makVrf::DtVrfObjectManipulationManager::indexOfVertex ( DtEnvironmentStateView shapeStateView,
const DtVector dbVtxLocation 
) const [virtual]

Get the index of a vertex in its parent shape, given its location.

virtual bool makVrf::DtVrfObjectManipulationManager::getVertexLocation ( const makVrv::DtUniqueID vertexId,
DtVector dbLocation 
) const [virtual]

get the (local, database) location of the specified vertexId.

Returns false if a scene object can't be found with vertexId

Request and env process state, and when the signal fires that it is available, call the function pointed to be processor.

Note that the processor function must be allocated on the heap; requestAndProcessEnvState will delete it when finished with it

Set the time to wait to show objects after complete editing. Default is .3 seconds.

virtual void makVrf::DtVrfObjectManipulationManager::slot_stateReturned ( DtEnvironmentStateView shapeStateView,
const makVrv::DtUniqueID shapeId,
ProcessEnvStateFunction processor 
) [protected, virtual]
virtual void makVrf::DtVrfObjectManipulationManager::deleteVertexUsingState ( DtEnvironmentStateView shapeStateView,
const makVrv::DtUniqueID shapeId,
const DtVector dbVtxLocation 
) [protected, virtual]
virtual void makVrf::DtVrfObjectManipulationManager::addVertexUsingState ( DtEnvironmentStateView shapeStateView,
const makVrv::DtUniqueID shapeId,
const DtVector dbVtxLocation,
bool  before 
) [protected, virtual]
virtual void makVrf::DtVrfObjectManipulationManager::slot_onTick ( ) [protected, virtual]

Member Data Documentation

boost::signal<void (const DtEntityType&, std::string, int, const std::vector<DtVector>&,double,bool, bool, std::string )> makVrf::DtVrfObjectManipulationManager::signal_createObject

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)