From David Callu, "osgManipulator Object have not META_Object macro call in class definition.
> I add META_OSGMANIPULATOR_Object macro which define className, libraryName, > isSameKindAs methods. > Clone method is not appropriate for osgManipulator Object."
This commit is contained in:
parent
c58ff9b656
commit
31608b2559
@ -143,6 +143,8 @@ class OSGMANIPULATOR_EXPORT Dragger : public Selection
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
META_OSGMANIPULATOR_Object(osgManipulator,Dragger)
|
||||||
|
|
||||||
/** Set/Get the CommandManager. Draggers use CommandManager to dispatch commands. */
|
/** Set/Get the CommandManager. Draggers use CommandManager to dispatch commands. */
|
||||||
virtual void setCommandManager(CommandManager* cm) { _commandManager = cm; }
|
virtual void setCommandManager(CommandManager* cm) { _commandManager = cm; }
|
||||||
CommandManager* getCommandManager() { return _commandManager; }
|
CommandManager* getCommandManager() { return _commandManager; }
|
||||||
@ -186,6 +188,8 @@ class OSGMANIPULATOR_EXPORT CompositeDragger : public Dragger
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
META_OSGMANIPULATOR_Object(osgManipulator,CompositeDragger)
|
||||||
|
|
||||||
typedef std::vector< osg::ref_ptr<Dragger> > DraggerList;
|
typedef std::vector< osg::ref_ptr<Dragger> > DraggerList;
|
||||||
|
|
||||||
virtual const CompositeDragger* getComposite() const { return this; }
|
virtual const CompositeDragger* getComposite() const { return this; }
|
||||||
|
@ -29,6 +29,8 @@ class OSGMANIPULATOR_EXPORT RotateCylinderDragger : public Dragger
|
|||||||
|
|
||||||
RotateCylinderDragger();
|
RotateCylinderDragger();
|
||||||
|
|
||||||
|
META_OSGMANIPULATOR_Object(osgManipulator,RotateCylinderDragger)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle pick events on dragger and generate TranslateInLine commands.
|
* Handle pick events on dragger and generate TranslateInLine commands.
|
||||||
*/
|
*/
|
||||||
|
@ -29,6 +29,8 @@ class OSGMANIPULATOR_EXPORT RotateSphereDragger : public Dragger
|
|||||||
|
|
||||||
RotateSphereDragger();
|
RotateSphereDragger();
|
||||||
|
|
||||||
|
META_OSGMANIPULATOR_Object(osgManipulator,RotateSphereDragger)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle pick events on dragger and generate TranslateInLine commands.
|
* Handle pick events on dragger and generate TranslateInLine commands.
|
||||||
*/
|
*/
|
||||||
|
@ -35,6 +35,8 @@ class OSGMANIPULATOR_EXPORT Scale1DDragger : public Dragger
|
|||||||
|
|
||||||
Scale1DDragger(ScaleMode scaleMode=SCALE_WITH_ORIGIN_AS_PIVOT);
|
Scale1DDragger(ScaleMode scaleMode=SCALE_WITH_ORIGIN_AS_PIVOT);
|
||||||
|
|
||||||
|
META_OSGMANIPULATOR_Object(osgManipulator,Scale1DDragger)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle pick events on dragger and generate TranslateInLine commands.
|
* Handle pick events on dragger and generate TranslateInLine commands.
|
||||||
*/
|
*/
|
||||||
|
@ -35,6 +35,8 @@ class OSGMANIPULATOR_EXPORT Scale2DDragger : public Dragger
|
|||||||
|
|
||||||
Scale2DDragger(ScaleMode scaleMode=SCALE_WITH_ORIGIN_AS_PIVOT);
|
Scale2DDragger(ScaleMode scaleMode=SCALE_WITH_ORIGIN_AS_PIVOT);
|
||||||
|
|
||||||
|
META_OSGMANIPULATOR_Object(osgManipulator,Scale2DDragger)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle pick events on dragger and generate TranslateInLine commands.
|
* Handle pick events on dragger and generate TranslateInLine commands.
|
||||||
*/
|
*/
|
||||||
|
@ -28,6 +28,8 @@ class OSGMANIPULATOR_EXPORT ScaleAxisDragger : public CompositeDragger
|
|||||||
|
|
||||||
ScaleAxisDragger();
|
ScaleAxisDragger();
|
||||||
|
|
||||||
|
META_OSGMANIPULATOR_Object(osgManipulator,ScaleAxisDragger)
|
||||||
|
|
||||||
/** Setup default geometry for dragger. */
|
/** Setup default geometry for dragger. */
|
||||||
void setupDefaultGeometry();
|
void setupDefaultGeometry();
|
||||||
|
|
||||||
|
@ -31,6 +31,13 @@ class Rotate3DCommand;
|
|||||||
/** Computes the nodepath from the given node all the way upto the root. */
|
/** Computes the nodepath from the given node all the way upto the root. */
|
||||||
extern OSGMANIPULATOR_EXPORT void computeNodePathToRoot(osg::Node& node, osg::NodePath& np);
|
extern OSGMANIPULATOR_EXPORT void computeNodePathToRoot(osg::Node& node, osg::NodePath& np);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#define META_OSGMANIPULATOR_Object(library,name) \
|
||||||
|
virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast<const name *>(obj)!=NULL; } \
|
||||||
|
virtual const char* libraryName() const { return #library; }\
|
||||||
|
virtual const char* className() const { return #name; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Selection listens to motion commands generated by draggers.
|
* Selection listens to motion commands generated by draggers.
|
||||||
*/
|
*/
|
||||||
@ -40,6 +47,8 @@ class OSGMANIPULATOR_EXPORT Selection : public osg::MatrixTransform
|
|||||||
|
|
||||||
Selection();
|
Selection();
|
||||||
|
|
||||||
|
META_OSGMANIPULATOR_Object(osgManipulator,Selection)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Receive motion commands and set the MatrixTransform accordingly to
|
* Receive motion commands and set the MatrixTransform accordingly to
|
||||||
* transform selections. Returns true on success.
|
* transform selections. Returns true on success.
|
||||||
|
@ -29,6 +29,8 @@ class OSGMANIPULATOR_EXPORT TabBoxDragger : public CompositeDragger
|
|||||||
|
|
||||||
TabBoxDragger();
|
TabBoxDragger();
|
||||||
|
|
||||||
|
META_OSGMANIPULATOR_Object(osgManipulator,TabBoxDragger)
|
||||||
|
|
||||||
/** Setup default geometry for dragger. */
|
/** Setup default geometry for dragger. */
|
||||||
void setupDefaultGeometry();
|
void setupDefaultGeometry();
|
||||||
|
|
||||||
|
@ -31,6 +31,8 @@ class OSGMANIPULATOR_EXPORT TabPlaneDragger : public CompositeDragger
|
|||||||
|
|
||||||
TabPlaneDragger();
|
TabPlaneDragger();
|
||||||
|
|
||||||
|
META_OSGMANIPULATOR_Object(osgManipulator,TabPlaneDragger)
|
||||||
|
|
||||||
virtual bool handle(const PointerInfo& pi, const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us);
|
virtual bool handle(const PointerInfo& pi, const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us);
|
||||||
|
|
||||||
/** Setup default geometry for dragger. */
|
/** Setup default geometry for dragger. */
|
||||||
|
@ -29,6 +29,8 @@ class OSGMANIPULATOR_EXPORT TabPlaneTrackballDragger : public CompositeDragger
|
|||||||
|
|
||||||
TabPlaneTrackballDragger();
|
TabPlaneTrackballDragger();
|
||||||
|
|
||||||
|
META_OSGMANIPULATOR_Object(osgManipulator,TabPlaneTrackballDragger)
|
||||||
|
|
||||||
/** Setup default geometry for dragger. */
|
/** Setup default geometry for dragger. */
|
||||||
void setupDefaultGeometry();
|
void setupDefaultGeometry();
|
||||||
|
|
||||||
|
@ -29,6 +29,8 @@ class OSGMANIPULATOR_EXPORT TrackballDragger : public CompositeDragger
|
|||||||
|
|
||||||
TrackballDragger(bool useAutoTransform=false);
|
TrackballDragger(bool useAutoTransform=false);
|
||||||
|
|
||||||
|
META_OSGMANIPULATOR_Object(osgManipulator,TrackballDragger)
|
||||||
|
|
||||||
/** Setup default geometry for dragger. */
|
/** Setup default geometry for dragger. */
|
||||||
void setupDefaultGeometry();
|
void setupDefaultGeometry();
|
||||||
|
|
||||||
|
@ -30,6 +30,8 @@ class OSGMANIPULATOR_EXPORT Translate1DDragger : public Dragger
|
|||||||
|
|
||||||
Translate1DDragger();
|
Translate1DDragger();
|
||||||
|
|
||||||
|
META_OSGMANIPULATOR_Object(osgManipulator,Translate1DDragger)
|
||||||
|
|
||||||
Translate1DDragger(const osg::Vec3d& s, const osg::Vec3d& e);
|
Translate1DDragger(const osg::Vec3d& s, const osg::Vec3d& e);
|
||||||
|
|
||||||
/** Handle pick events on dragger and generate TranslateInLine commands. */
|
/** Handle pick events on dragger and generate TranslateInLine commands. */
|
||||||
|
@ -33,6 +33,8 @@ class OSGMANIPULATOR_EXPORT Translate2DDragger : public Dragger
|
|||||||
|
|
||||||
Translate2DDragger(const osg::Plane& plane);
|
Translate2DDragger(const osg::Plane& plane);
|
||||||
|
|
||||||
|
META_OSGMANIPULATOR_Object(osgManipulator,Translate2DDragger)
|
||||||
|
|
||||||
/** Handle pick events on dragger and generate TranslateInLine commands. */
|
/** Handle pick events on dragger and generate TranslateInLine commands. */
|
||||||
virtual bool handle(const PointerInfo& pi, const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us);
|
virtual bool handle(const PointerInfo& pi, const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us);
|
||||||
|
|
||||||
|
@ -28,6 +28,8 @@ class OSGMANIPULATOR_EXPORT TranslateAxisDragger : public CompositeDragger
|
|||||||
|
|
||||||
TranslateAxisDragger();
|
TranslateAxisDragger();
|
||||||
|
|
||||||
|
META_OSGMANIPULATOR_Object(osgManipulator,TranslateAxisDragger)
|
||||||
|
|
||||||
/** Setup default geometry for dragger. */
|
/** Setup default geometry for dragger. */
|
||||||
void setupDefaultGeometry();
|
void setupDefaultGeometry();
|
||||||
|
|
||||||
|
@ -30,6 +30,8 @@ class OSGMANIPULATOR_EXPORT TranslatePlaneDragger : public CompositeDragger
|
|||||||
|
|
||||||
TranslatePlaneDragger();
|
TranslatePlaneDragger();
|
||||||
|
|
||||||
|
META_OSGMANIPULATOR_Object(osgManipulator,TranslatePlaneDragger)
|
||||||
|
|
||||||
virtual bool handle(const PointerInfo& pi, const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us);
|
virtual bool handle(const PointerInfo& pi, const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us);
|
||||||
|
|
||||||
/** Setup default geometry for dragger. */
|
/** Setup default geometry for dragger. */
|
||||||
|
Loading…
Reference in New Issue
Block a user