OSG::Manipulator Class Reference

Manipulator class. See PageManipulatorsManipulator for a description. More...

#include <OSGManipulator.h>

Inheritance diagram for OSG::Manipulator:

OSG::ManipulatorBase OSG::Transform OSG::TransformBase OSG::Group OSG::GroupBase OSG::NodeCore OSG::AttachmentContainer OSG::FieldContainer OSG::ReflexiveContainer OSG::MoveManipulatorBase OSG::RotateManipulatorBase OSG::ScaleManipulatorBase OSG::MoveManipulator OSG::RotateManipulator OSG::ScaleManipulator List of all members.

dcast



 OSG_GEN_INTERNALPTR (AttachmentContainer)
typedef AttachmentContainer Self
typedef FieldContainerAttachment AttachmentObj
typedef FieldContainerAttachmentPtr AttachmentObjPtr
typedef SFFieldContainerAttachmentPtrMap SFAttachmentObjPtrMap
typedef SFAttachmentObjPtrMap::StoredType AttachmentObjPtrMap
typedef AttachmentObjPtrMap::iterator AttachmentObjPtrMapIt

Public Types

enum  {
  TargetFieldId = Inherited::NextFieldId, ActiveSubHandleFieldId = TargetFieldId + 1, LastMousePosFieldId = ActiveSubHandleFieldId + 1, ViewportFieldId = LastMousePosFieldId + 1,
  ActiveFieldId = ViewportFieldId + 1, LengthFieldId = ActiveFieldId + 1, HandleXNodeFieldId = LengthFieldId + 1, HandleYNodeFieldId = HandleXNodeFieldId + 1,
  HandleZNodeFieldId = HandleYNodeFieldId + 1, TransXNodeFieldId = HandleZNodeFieldId + 1, TransYNodeFieldId = TransXNodeFieldId + 1, TransZNodeFieldId = TransYNodeFieldId + 1,
  MaterialXFieldId = TransZNodeFieldId + 1, MaterialYFieldId = MaterialXFieldId + 1, MaterialZFieldId = MaterialYFieldId + 1, AxisLinesNFieldId = MaterialZFieldId + 1,
  NextFieldId = AxisLinesNFieldId + 1
}
typedef Transform ParentContainer
typedef Inherited::TypeObject TypeObject
typedef TypeObject::InitPhase InitPhase
enum  { MatrixFieldId = Inherited::NextFieldId, NextFieldId = MatrixFieldId + 1 }
typedef MFParentFieldContainerPtr ParentField
typedef const MFParentFieldContainerPtr * ParentFieldPtr
typedef MFParentFieldContainerPtr::const_iterator ParentFieldIt
Type definitions


typedef Field *(ReflexiveContainer::*) FieldEditMethod (void)
typedef const Field *(ReflexiveContainer::*) FieldGetMethod (void) const

Public Member Functions

 OSG_GEN_INTERNALPTR (Manipulator)
 OSG_GEN_INTERNALPTR (Transform)
 OSG_GEN_INTERNALPTR (Group)
 OSG_GEN_INTERNALPTR (NodeCore)
 OSG_RC_FIRST_FIELD_DECL (Parents)
 OSG_RC_LAST_FIELD_DECL (Parents)
Sync


virtual void changed (ConstFieldMaskArg whichField, UInt32 origin, BitVector detail)
 react to field changes
Output


virtual void dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const
 output the instance for debug purposes
virtual void mouseMove (Int16 x, Int16 y)
virtual void mouseButtonPress (UInt16 button, Int16 x, Int16 y)
virtual void mouseButtonRelease (UInt16 button, Int16 x, Int16 y)
 output the instance for debug purposes
virtual bool hasSubHandle (const NodePtr &n)
 output the instance for debug purposes
void setExternalUpdateHandler (ExternalUpdateHandler *h)
 output the instance for debug purposes
void callExternalUpdateHandler ()
 output the instance for debug purposes
Type definitions


 OSG_GEN_INTERNALPTR (FieldContainer)
 OSG_RC_FIRST_FIELD_DECL (ChangedCallbacks)
 OSG_RC_LAST_FIELD_DECL (ChangedCallbacks)
FieldContainer Get


virtual FieldContainerTypegetType (void)
virtual const FieldContainerTypegetType (void) const
virtual UInt32 getContainerSize (void) const
Field Get


const SFNodePtr * getSFTarget (void) const
 Get the Manipulator::_sfTarget field.
const SFNodePtr * getSFActiveSubHandle (void) const
 Get the Manipulator::_sfActiveSubHandle field.
const SFViewportPtr * getSFViewport (void) const
 Get the Manipulator::_sfViewport field.
SFBool * editSFActive (void)
 Get the Manipulator::_sfTarget field.
const SFBool * getSFActive (void) const
 Get the Manipulator::_sfTarget field.
SFVec3f * editSFLength (void)
 Get the Manipulator::_sfTarget field.
const SFVec3f * getSFLength (void) const
 Get the Manipulator::_sfTarget field.
const SFNodePtr * getSFHandleXNode (void) const
 Get the Manipulator::_sfHandleXNode field.
const SFNodePtr * getSFHandleYNode (void) const
 Get the Manipulator::_sfHandleYNode field.
const SFNodePtr * getSFHandleZNode (void) const
 Get the Manipulator::_sfHandleZNode field.
const SFNodePtr * getSFTransXNode (void) const
 Get the Manipulator::_sfTransXNode field.
const SFNodePtr * getSFTransYNode (void) const
 Get the Manipulator::_sfTransYNode field.
const SFNodePtr * getSFTransZNode (void) const
 Get the Manipulator::_sfTransZNode field.
const SFMaterialPtr * getSFMaterialX (void) const
 Get the Manipulator::_sfMaterialX field.
const SFMaterialPtr * getSFMaterialY (void) const
 Get the Manipulator::_sfMaterialY field.
const SFMaterialPtr * getSFMaterialZ (void) const
 Get the Manipulator::_sfMaterialZ field.
const SFNodePtr * getSFAxisLinesN (void) const
 Get the Manipulator::_sfAxisLinesN field.
NodePtrConst getTarget (void) const
 Get the value of the Manipulator::_sfTarget field.
NodePtrConst getActiveSubHandle (void) const
 Get the value of the Manipulator::_sfActiveSubHandle field.
ViewportPtrConst getViewport (void) const
 Get the value of the Manipulator::_sfViewport field.
bool & editActive (void)
 Get the value of the Manipulator::_sfActive field.
const bool & getActive (void) const
 Get the value of the Manipulator::_sfActive field.
Vec3feditLength (void)
 Get the value of the Manipulator::_sfLength field.
const Vec3fgetLength (void) const
 Get the value of the Manipulator::_sfLength field.
NodePtrConst getHandleXNode (void) const
 Get the value of the Manipulator::_sfHandleXNode field.
NodePtrConst getHandleYNode (void) const
 Get the value of the Manipulator::_sfHandleYNode field.
NodePtrConst getHandleZNode (void) const
 Get the value of the Manipulator::_sfHandleZNode field.
NodePtrConst getTransXNode (void) const
 Get the value of the Manipulator::_sfTransXNode field.
NodePtrConst getTransYNode (void) const
 Get the value of the Manipulator::_sfTransYNode field.
NodePtrConst getTransZNode (void) const
 Get the value of the Manipulator::_sfTransZNode field.
MaterialPtrConst getMaterialX (void) const
 Get the value of the Manipulator::_sfMaterialX field.
MaterialPtrConst getMaterialY (void) const
 Get the value of the Manipulator::_sfMaterialY field.
MaterialPtrConst getMaterialZ (void) const
 Get the value of the Manipulator::_sfMaterialZ field.
NodePtrConst getAxisLinesN (void) const
 Get the value of the Manipulator::_sfAxisLinesN field.
Field Set


void setTarget (NodePtrConstArg value)
 Set the value of the Manipulator::_sfTarget field.
void setActiveSubHandle (NodePtrConstArg value)
 Set the value of the Manipulator::_sfActiveSubHandle field.
void setViewport (ViewportPtrConstArg value)
 Set the value of the Manipulator::_sfViewport field.
void setActive (const bool &value)
 Set the value of the Manipulator::_sfActive field.
void setLength (const Vec3f &value)
 Set the value of the Manipulator::_sfLength field.
void setHandleXNode (NodePtrConstArg value)
 Set the value of the Manipulator::_sfHandleXNode field.
void setHandleYNode (NodePtrConstArg value)
 Set the value of the Manipulator::_sfHandleYNode field.
void setHandleZNode (NodePtrConstArg value)
 Set the value of the Manipulator::_sfHandleZNode field.
void setTransXNode (NodePtrConstArg value)
 Set the value of the Manipulator::_sfTransXNode field.
void setTransYNode (NodePtrConstArg value)
 Set the value of the Manipulator::_sfTransYNode field.
void setTransZNode (NodePtrConstArg value)
 Set the value of the Manipulator::_sfTransZNode field.
void setMaterialX (MaterialPtrConstArg value)
 Set the value of the Manipulator::_sfMaterialX field.
void setMaterialY (MaterialPtrConstArg value)
 Set the value of the Manipulator::_sfMaterialY field.
void setMaterialZ (MaterialPtrConstArg value)
 Set the value of the Manipulator::_sfMaterialZ field.
void setAxisLinesN (NodePtrConstArg value)
 Set the value of the Manipulator::_sfAxisLinesN field.
Binary Access


virtual UInt32 getBinSize (ConstFieldMaskArg whichField)
virtual void copyToBin (BinaryDataHandler &pMem, ConstFieldMaskArg whichField)
virtual void copyFromBin (BinaryDataHandler &pMem, ConstFieldMaskArg whichField)
Helper


virtual void accumulateMatrix (Matrixr &result)
void adjustVolume (Volume &volume)
Field Get


SFMatrixreditSFMatrix (void)
const SFMatrixrgetSFMatrix (void) const
MatrixreditMatrix (void)
 Get the value of the Transform::_sfMatrix field.
const MatrixrgetMatrix (void) const
 Get the value of the Transform::_sfMatrix field.
Field Set


void setMatrix (const Matrixr &value)
 Set the value of the Transform::_sfMatrix field.
Copy


virtual FieldContainerPtr shallowCopy (void) const
Constructors


 OSG_RC_FIRST_FIELD_DECL (Attachments)
 OSG_RC_LAST_FIELD_DECL (Attachments)
Helper


const MFParentFieldContainerPtr & getParents (void) const
Get


const MFParentFieldContainerPtr * getMFParents (void) const
Comparison


virtual void invalidateVolume (void)
Dump


void addParent (FieldContainerPtrConst &parent, const UInt16 uiStoredInFieldId=InvalidParentEPos)
void subParent (FieldContainerPtrConst &parent)
Set


void addAttachment (const AttachmentObjPtr attachmentP, UInt16 binding=0)
void subAttachment (const AttachmentObjPtr attachmentP, UInt16 binding=0)
AttachmentObjPtr findAttachment (UInt32 groupId, UInt16 binding=0)
AttachmentObjPtr findAttachment (const FieldContainerType &type, UInt16 binding=0)
your_category


const SFAttachmentObjPtrMapgetSFAttachments (void) const
Set


void callChangedFunctors (ConstFieldMaskArg whichField)
Container Access


UInt32 addChangedFunctor (ChangedFunctor func, std::string createSymbol)
template<class FunctorT>
void subChangedFunctor (FunctorT func)
void subChangedFunctor (UInt32 uiId)
void clearChangedFunctors (void)
Field Flags


const FieldFlagsgetFieldFlags (void)
Helper


OSG_SYSTEM_DLLMAPPING void addReference (void)
OSG_SYSTEM_DLLMAPPING void subReference (void)
OSG_SYSTEM_DLLMAPPING void subReferenceLocalVar (void)
OSG_SYSTEM_DLLMAPPING Int32 getRefCount (void) const
dcast


OSG_SYSTEM_DLLMAPPING UInt32 getTypeId (void) const
OSG_SYSTEM_DLLMAPPING UInt16 getGroupId (void) const
OSG_SYSTEM_DLLMAPPING const
Char8 * 
getTypeName (void) const
Get Field


OSG_SYSTEM_DLLMAPPING UInt32 getNumFields (void) const
OSG_SYSTEM_DLLMAPPING EditFieldHandlePtr editField (UInt32 fieldId)
OSG_SYSTEM_DLLMAPPING EditFieldHandlePtr editField (const Char8 *fieldName)
OSG_SYSTEM_DLLMAPPING GetFieldHandlePtr getField (UInt32 fieldId) const
OSG_SYSTEM_DLLMAPPING GetFieldHandlePtr getField (const Char8 *fieldName) const
Get Field Description


OSG_SYSTEM_DLLMAPPING FieldDescriptionBasegetFieldDescription (UInt32 fieldId)
OSG_SYSTEM_DLLMAPPING FieldDescriptionBasegetFieldDescription (const Char8 *fieldName)
Comparison


OSG_SYSTEM_DLLMAPPING EditFieldHandlePtr invalidEditField (void)
OSG_SYSTEM_DLLMAPPING GetFieldHandlePtr invalidGetField (void) const

Static Public Member Functions

Class Get


static FieldContainerTypegetClassType (void)
 access the type of the class
static UInt32 getClassTypeId (void)
 access the numerical type of the class
static UInt16 getClassGroupId (void)
 access the type of the class
Construction


static TransformPtr create (void)
 create a new instance of the class
static TransformPtr createEmpty (void)
 create an empty new instance of the class, do not copy the prototype

Public Attributes

dcast


 OSG_ABSTR_FIELD_CONTAINER_DECL

Static Public Attributes

static const OSG::BitVector TargetFieldMask
static const OSG::BitVector ActiveSubHandleFieldMask
static const OSG::BitVector LastMousePosFieldMask
static const OSG::BitVector ViewportFieldMask
static const OSG::BitVector ActiveFieldMask
static const OSG::BitVector LengthFieldMask
static const OSG::BitVector HandleXNodeFieldMask
static const OSG::BitVector HandleYNodeFieldMask
static const OSG::BitVector HandleZNodeFieldMask
static const OSG::BitVector TransXNodeFieldMask
static const OSG::BitVector TransYNodeFieldMask
static const OSG::BitVector TransZNodeFieldMask
static const OSG::BitVector MaterialXFieldMask
static const OSG::BitVector MaterialYFieldMask
static const OSG::BitVector MaterialZFieldMask
static const OSG::BitVector AxisLinesNFieldMask
static const OSG::BitVector NextFieldMask
static const OSG::BitVector MatrixFieldMask
static const bool isNodeCore = true

Protected Types

typedef ManipulatorBase Inherited

Protected Member Functions

virtual NodePtr makeHandleGeo ()=0
virtual void addHandleGeo (NodePtr n)
virtual void subHandleGeo (NodePtr n)
void reverseTransform ()
virtual void doMovement (TransformPtr t, const Int32 coord, const Real32 value, const Vec3f &translation, const Quaternion &rotation, const Vec3f &scaleFactor, const Quaternion &scaleOrientation)=0
Pnt2f calcScreenProjection (const Pnt3f &, const ViewportPtr &port)
Constructors


 Manipulator (void)
 Manipulator (const Manipulator &source)
void onCreate ()
void onCreate (const Manipulator *source)
Destructors


virtual ~Manipulator (void)
void onDestroy ()
MT Construction


OSG_SYSTEM_DLLMAPPING void onCreate (const FieldContainer *source=NULL)
OSG_SYSTEM_DLLMAPPING void onCreateAspect (const FieldContainer *createAspect, const FieldContainer *source=NULL)
virtual OSG_SYSTEM_DLLMAPPING
void 
onDestroy (UInt32 uiContainerId)
Changed


OSG_SYSTEM_DLLMAPPING void onCreate (const ReflexiveContainer *source=NULL)
virtual OSG_SYSTEM_DLLMAPPING
void 
onDestroyAspect (UInt32 uiContainerId, UInt32 uiAspect)
Generic Field Access


GetFieldHandlePtr getHandleTarget (void) const
EditFieldHandlePtr editHandleTarget (void)
GetFieldHandlePtr getHandleActiveSubHandle (void) const
EditFieldHandlePtr editHandleActiveSubHandle (void)
GetFieldHandlePtr getHandleLastMousePos (void) const
EditFieldHandlePtr editHandleLastMousePos (void)
GetFieldHandlePtr getHandleViewport (void) const
EditFieldHandlePtr editHandleViewport (void)
GetFieldHandlePtr getHandleActive (void) const
EditFieldHandlePtr editHandleActive (void)
GetFieldHandlePtr getHandleLength (void) const
EditFieldHandlePtr editHandleLength (void)
GetFieldHandlePtr getHandleHandleXNode (void) const
EditFieldHandlePtr editHandleHandleXNode (void)
GetFieldHandlePtr getHandleHandleYNode (void) const
EditFieldHandlePtr editHandleHandleYNode (void)
GetFieldHandlePtr getHandleHandleZNode (void) const
EditFieldHandlePtr editHandleHandleZNode (void)
GetFieldHandlePtr getHandleTransXNode (void) const
EditFieldHandlePtr editHandleTransXNode (void)
GetFieldHandlePtr getHandleTransYNode (void) const
EditFieldHandlePtr editHandleTransYNode (void)
GetFieldHandlePtr getHandleTransZNode (void) const
EditFieldHandlePtr editHandleTransZNode (void)
GetFieldHandlePtr getHandleMaterialX (void) const
EditFieldHandlePtr editHandleMaterialX (void)
GetFieldHandlePtr getHandleMaterialY (void) const
EditFieldHandlePtr editHandleMaterialY (void)
GetFieldHandlePtr getHandleMaterialZ (void) const
EditFieldHandlePtr editHandleMaterialZ (void)
GetFieldHandlePtr getHandleAxisLinesN (void) const
EditFieldHandlePtr editHandleAxisLinesN (void)
Field Get


SFPnt2f * editSFLastMousePos (void)
const SFPnt2f * getSFLastMousePos (void) const
Pnt2feditLastMousePos (void)
 Get the value of the Manipulator::_sfLastMousePos field.
const Pnt2fgetLastMousePos (void) const
 Get the value of the Manipulator::_sfLastMousePos field.
Field Set


void setLastMousePos (const Pnt2f &value)
 Set the value of the Manipulator::_sfLastMousePos field.
Sync


virtual void resolveLinks (void)
Intersect & Render


ActionBase::ResultE intersectEnter (Action *action)
ActionBase::ResultE intersectLeave (Action *action)
ActionBase::ResultE renderEnter (Action *action)
ActionBase::ResultE renderLeave (Action *action)
Generic Field Access


GetFieldHandlePtr getHandleMatrix (void) const
EditFieldHandlePtr editHandleMatrix (void)
Action Callbacks


ActionBase::ResultE intersect (Action *action)
Edit


GetFieldHandlePtr getHandleParents (void) const
Sync


EditFieldHandlePtr editHandleAttachments (void)
GetFieldHandlePtr getHandleAttachments (void) const
Edit


OSG_SYSTEM_DLLMAPPING void subReferenceUnresolved (void)
MT Construction


virtual OSG_SYSTEM_DLLMAPPING
bool 
deregister (UInt32 uiContainerId)
MT Construction


OSG_SYSTEM_DLLMAPPING void registerChangedContainer (void)
virtual OSG_SYSTEM_DLLMAPPING
void 
registerChangedContainerV (void)
Local Edit


void editSField (ConstFieldMaskArg whichField)
template<class FieldT>
void editMField (ConstFieldMaskArg whichField, FieldT &oField)
MT Destruction


void execEndEdit (ConstFieldMaskArg whichField)
void clearChangeEntry (ContainerChangeEntry *pRef)
Edit


OSG_SYSTEM_DLLMAPPING void setId (UInt32 uiContainerId)
OSG_SYSTEM_DLLMAPPING UInt32 getId (void) const

Static Protected Member Functions

static void classDescInserter (TypeObject &oType)
static void classDescInserter (TypeObject &oType)
static Char8 * getClassname (void)
Init


static void initMethod (InitPhase ePhase)
 initialize the static features of the class, e.g. action callbacks
Fields


static void classDescInserter (TypeObject &oType)
MT Construction


template<class ObjectT>
static void newPtr (typename ObjectT::ObjPtr &result, const ObjectT *prototypeP)
template<class ObjectT>
static void newPtr (typename ObjectT::ObjPtr &result)

Protected Attributes

NodePtr _activeParent
ExternalUpdateHandler_externalUpdateHandler
Fields


SFNodePtr _sfTarget
SFNodePtr _sfActiveSubHandle
SFPnt2f _sfLastMousePos
SFViewportPtr _sfViewport
SFBool _sfActive
SFVec3f _sfLength
SFNodePtr _sfHandleXNode
SFNodePtr _sfHandleYNode
SFNodePtr _sfHandleZNode
SFNodePtr _sfTransXNode
SFNodePtr _sfTransYNode
SFNodePtr _sfTransZNode
SFMaterialPtr _sfMaterialX
SFMaterialPtr _sfMaterialY
SFMaterialPtr _sfMaterialZ
SFNodePtr _sfAxisLinesN
Fields


SFMatrixr _sfMatrix
Fields


MFParentFieldContainerPtr _mfParents
Fields


SFAttachmentObjPtrMap _sfAttachments
Type information


FieldFlags_pFieldFlags
MFChangedFunctorCallback _mfChangedFunctors
Int32 _iRefCount
Member


BitVector _bvChanged
ContainerChangeEntry_pContainerChanges
UInt32 _uiContainerId

Static Protected Attributes

static TypeObject _type

Private Member Functions

void operator= (const Manipulator &source)

Private Attributes

ComponentTransformPtr _transHandleXC
ComponentTransformPtr _transHandleYC
ComponentTransformPtr _transHandleZC

Friends

class FieldContainer
class ManipulatorBase

Detailed Description

Baseclass for all Manipulators

Definition at line 58 of file OSGManipulator.h.


Member Typedef Documentation

Reimplemented from OSG::TransformBase.

Reimplemented in OSG::RotateManipulatorBase, OSG::MoveManipulatorBase, and OSG::ScaleManipulatorBase.

Definition at line 98 of file OSGManipulatorBase.h.

Reimplemented from OSG::TransformBase.

Reimplemented in OSG::RotateManipulatorBase, OSG::MoveManipulatorBase, and OSG::ScaleManipulatorBase.

Definition at line 100 of file OSGManipulatorBase.h.

Reimplemented from OSG::TransformBase.

Reimplemented in OSG::RotateManipulatorBase, OSG::MoveManipulatorBase, and OSG::ScaleManipulatorBase.

Definition at line 101 of file OSGManipulatorBase.h.

typedef MFParentFieldContainerPtr OSG::NodeCore::ParentField [inherited]

Definition at line 77 of file OSGNodeCore.h.

typedef const MFParentFieldContainerPtr* OSG::NodeCore::ParentFieldPtr [inherited]

Definition at line 78 of file OSGNodeCore.h.

typedef MFParentFieldContainerPtr::const_iterator OSG::NodeCore::ParentFieldIt [inherited]

Definition at line 79 of file OSGNodeCore.h.