From Wang Rui, "The osgManipulator serializers are ready now. I need to modify the
META_OSGMANIPULATOR_Object macro to ensure these classes could work with their wrappers, and a few naming styles should be changed as well. Fortunately everything seems to compile fine under Windows and my new Ubuntu system. And I finally find the problem of the serializers/osgTerrain/Terrain.cpp, it just missed an "osg::Group" before "osg::CoordinateSystemNode" indicator. With the small fix attached now VPB could generate terrain with osgt/osgb formats."
This commit is contained in:
@@ -51,7 +51,7 @@ class OSGMANIPULATOR_EXPORT AntiSquish: public osg::MatrixTransform
|
||||
_dirty = true;
|
||||
}
|
||||
|
||||
const osg::Vec3d& getPivot() { return _pivot; }
|
||||
const osg::Vec3d& getPivot() const { return _pivot; }
|
||||
|
||||
void setPosition(const osg::Vec3d& pos)
|
||||
{
|
||||
@@ -60,7 +60,7 @@ class OSGMANIPULATOR_EXPORT AntiSquish: public osg::MatrixTransform
|
||||
_dirty = true;
|
||||
}
|
||||
|
||||
const osg::Vec3d& getPosition() { return _position; }
|
||||
const osg::Vec3d& getPosition() const { return _position; }
|
||||
|
||||
virtual ~AntiSquish();
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#endif
|
||||
|
||||
#define META_OSGMANIPULATOR_Object(library,name) \
|
||||
virtual osg::Object* cloneType() const { return new 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; }
|
||||
|
||||
@@ -41,7 +41,7 @@ class OSGMANIPULATOR_EXPORT RotateCylinderDragger : public Dragger
|
||||
|
||||
/** Set/Get color for dragger. */
|
||||
inline void setColor(const osg::Vec4& color) { _color = color; setMaterialColor(_color,*this); }
|
||||
inline const osg::Vec4 getColor() const { return _color; }
|
||||
inline const osg::Vec4& getColor() const { return _color; }
|
||||
|
||||
/**
|
||||
* Set/Get pick color for dragger. Pick color is color of the dragger
|
||||
@@ -49,7 +49,7 @@ class OSGMANIPULATOR_EXPORT RotateCylinderDragger : public Dragger
|
||||
* been picked.
|
||||
*/
|
||||
inline void setPickColor(const osg::Vec4& color) { _pickColor = color; }
|
||||
inline const osg::Vec4 getPickColor() const { return _pickColor; }
|
||||
inline const osg::Vec4& getPickColor() const { return _pickColor; }
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
@@ -41,7 +41,7 @@ class OSGMANIPULATOR_EXPORT RotateSphereDragger : public Dragger
|
||||
|
||||
/** Set/Get color for dragger. */
|
||||
inline void setColor(const osg::Vec4& color) { _color = color; setMaterialColor(_color,*this); }
|
||||
inline const osg::Vec4 getColor() const { return _color; }
|
||||
inline const osg::Vec4& getColor() const { return _color; }
|
||||
|
||||
/**
|
||||
* Set/Get pick color for dragger. Pick color is color of the dragger
|
||||
@@ -49,7 +49,7 @@ class OSGMANIPULATOR_EXPORT RotateSphereDragger : public Dragger
|
||||
* been picked.
|
||||
*/
|
||||
inline void setPickColor(const osg::Vec4& color) { _pickColor = color; }
|
||||
inline const osg::Vec4 getPickColor() const { return _pickColor; }
|
||||
inline const osg::Vec4& getPickColor() const { return _pickColor; }
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ class OSGMANIPULATOR_EXPORT Scale1DDragger : public Dragger
|
||||
|
||||
/** Set/Get color for dragger. */
|
||||
inline void setColor(const osg::Vec4& color) { _color = color; setMaterialColor(_color,*this); }
|
||||
inline const osg::Vec4 getColor() const { return _color; }
|
||||
inline const osg::Vec4& getColor() const { return _color; }
|
||||
|
||||
/**
|
||||
* Set/Get pick color for dragger. Pick color is color of the dragger
|
||||
@@ -59,19 +59,21 @@ class OSGMANIPULATOR_EXPORT Scale1DDragger : public Dragger
|
||||
* been picked.
|
||||
*/
|
||||
inline void setPickColor(const osg::Vec4& color) { _pickColor = color; }
|
||||
inline const osg::Vec4 getPickColor() const { return _pickColor; }
|
||||
inline const osg::Vec4& getPickColor() const { return _pickColor; }
|
||||
|
||||
/** Set/Get left and right handle nodes for dragger. */
|
||||
inline void setLeftHandleNode (osg::Node& node) { _leftHandleNode = &node; }
|
||||
inline void setRightHandleNode(osg::Node& node) { _rightHandleNode = &node; }
|
||||
inline osg::Node* getLeftHandleNode() { return _leftHandleNode.get(); }
|
||||
inline const osg::Node* getLeftHandleNode() const { return _leftHandleNode.get(); }
|
||||
inline osg::Node* getRightHandleNode() { return _rightHandleNode.get(); }
|
||||
inline const osg::Node* getRightHandleNode() const { return _rightHandleNode.get(); }
|
||||
|
||||
/** Set left/right handle position. */
|
||||
inline void setLeftHandlePosition(double pos) { _projector->getLineStart() = osg::Vec3d(pos,0.0,0.0); }
|
||||
inline double getLeftHandlePosition() const { return _projector->getLineStart()[0]; }
|
||||
inline void setRightHandlePosition(double pos) { _projector->getLineEnd() = osg::Vec3d(pos,0.0,0.0); }
|
||||
inline double getRightHandlePosition() { return _projector->getLineEnd()[0]; }
|
||||
inline double getRightHandlePosition() const { return _projector->getLineEnd()[0]; }
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ class OSGMANIPULATOR_EXPORT Scale2DDragger : public Dragger
|
||||
|
||||
/** Set/Get color for dragger. */
|
||||
inline void setColor(const osg::Vec4& color) { _color = color; setMaterialColor(_color,*this); }
|
||||
inline const osg::Vec4 getColor() const { return _color; }
|
||||
inline const osg::Vec4& getColor() const { return _color; }
|
||||
|
||||
/**
|
||||
* Set/Get pick color for dragger. Pick color is color of the dragger
|
||||
@@ -59,27 +59,31 @@ class OSGMANIPULATOR_EXPORT Scale2DDragger : public Dragger
|
||||
* been picked.
|
||||
*/
|
||||
inline void setPickColor(const osg::Vec4& color) { _pickColor = color; }
|
||||
inline const osg::Vec4 getPickColor() const { return _pickColor; }
|
||||
inline const osg::Vec4& getPickColor() const { return _pickColor; }
|
||||
|
||||
/** Set/Get the handle nodes for dragger. */
|
||||
inline void setTopLeftHandleNode (osg::Node& node) { _topLeftHandleNode = &node; }
|
||||
inline osg::Node* getTopLeftHandleNode() { return _topLeftHandleNode.get(); }
|
||||
inline const osg::Node* getTopLeftHandleNode() const { return _topLeftHandleNode.get(); }
|
||||
inline void setBottomLeftHandleNode (osg::Node& node) { _bottomLeftHandleNode = &node; }
|
||||
inline osg::Node* getBottomLeftHandleNode() { return _bottomLeftHandleNode.get(); }
|
||||
inline const osg::Node* getBottomLeftHandleNode() const { return _bottomLeftHandleNode.get(); }
|
||||
inline void setTopRightHandleNode(osg::Node& node) { _topRightHandleNode = &node; }
|
||||
inline osg::Node* getTopRightHandleNode() { return _topRightHandleNode.get(); }
|
||||
inline const osg::Node* getTopRightHandleNode() const { return _topRightHandleNode.get(); }
|
||||
inline void setBottomRightHandleNode(osg::Node& node) { _bottomRightHandleNode = &node; }
|
||||
inline osg::Node* getBottomRightHandleNode() { return _bottomRightHandleNode.get(); }
|
||||
inline const osg::Node* getBottomRightHandleNode() const { return _bottomRightHandleNode.get(); }
|
||||
|
||||
/** Set/Get the handle nodes postion for dragger. */
|
||||
inline void setTopLeftHandlePosition(const osg::Vec2d& pos) { _topLeftHandlePosition = pos; }
|
||||
const osg::Vec2d& getTopLeftHandlePosition() { return _topLeftHandlePosition; }
|
||||
const osg::Vec2d& getTopLeftHandlePosition() const { return _topLeftHandlePosition; }
|
||||
inline void setBottomLeftHandlePosition(const osg::Vec2d& pos) { _bottomLeftHandlePosition = pos; }
|
||||
const osg::Vec2d& getBottomLeftHandlePosition() { return _bottomLeftHandlePosition; }
|
||||
const osg::Vec2d& getBottomLeftHandlePosition() const { return _bottomLeftHandlePosition; }
|
||||
inline void setTopRightHandlePosition(const osg::Vec2d& pos) { _topRightHandlePosition = pos; }
|
||||
const osg::Vec2d& getTopRightHandlePosition() { return _topRightHandlePosition; }
|
||||
const osg::Vec2d& getTopRightHandlePosition() const { return _topRightHandlePosition; }
|
||||
inline void setBottomRightHandlePosition(const osg::Vec2d& pos){ _bottomRightHandlePosition = pos; }
|
||||
const osg::Vec2d& getBottomRightHandlePosition() { return _bottomRightHandlePosition; }
|
||||
const osg::Vec2d& getBottomRightHandlePosition() const { return _bottomRightHandlePosition; }
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
@@ -42,12 +42,12 @@ class OSGMANIPULATOR_EXPORT Translate1DDragger : public Dragger
|
||||
|
||||
/** Set/Get color for dragger. */
|
||||
inline void setColor(const osg::Vec4& color) { _color = color; setMaterialColor(_color,*this); }
|
||||
inline const osg::Vec4 getColor() const { return _color; }
|
||||
inline const osg::Vec4& getColor() const { return _color; }
|
||||
|
||||
/** Set/Get pick color for dragger. Pick color is color of the dragger when picked.
|
||||
It gives a visual feedback to show that the dragger has been picked. */
|
||||
inline void setPickColor(const osg::Vec4& color) { _pickColor = color; }
|
||||
inline const osg::Vec4 getPickColor() const { return _pickColor; }
|
||||
inline const osg::Vec4& getPickColor() const { return _pickColor; }
|
||||
|
||||
inline void setCheckForNodeInNodePath(bool onOff) { _checkForNodeInNodePath = onOff; }
|
||||
|
||||
|
||||
@@ -43,12 +43,12 @@ class OSGMANIPULATOR_EXPORT Translate2DDragger : public Dragger
|
||||
|
||||
/** Set/Get color for dragger. */
|
||||
inline void setColor(const osg::Vec4& color) { _color = color; setMaterialColor(_color,*this); }
|
||||
inline const osg::Vec4 getColor() const { return _color; }
|
||||
inline const osg::Vec4& getColor() const { return _color; }
|
||||
|
||||
/** Set/Get pick color for dragger. Pick color is color of the dragger when picked.
|
||||
It gives a visual feedback to show that the dragger has been picked. */
|
||||
inline void setPickColor(const osg::Vec4& color) { _pickColor = color; }
|
||||
inline const osg::Vec4 getPickColor() const { return _pickColor; }
|
||||
inline const osg::Vec4& getPickColor() const { return _pickColor; }
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user