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 the type of an object, with Object* return type.
|
| virtual Object * | clone (const CopyOp ©op) const |
| | Clone an object, with Object* return type.
|
| virtual bool | isSameKindAs (const Object *obj) const |
| virtual const char * | libraryName () const |
| | return the name of the object's library.
|
| virtual const char * | className () const |
| | return the name of the object'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 | computeBound () const |
| | Compute the bounding box around Drawables's geometry.
|
| | Drawable () |
| | Drawable (const Drawable &drawable, const CopyOp ©op=CopyOp::SHALLOW_COPY) |
| | Copy constructor using CopyOp to manage deep vs shallow copy.
|
| virtual Geometry * | asGeometry () |
| | Convert 'this' into a Geometry pointer if Drawable is a Geometry, otherwise return 0.
|
| virtual const Geometry * | asGeometry () const |
| | Convert 'const this' into a const Geometry pointer if Drawable is a Geometry, otherwise return 0.
|
| virtual void | computeDataVariance () |
| | Compute the DataVariance based on an assessment of callback etc.
|
| const ParentList & | getParents () const |
| | Get the parent list of drawable.
|
| ParentList | getParents () |
| | Get the a copy of parent list of node.
|
| Node * | getParent (unsigned int i) |
| | Get a single parent of Drawable.
|
| const Node * | getParent (unsigned int i) const |
| | Get a single const parent of Drawable.
|
| unsigned int | getNumParents () const |
| | Get the number of parents of node.
|
| MatrixList | getWorldMatrices (const osg::Node *haltTraversalAtNode=0) const |
| | Get the list of matrices that transform this node from local coordinates to world coordinates.
|
| void | setStateSet (StateSet *stateset) |
| | Set the StateSet attached to the Drawable.
|
| StateSet * | getStateSet () |
| | Get the attached StateSet.
|
| const StateSet * | getStateSet () const |
| | Get the attached const StateSet.
|
| StateSet * | getOrCreateStateSet () |
| | Get the attached const StateSet, if one is not already attached create one, attach it to the drawable and return a pointer to it.
|
| void | setInitialBound (const osg::BoundingBox &bbox) |
| | Set the initial bounding volume to use when computing the overall bounding volume.
|
| const BoundingBox & | getInitialBound () const |
| | Set the initial bounding volume to use when computing the overall bounding volume.
|
| void | dirtyBound () |
| | Dirty the bounding box, forcing a computeBound() on the next call to getBound().
|
| const BoundingBox & | getBound () const |
| | Get BoundingBox of Drawable.
|
| void | setComputeBoundingBoxCallback (ComputeBoundingBoxCallback *callback) |
| | Set the compute bound callback to override the default computeBound.
|
| ComputeBoundingBoxCallback * | getComputeBoundingBoxCallback () |
| | Get the compute bound callback.
|
| const ComputeBoundingBoxCallback * | getComputeBoundingBoxCallback () const |
| | Get the const compute bound callback.
|
| void | setShape (Shape *shape) |
| | Set the Shape of the Drawable.
|
| Shape * | getShape () |
| | Get the Shape of the Drawable.
|
| const Shape * | getShape () const |
| | Get the const Shape of the const Drawable.
|
| void | setSupportsDisplayList (bool flag) |
| | Set the drawable so that it can or cannot be used in conjunction with OpenGL display lists.
|
| bool | getSupportsDisplayList () const |
| | Get whether display lists are supported for this drawable instance.
|
| void | setUseDisplayList (bool flag) |
| | When set to true, force the draw method to use OpenGL Display List for rendering.
|
| bool | getUseDisplayList () const |
| | Return whether OpenGL display lists are being used for rendering.
|
| GLuint & | getDisplayList (unsigned int contextID) const |
| | Return OpenGL display list for specified contextID.
|
| virtual void | setUseVertexBufferObjects (bool flag) |
| | When set to true, ignore the setUseDisplayList() settings, and hints to the drawImplementation method to use OpenGL vertex buffer objects for rendering.
|
| bool | getUseVertexBufferObjects () const |
| | Return whether OpenGL vertex buffer objects should be used when supported by OpenGL driver.
|
| virtual void | dirtyDisplayList () |
| | Force a recompile on next draw() of any OpenGL display list associated with this geoset.
|
| virtual unsigned int | getGLObjectSizeHint () const |
| | Return the estimated size of GLObjects (display lists/vertex buffer objects) that are associated with this drawable.
|
| void | draw (RenderInfo &renderInfo) const |
| | Draw OpenGL primitives.
|
| virtual void | compileGLObjects (RenderInfo &renderInfo) const |
| | Immediately compile this Drawable into an OpenGL Display List/VertexBufferObjects.
|
| virtual void | setThreadSafeRefUnref (bool threadSafe) |
| | Set whether to use a mutex to ensure ref() and unref() are thread safe.
|
| virtual void | resizeGLObjectBuffers (unsigned int maxSize) |
| | Resize any per context GLObject buffers to specified size.
|
| virtual void | releaseGLObjects (State *state=0) const |
| | If State is non-zero, this function releases OpenGL objects for the specified graphics context.
|
| virtual void | setUpdateCallback (UpdateCallback *ac) |
| | Set the UpdateCallback which allows users to attach customize the updating of an object during the update traversal.
|
| UpdateCallback * | getUpdateCallback () |
| | Get the non const UpdateCallback.
|
| const UpdateCallback * | getUpdateCallback () const |
| | Get the const UpdateCallback.
|
| bool | requiresUpdateTraversal () const |
| | Return whether this Drawable has update callbacks associated with it, and therefore must be traversed.
|
| virtual void | setEventCallback (EventCallback *ac) |
| | Set the EventCallback which allows users to attach customize the updating of an object during the Event traversal.
|
| EventCallback * | getEventCallback () |
| | Get the non const EventCallback.
|
| const EventCallback * | getEventCallback () const |
| | Get the const EventCallback.
|
| bool | requiresEventTraversal () const |
| | Return whether this Drawable has event callbacks associated with it, and therefore must be traversed.
|
| virtual void | setCullCallback (CullCallback *cc) |
| | Set the CullCallback which allows users to customize the culling of Drawable during the cull traversal.
|
| CullCallback * | getCullCallback () |
| | Get the non const CullCallback.
|
| const CullCallback * | getCullCallback () const |
| | Get the const CullCallback.
|
| virtual void | setDrawCallback (DrawCallback *dc) |
| | Set the DrawCallback which allows users to attach customize the drawing of existing Drawable object.
|
| DrawCallback * | getDrawCallback () |
| | Get the non const DrawCallback.
|
| const DrawCallback * | getDrawCallback () const |
| | Get the const DrawCallback.
|
| virtual void | accept (AttributeFunctor &) |
| | accept an AttributeFunctor and call its methods to tell it about the internal attributes that this Drawable has.
|
| virtual bool | supports (const PrimitiveIndexFunctor &) const |
| | Return true if the Drawable subclass supports accept(PrimitiveIndexFunctor&).
|
| virtual void | accept (PrimitiveIndexFunctor &) const |
| | Accept a PrimitiveIndexFunctor and call its methods to tell it about the internal primitives that this Drawable has.
|
| | Object () |
| | Construct an object.
|
| | Object (bool threadSafeRefUnref) |
| | Object (const Object &, const CopyOp ©op=CopyOp::SHALLOW_COPY) |
| | Copy constructor, optional CopyOp object can be used to control shallow vs deep copying of dynamic data.
|
| virtual void | setName (const std::string &name) |
| | Set the name of object using C++ style string.
|
| void | setName (const char *name) |
| | Set the name of object using a C style string.
|
| const std::string & | getName () const |
| | Get the name of object.
|
| void | setDataVariance (DataVariance dv) |
| | Set the data variance of this object.
|
| DataVariance | getDataVariance () const |
| | Get the data variance of this object.
|
| void | setUserDataContainer (osg::UserDataContainer *udc) |
| | set the UserDataContainer object.
|
| osg::UserDataContainer * | getUserDataContainer () |
| | get the UserDataContainer attached to this object.
|
| const osg::UserDataContainer * | getUserDataContainer () const |
| | get the const UserDataContainer attached to this object.
|
| osg::UserDataContainer * | getOrCreateUserDataContainer () |
| | Convinience method that returns the UserDataContainer, and if one doesn't already exist creates and assigns a DefaultUserDataContainer to the Object and then return this new UserDataContainer.
|
| virtual void | setUserData (Referenced *obj) |
| | Set user data, data must be subclassed from Referenced to allow automatic memory handling.
|
| virtual Referenced * | getUserData () |
| | Get user data.
|
| virtual const Referenced * | getUserData () const |
| | Get const user data.
|
| template<typename T > |
| bool | getUserValue (const std::string &name, T &value) const |
| | Convinience method that casts the named UserObject to osg::TemplateValueObject<T> and gets the value.
|
| template<typename T > |
| void | setUserValue (const std::string &name, const T &value) |
| | Convinience method that creates the osg::TemplateValueObject<T> to store the specified value and adds it as a named UserObject.
|
| | Referenced () |
| | Referenced (bool threadSafeRefUnref) |
| | Referenced (const Referenced &) |
| Referenced & | operator= (const Referenced &) |
| bool | getThreadSafeRefUnref () const |
| | Get whether a mutex is used to ensure ref() and unref() are thread safe.
|
| OpenThreads::Mutex * | getRefMutex () const |
| | Get the mutex used to ensure thread safety of ref()/unref().
|
| int | ref () const |
| | Increment the reference count by one, indicating that this object has another pointer which is referencing it.
|
| int | unref () const |
| | Decrement the reference count by one, indicating that a pointer to this object is referencing it.
|
| int | unref_nodelete () const |
| | Decrement the reference count by one, indicating that a pointer to this object is referencing it.
|
| int | referenceCount () const |
| | Return the number of pointers currently referencing this object.
|
| ObserverSet * | getObserverSet () const |
| | Get the ObserverSet if one is attached, otherwise return NULL.
|
| ObserverSet * | getOrCreateObserverSet () const |
| | Get the ObserverSet if one is attached, otherwise create an ObserverSet, attach it, then return this newly created ObserverSet.
|
| void | addObserver (Observer *observer) const |
| | Add a Observer that is observing this object, notify the Observer when this object gets deleted.
|
| void | removeObserver (Observer *observer) const |
| | Remove Observer that is observing this object.
|
Additional Inherited Members |
| enum | AttributeTypes {
VERTICES = 0,
WEIGHTS = 1,
NORMALS = 2,
COLORS = 3,
SECONDARY_COLORS = 4,
FOG_COORDS = 5,
ATTRIBUTE_6 = 6,
ATTRIBUTE_7 = 7,
TEXTURE_COORDS = 8,
TEXTURE_COORDS_0 = TEXTURE_COORDS,
TEXTURE_COORDS_1 = TEXTURE_COORDS_0+1,
TEXTURE_COORDS_2 = TEXTURE_COORDS_0+2,
TEXTURE_COORDS_3 = TEXTURE_COORDS_0+3,
TEXTURE_COORDS_4 = TEXTURE_COORDS_0+4,
TEXTURE_COORDS_5 = TEXTURE_COORDS_0+5,
TEXTURE_COORDS_6 = TEXTURE_COORDS_0+6,
TEXTURE_COORDS_7 = TEXTURE_COORDS_0+7
} |
| typedef std::vector< Node * > | ParentList |
| | A vector of osg::Node pointers which is used to store the parent(s) of drawable.
|
| typedef unsigned int | AttributeType |
| static GLuint | generateDisplayList (unsigned int contextID, unsigned int sizeHint=0) |
| | Return a OpenGL display list handle a newly generated or reused from display list cache.
|
| static void | setMinimumNumberOfDisplayListsToRetainInCache (unsigned int minimum) |
| | Set the minimum number of display lists to retain in the deleted display list cache.
|
| static unsigned int | getMinimumNumberOfDisplayListsToRetainInCache () |
| | Get the minimum number of display lists to retain in the deleted display list cache.
|
| static void | deleteDisplayList (unsigned int contextID, GLuint globj, unsigned int sizeHint=0) |
| | Use deleteDisplayList instead of glDeleteList to allow OpenGL display list to be cached until they can be deleted by the OpenGL context in which they were created, specified by contextID.
|
| static void | flushAllDeletedDisplayLists (unsigned int contextID) |
| | Flush all the cached display list which need to be deleted in the OpenGL context related to contextID.
|
| static void | discardAllDeletedDisplayLists (unsigned int contextID) |
| | Flush all the cached display list which need to be deleted in the OpenGL context related to contextID.
|
| static void | flushDeletedDisplayLists (unsigned int contextID, double &availableTime) |
| | Flush the cached display list which need to be deleted in the OpenGL context related to contextID.
|
| static Extensions * | getExtensions (unsigned int contextID, bool createIfNotInitalized) |
| | Function to call to get the extension of a specified context.
|
| static void | setExtensions (unsigned int contextID, Extensions *extensions) |
| | setExtensions allows users to override the extensions across graphics contexts.
|
| static unsigned int | s_numberDrawablesReusedLastInLastFrame |
| static unsigned int | s_numberNewDrawablesInLastFrame |
| static unsigned int | s_numberDeletedDrawablesInLastFrame |
typedef osg::buffered_value
< GLuint > | GLObjectList |
Allow the use of Shapes as Drawables, 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 Shapes easily (perhaps for test or debugging purposes) than as the right way to render basic shapes in some efficiency-critical section of code.