OpenSceneGraph
3.4.0
|
Allow the use of Shape
s as Drawable
s, so that they can be rendered with reduced effort.
More...
Public Member Functions | |
ShapeDrawable () | |
ShapeDrawable (Shape *shape, TessellationHints *hints=0) | |
ShapeDrawable (const ShapeDrawable &pg, const CopyOp ©op=CopyOp::SHALLOW_COPY) | |
Copy constructor using CopyOp to manage deep vs shallow copy. | |
virtual Object * | cloneType () const |
clone an object of the same type as the node. | |
virtual Object * | clone (const CopyOp ©op) const |
return a clone of a node, with Object* return type. | |
virtual bool | isSameKindAs (const Object *obj) const |
return true if this and obj are of the same kind of object. | |
virtual const char * | libraryName () const |
return the name of the node's library. | |
virtual const char * | className () const |
return the name of the node's class type. | |
void | setColor (const Vec4 &color) |
Set the color of the shape. | |
const Vec4 & | getColor () const |
Get the color of the shape. | |
void | setTessellationHints (TessellationHints *hints) |
TessellationHints * | getTessellationHints () |
const TessellationHints * | getTessellationHints () const |
virtual void | drawImplementation (RenderInfo &renderInfo) const |
Draw ShapeDrawable directly ignoring an OpenGL display list which could be attached. | |
virtual bool | supports (const AttributeFunctor &) const |
Return false, osg::ShapeDrawable does not support accept(AttributeFunctor&). | |
virtual bool | supports (const Drawable::ConstAttributeFunctor &) const |
Return true, osg::ShapeDrawable does support accept(Drawable::ConstAttributeFunctor&). | |
virtual void | accept (Drawable::ConstAttributeFunctor &af) const |
Accept a Drawable::ConstAttributeFunctor and call its methods to tell it about the internal attributes that this Drawable has. | |
virtual bool | supports (const PrimitiveFunctor &) const |
Return true, osg::ShapeDrawable does support accept(PrimitiveFunctor&) . | |
virtual void | accept (PrimitiveFunctor &pf) const |
Accept a PrimitiveFunctor and call its methods to tell it about the internal primitives that this Drawable has. | |
virtual BoundingBox | computeBoundingBox () const |
Compute the bounding box around Drawables's geometry. | |
Protected Member Functions | |
ShapeDrawable & | operator= (const ShapeDrawable &) |
virtual | ~ShapeDrawable () |
Protected Attributes | |
Vec4 | _color |
ref_ptr< TessellationHints > | _tessellationHints |
Allow the use of Shape
s as Drawable
s, so that they can be rendered with reduced effort.
The implementation of ShapeDrawable
is not geared to efficiency; it's better to think of it as a convenience to render Shape
s easily (perhaps for test or debugging purposes) than as the right way to render basic shapes in some efficiency-critical section of code.
osg::ShapeDrawable::ShapeDrawable | ( | Shape * | shape, |
TessellationHints * | hints = 0 |
||
) |
osg::ShapeDrawable::ShapeDrawable | ( | const ShapeDrawable & | pg, |
const CopyOp & | copyop = CopyOp::SHALLOW_COPY |
||
) |
Copy constructor using CopyOp to manage deep vs shallow copy.
virtual osg::ShapeDrawable::~ShapeDrawable | ( | ) | [protected, virtual] |
virtual void osg::ShapeDrawable::accept | ( | Drawable::ConstAttributeFunctor & | af | ) | const [virtual] |
Accept a Drawable::ConstAttributeFunctor and call its methods to tell it about the internal attributes that this Drawable has.
Reimplemented from osg::Drawable.
virtual void osg::ShapeDrawable::accept | ( | PrimitiveFunctor & | pf | ) | const [virtual] |
Accept a PrimitiveFunctor and call its methods to tell it about the internal primitives that this Drawable has.
Reimplemented from osg::Drawable.
virtual const char* osg::ShapeDrawable::className | ( | ) | const [inline, virtual] |
return the name of the node's class type.
Reimplemented from osg::Node.
virtual Object* osg::ShapeDrawable::clone | ( | const CopyOp & | copyop | ) | const [inline, virtual] |
return a clone of a node, with Object* return type.
Reimplemented from osg::Node.
virtual Object* osg::ShapeDrawable::cloneType | ( | ) | const [inline, virtual] |
clone an object of the same type as the node.
Reimplemented from osg::Node.
virtual BoundingBox osg::ShapeDrawable::computeBoundingBox | ( | ) | const [virtual] |
Compute the bounding box around Drawables's geometry.
Reimplemented from osg::Drawable.
virtual void osg::ShapeDrawable::drawImplementation | ( | RenderInfo & | renderInfo | ) | const [virtual] |
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.
Reimplemented from osg::Drawable.
const Vec4& osg::ShapeDrawable::getColor | ( | ) | const [inline] |
Get the color of the shape.
TessellationHints* osg::ShapeDrawable::getTessellationHints | ( | ) | [inline] |
const TessellationHints* osg::ShapeDrawable::getTessellationHints | ( | ) | const [inline] |
virtual bool osg::ShapeDrawable::isSameKindAs | ( | const Object * | obj | ) | const [inline, virtual] |
virtual const char* osg::ShapeDrawable::libraryName | ( | ) | const [inline, virtual] |
return the name of the node's library.
Reimplemented from osg::Node.
ShapeDrawable& osg::ShapeDrawable::operator= | ( | const ShapeDrawable & | ) | [inline, protected] |
void osg::ShapeDrawable::setColor | ( | const Vec4 & | color | ) |
Set the color of the shape.
virtual bool osg::ShapeDrawable::supports | ( | const AttributeFunctor & | ) | const [inline, virtual] |
Return false, osg::ShapeDrawable does not support accept(AttributeFunctor&).
Reimplemented from osg::Drawable.
virtual bool osg::ShapeDrawable::supports | ( | const Drawable::ConstAttributeFunctor & | ) | const [inline, virtual] |
Return true, osg::ShapeDrawable does support accept(Drawable::ConstAttributeFunctor&).
Reimplemented from osg::Drawable.
virtual bool osg::ShapeDrawable::supports | ( | const PrimitiveFunctor & | ) | const [inline, virtual] |
Return true, osg::ShapeDrawable does support accept(PrimitiveFunctor&) .
Reimplemented from osg::Drawable.
Vec4 osg::ShapeDrawable::_color [protected] |
![]() | Generated at Tue Dec 8 2015 00:16:43 for the OpenSceneGraph by doxygen 1.7.6.1. |