Added support for set/getColor to ShapeDrawable.
This commit is contained in:
@@ -123,12 +123,19 @@ class SG_EXPORT ShapeDrawable : public Drawable
|
||||
virtual const char* libraryName() const { return "osg"; }
|
||||
virtual const char* className() const { return "ShapeDrawable"; }
|
||||
|
||||
/** set the color of the shape.*/
|
||||
void setColor(const Vec4& color) { _color = color; }
|
||||
|
||||
/** get the color of the shape.*/
|
||||
const Vec4& getColor() const { return _color; }
|
||||
|
||||
void setTessellationHints(TessellationHints* hints) { _tessellationHints = hints; }
|
||||
|
||||
TessellationHints* getTessellationHints() { return _tessellationHints.get(); }
|
||||
const TessellationHints* getTessellationHints() const { return _tessellationHints.get(); }
|
||||
|
||||
|
||||
|
||||
/** draw ShapeDrawable directly ignoring an OpenGL display list which could be attached.
|
||||
* This is the internal draw method which does the drawing itself,
|
||||
* and is the method to override when deriving from ShapeDrawable for user-drawn objects.
|
||||
@@ -158,6 +165,8 @@ class SG_EXPORT ShapeDrawable : public Drawable
|
||||
|
||||
virtual bool computeBound() const;
|
||||
|
||||
Vec4 _color;
|
||||
|
||||
ref_ptr<TessellationHints> _tessellationHints;
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user