OpenSceneGraph
3.4.0
|
Public Types | |
enum | AttributeBinding { BIND_OFF = 0, BIND_OVERALL = 1, BIND_PER_PRIMITIVE_SET = 2, BIND_PER_VERTEX = 4 } |
deprecated, Same values as Array::Binding. More... | |
typedef std::vector < osg::ref_ptr< osg::Array > > | ArrayList |
typedef std::vector< ref_ptr < PrimitiveSet > > | PrimitiveSetList |
typedef std::vector < osg::DrawElements * > | DrawElementsList |
Public Member Functions | |
Geometry () | |
Geometry (const Geometry &geometry, const CopyOp ©op=CopyOp::SHALLOW_COPY) | |
Copy constructor using CopyOp to manage deep vs shallow copy. | |
META_Node (osg, Geometry) | |
virtual Geometry * | asGeometry () |
convert 'this' into a Geometry pointer if Node is a Geometry, otherwise return 0. | |
virtual const Geometry * | asGeometry () const |
convert 'const this' into a const Geometry pointer if Node is a Geometry, otherwise return 0. | |
bool | empty () const |
void | setVertexArray (Array *array) |
Array * | getVertexArray () |
const Array * | getVertexArray () const |
void | setNormalArray (Array *array) |
void | setNormalArray (Array *array, osg::Array::Binding binding) |
Array * | getNormalArray () |
const Array * | getNormalArray () const |
void | setColorArray (Array *array) |
void | setColorArray (Array *array, osg::Array::Binding binding) |
Array * | getColorArray () |
const Array * | getColorArray () const |
void | setSecondaryColorArray (Array *array) |
void | setSecondaryColorArray (Array *array, osg::Array::Binding binding) |
Array * | getSecondaryColorArray () |
const Array * | getSecondaryColorArray () const |
void | setFogCoordArray (Array *array) |
void | setFogCoordArray (Array *array, osg::Array::Binding binding) |
Array * | getFogCoordArray () |
const Array * | getFogCoordArray () const |
void | setTexCoordArray (unsigned int unit, Array *array) |
void | setTexCoordArray (unsigned int unit, Array *array, osg::Array::Binding binding) |
Array * | getTexCoordArray (unsigned int unit) |
const Array * | getTexCoordArray (unsigned int unit) const |
unsigned int | getNumTexCoordArrays () const |
void | setTexCoordArrayList (const ArrayList &arrrayList) |
ArrayList & | getTexCoordArrayList () |
const ArrayList & | getTexCoordArrayList () const |
void | setVertexAttribArray (unsigned int index, Array *array) |
void | setVertexAttribArray (unsigned int index, Array *array, osg::Array::Binding binding) |
Array * | getVertexAttribArray (unsigned int index) |
const Array * | getVertexAttribArray (unsigned int index) const |
unsigned int | getNumVertexAttribArrays () const |
void | setVertexAttribArrayList (const ArrayList &arrayList) |
ArrayList & | getVertexAttribArrayList () |
const ArrayList & | getVertexAttribArrayList () const |
void | setPrimitiveSetList (const PrimitiveSetList &primitives) |
PrimitiveSetList & | getPrimitiveSetList () |
const PrimitiveSetList & | getPrimitiveSetList () const |
unsigned int | getNumPrimitiveSets () const |
PrimitiveSet * | getPrimitiveSet (unsigned int pos) |
const PrimitiveSet * | getPrimitiveSet (unsigned int pos) const |
bool | addPrimitiveSet (PrimitiveSet *primitiveset) |
Add a primitive set to the geometry. | |
bool | setPrimitiveSet (unsigned int i, PrimitiveSet *primitiveset) |
Set a primitive set to the specified position in geometry's primitive set list. | |
bool | insertPrimitiveSet (unsigned int i, PrimitiveSet *primitiveset) |
Insert a primitive set to the specified position in geometry's primitive set list. | |
bool | removePrimitiveSet (unsigned int i, unsigned int numElementsToRemove=1) |
Remove primitive set(s) from the specified position in geometry's primitive set list. | |
unsigned int | getPrimitiveSetIndex (const PrimitiveSet *primitiveset) const |
Get the index number of a primitive set, return a value between 0 and getNumPrimitiveSet()-1 if found, if not found then return getNumPrimitiveSet(). | |
bool | containsSharedArrays () const |
return true if any arrays are shared. | |
void | duplicateSharedArrays () |
duplicate any shared arrays. | |
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. | |
virtual void | dirtyDisplayList () |
Force a recompile on next draw() of any OpenGL display list associated with this geoset. | |
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. | |
bool | getArrayList (ArrayList &arrayList) const |
bool | getDrawElementsList (DrawElementsList &drawElementsList) const |
osg::VertexBufferObject * | getOrCreateVertexBufferObject () |
osg::ElementBufferObject * | getOrCreateElementBufferObject () |
virtual unsigned int | getGLObjectSizeHint () const |
Return the estimated size of GLObjects (display lists/vertex buffer objects) that are associated with this drawable. | |
virtual void | compileGLObjects (RenderInfo &renderInfo) const |
Immediately compile this Drawable into an OpenGL Display List/VertexBufferObjects. | |
virtual void | drawImplementation (RenderInfo &renderInfo) const |
Draw Geometry directly ignoring an OpenGL display list which could be attached. | |
void | drawVertexArraysImplementation (RenderInfo &renderInfo) const |
Set up the vertex arrays for the purpose of rendering, called by drawImplemtation() prior to it calling drawPrimitivesImplementation(). | |
void | drawPrimitivesImplementation (RenderInfo &renderInfo) const |
dispatch the primitives to OpenGL, called by drawImplemtation() after calling drawVertexArraysImplementation(). | |
virtual bool | supports (const Drawable::AttributeFunctor &) const |
Return true, osg::Geometry does support accept(Drawable::AttributeFunctor&). | |
virtual void | accept (Drawable::AttributeFunctor &af) |
Accept an Drawable::AttributeFunctor and call its methods to tell it about the internal attributes that this Drawable has. | |
virtual bool | supports (const Drawable::ConstAttributeFunctor &) const |
Return true, osg::Geometry 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::Geometry 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 bool | supports (const PrimitiveIndexFunctor &) const |
Return true, osg::Geometry does support accept(PrimitiveIndexFunctor&). | |
virtual void | accept (PrimitiveIndexFunctor &pf) const |
Accept a PrimitiveFunctor and call its methods to tell it about the internal primitives that this Drawable has. | |
bool | containsDeprecatedData () const |
Return true if the deprecated use array indices or BIND_PER_PRIMITIVE binding has been assigned to arrays. | |
bool | checkForDeprecatedData () |
fallback for deprecated functionality. | |
void | fixDeprecatedData () |
fallback for deprecated functionality. | |
void | setNormalBinding (AttributeBinding ab) |
deprecated, use array->set*Binding(..). | |
void | setColorBinding (AttributeBinding ab) |
void | setSecondaryColorBinding (AttributeBinding ab) |
void | setFogCoordBinding (AttributeBinding ab) |
void | setVertexAttribBinding (unsigned int index, AttributeBinding ab) |
AttributeBinding | getNormalBinding () const |
deprecated, use array->get*Binding(..). | |
AttributeBinding | getColorBinding () const |
AttributeBinding | getSecondaryColorBinding () const |
AttributeBinding | getFogCoordBinding () const |
AttributeBinding | getVertexAttribBinding (unsigned int index) const |
void | setVertexAttribNormalize (unsigned int index, GLboolean norm) |
deprecated, use array->set*Normalize(..). | |
GLboolean | getVertexAttribNormalize (unsigned int index) const |
deprecated, use array->get*Normalize(..). | |
Protected Member Functions | |
Geometry & | operator= (const Geometry &) |
virtual | ~Geometry () |
void | addVertexBufferObjectIfRequired (osg::Array *array) |
void | addElementBufferObjectIfRequired (osg::PrimitiveSet *primitiveSet) |
Protected Attributes | |
PrimitiveSetList | _primitives |
osg::ref_ptr< Array > | _vertexArray |
osg::ref_ptr< Array > | _normalArray |
osg::ref_ptr< Array > | _colorArray |
osg::ref_ptr< Array > | _secondaryColorArray |
osg::ref_ptr< Array > | _fogCoordArray |
ArrayList | _texCoordList |
ArrayList | _vertexAttribList |
bool | _containsDeprecatedData |
typedef std::vector< osg::ref_ptr<osg::Array> > osg::Geometry::ArrayList |
typedef std::vector<osg::DrawElements*> osg::Geometry::DrawElementsList |
typedef std::vector< ref_ptr<PrimitiveSet> > osg::Geometry::PrimitiveSetList |
deprecated, Same values as Array::Binding.
Reimplemented in deprecated_osg::Geometry.
Reimplemented in deprecated_osg::Geometry.
osg::Geometry::Geometry | ( | const Geometry & | geometry, |
const CopyOp & | copyop = CopyOp::SHALLOW_COPY |
||
) |
Copy constructor using CopyOp to manage deep vs shallow copy.
virtual osg::Geometry::~Geometry | ( | ) | [protected, virtual] |
virtual void osg::Geometry::accept | ( | Drawable::AttributeFunctor & | af | ) | [virtual] |
Accept an Drawable::AttributeFunctor and call its methods to tell it about the internal attributes that this Drawable has.
Reimplemented from osg::Drawable.
virtual void osg::Geometry::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::Geometry::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 void osg::Geometry::accept | ( | PrimitiveIndexFunctor & | 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.
void osg::Geometry::addElementBufferObjectIfRequired | ( | osg::PrimitiveSet * | primitiveSet | ) | [protected] |
bool osg::Geometry::addPrimitiveSet | ( | PrimitiveSet * | primitiveset | ) |
Add a primitive set to the geometry.
void osg::Geometry::addVertexBufferObjectIfRequired | ( | osg::Array * | array | ) | [protected] |
virtual Geometry* osg::Geometry::asGeometry | ( | ) | [inline, virtual] |
virtual const Geometry* osg::Geometry::asGeometry | ( | ) | const [inline, virtual] |
fallback for deprecated functionality.
Return true if the Geometry contains any array indices or BIND_PER_PRIMITIVE arrays.
virtual void osg::Geometry::compileGLObjects | ( | RenderInfo & | renderInfo | ) | const [virtual] |
Immediately compile this Drawable
into an OpenGL Display List/VertexBufferObjects.
_useDisplayList
is false
or VertexBufferObjects are not used. Reimplemented from osg::Drawable.
bool osg::Geometry::containsDeprecatedData | ( | ) | const [inline] |
Return true if the deprecated use array indices or BIND_PER_PRIMITIVE binding has been assigned to arrays.
bool osg::Geometry::containsSharedArrays | ( | ) | const |
return true if any arrays are shared.
virtual void osg::Geometry::dirtyDisplayList | ( | ) | [virtual] |
Force a recompile on next draw() of any OpenGL display list associated with this geoset.
Reimplemented from osg::Drawable.
virtual void osg::Geometry::drawImplementation | ( | RenderInfo & | renderInfo | ) | const [virtual] |
Draw Geometry 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 Geometry for user-drawn objects.
Reimplemented from osg::Drawable.
Reimplemented in osgAnimation::RigGeometry, and osg::QueryGeometry.
void osg::Geometry::drawPrimitivesImplementation | ( | RenderInfo & | renderInfo | ) | const |
dispatch the primitives to OpenGL, called by drawImplemtation() after calling drawVertexArraysImplementation().
void osg::Geometry::drawVertexArraysImplementation | ( | RenderInfo & | renderInfo | ) | const |
Set up the vertex arrays for the purpose of rendering, called by drawImplemtation() prior to it calling drawPrimitivesImplementation().
duplicate any shared arrays.
bool osg::Geometry::empty | ( | ) | const |
fallback for deprecated functionality.
Removes any array indices and BIND_PER_PRIMITIVE arrays.
bool osg::Geometry::getArrayList | ( | ArrayList & | arrayList | ) | const |
Array* osg::Geometry::getColorArray | ( | ) | [inline] |
const Array* osg::Geometry::getColorArray | ( | ) | const [inline] |
Reimplemented in deprecated_osg::Geometry.
bool osg::Geometry::getDrawElementsList | ( | DrawElementsList & | drawElementsList | ) | const |
Array* osg::Geometry::getFogCoordArray | ( | ) | [inline] |
const Array* osg::Geometry::getFogCoordArray | ( | ) | const [inline] |
Reimplemented in deprecated_osg::Geometry.
virtual unsigned int osg::Geometry::getGLObjectSizeHint | ( | ) | const [virtual] |
Return the estimated size of GLObjects (display lists/vertex buffer objects) that are associated with this drawable.
This size is used a hint for reuse of deleted display lists/vertex buffer objects.
Reimplemented from osg::Drawable.
Array* osg::Geometry::getNormalArray | ( | ) | [inline] |
const Array* osg::Geometry::getNormalArray | ( | ) | const [inline] |
deprecated, use array->get*Binding(..).
Reimplemented in deprecated_osg::Geometry.
unsigned int osg::Geometry::getNumPrimitiveSets | ( | ) | const [inline] |
unsigned int osg::Geometry::getNumTexCoordArrays | ( | ) | const [inline] |
unsigned int osg::Geometry::getNumVertexAttribArrays | ( | ) | const [inline] |
PrimitiveSet* osg::Geometry::getPrimitiveSet | ( | unsigned int | pos | ) | [inline] |
const PrimitiveSet* osg::Geometry::getPrimitiveSet | ( | unsigned int | pos | ) | const [inline] |
unsigned int osg::Geometry::getPrimitiveSetIndex | ( | const PrimitiveSet * | primitiveset | ) | const |
Get the index number of a primitive set, return a value between 0 and getNumPrimitiveSet()-1 if found, if not found then return getNumPrimitiveSet().
When checking for a valid find value use if ((value=geometry->getPrimitiveSetIndex(primitive))!=geometry.getNumPrimitiveSet())
PrimitiveSetList& osg::Geometry::getPrimitiveSetList | ( | ) | [inline] |
const PrimitiveSetList& osg::Geometry::getPrimitiveSetList | ( | ) | const [inline] |
Array* osg::Geometry::getSecondaryColorArray | ( | ) | [inline] |
const Array* osg::Geometry::getSecondaryColorArray | ( | ) | const [inline] |
Reimplemented in deprecated_osg::Geometry.
Array* osg::Geometry::getTexCoordArray | ( | unsigned int | unit | ) |
const Array* osg::Geometry::getTexCoordArray | ( | unsigned int | unit | ) | const |
ArrayList& osg::Geometry::getTexCoordArrayList | ( | ) | [inline] |
const ArrayList& osg::Geometry::getTexCoordArrayList | ( | ) | const [inline] |
Array* osg::Geometry::getVertexArray | ( | ) | [inline] |
const Array* osg::Geometry::getVertexArray | ( | ) | const [inline] |
Array* osg::Geometry::getVertexAttribArray | ( | unsigned int | index | ) |
const Array* osg::Geometry::getVertexAttribArray | ( | unsigned int | index | ) | const |
ArrayList& osg::Geometry::getVertexAttribArrayList | ( | ) | [inline] |
const ArrayList& osg::Geometry::getVertexAttribArrayList | ( | ) | const [inline] |
AttributeBinding osg::Geometry::getVertexAttribBinding | ( | unsigned int | index | ) | const |
Reimplemented in deprecated_osg::Geometry.
GLboolean osg::Geometry::getVertexAttribNormalize | ( | unsigned int | index | ) | const |
deprecated, use array->get*Normalize(..).
Reimplemented in deprecated_osg::Geometry.
bool osg::Geometry::insertPrimitiveSet | ( | unsigned int | i, |
PrimitiveSet * | primitiveset | ||
) |
Insert a primitive set to the specified position in geometry's primitive set list.
osg::Geometry::META_Node | ( | osg | , |
Geometry | |||
) |
virtual void osg::Geometry::releaseGLObjects | ( | State * | state = 0 | ) | const [virtual] |
If State is non-zero, this function releases OpenGL objects for the specified graphics context.
Otherwise, releases OpenGL objects for all graphics contexts.
Reimplemented from osg::Drawable.
Reimplemented in osg::QueryGeometry.
bool osg::Geometry::removePrimitiveSet | ( | unsigned int | i, |
unsigned int | numElementsToRemove = 1 |
||
) |
Remove primitive set(s) from the specified position in geometry's primitive set list.
virtual void osg::Geometry::resizeGLObjectBuffers | ( | unsigned int | maxSize | ) | [virtual] |
Resize any per context GLObject buffers to specified size.
Reimplemented from osg::Drawable.
void osg::Geometry::setColorArray | ( | Array * | array | ) | [inline] |
References osg::Array::BIND_UNDEFINED, and setColorArray().
Referenced by setColorArray().
void osg::Geometry::setColorArray | ( | Array * | array, |
osg::Array::Binding | binding | ||
) |
Reimplemented in deprecated_osg::Geometry.
void osg::Geometry::setFogCoordArray | ( | Array * | array | ) | [inline] |
References osg::Array::BIND_UNDEFINED, and setFogCoordArray().
Referenced by setFogCoordArray().
void osg::Geometry::setFogCoordArray | ( | Array * | array, |
osg::Array::Binding | binding | ||
) |
Reimplemented in deprecated_osg::Geometry.
void osg::Geometry::setNormalArray | ( | Array * | array | ) | [inline] |
References osg::Array::BIND_UNDEFINED, and setNormalArray().
Referenced by setNormalArray().
void osg::Geometry::setNormalArray | ( | Array * | array, |
osg::Array::Binding | binding | ||
) |
deprecated, use array->set*Binding(..).
Reimplemented in deprecated_osg::Geometry.
bool osg::Geometry::setPrimitiveSet | ( | unsigned int | i, |
PrimitiveSet * | primitiveset | ||
) |
Set a primitive set to the specified position in geometry's primitive set list.
void osg::Geometry::setPrimitiveSetList | ( | const PrimitiveSetList & | primitives | ) |
void osg::Geometry::setSecondaryColorArray | ( | Array * | array | ) | [inline] |
References osg::Array::BIND_UNDEFINED, and setSecondaryColorArray().
Referenced by setSecondaryColorArray().
void osg::Geometry::setSecondaryColorArray | ( | Array * | array, |
osg::Array::Binding | binding | ||
) |
Reimplemented in deprecated_osg::Geometry.
void osg::Geometry::setTexCoordArray | ( | unsigned int | unit, |
Array * | array | ||
) | [inline] |
References osg::Array::BIND_UNDEFINED, and setTexCoordArray().
Referenced by setTexCoordArray().
void osg::Geometry::setTexCoordArray | ( | unsigned int | unit, |
Array * | array, | ||
osg::Array::Binding | binding | ||
) |
void osg::Geometry::setTexCoordArrayList | ( | const ArrayList & | arrrayList | ) |
virtual void osg::Geometry::setUseVertexBufferObjects | ( | bool | flag | ) | [virtual] |
When set to true, ignore the setUseDisplayList() settings, and hints to the drawImplementation method to use OpenGL vertex buffer objects for rendering.
Reimplemented from osg::Drawable.
void osg::Geometry::setVertexArray | ( | Array * | array | ) |
void osg::Geometry::setVertexAttribArray | ( | unsigned int | index, |
Array * | array | ||
) | [inline] |
References osg::Array::BIND_UNDEFINED, and setVertexAttribArray().
Referenced by setVertexAttribArray().
void osg::Geometry::setVertexAttribArray | ( | unsigned int | index, |
Array * | array, | ||
osg::Array::Binding | binding | ||
) |
void osg::Geometry::setVertexAttribArrayList | ( | const ArrayList & | arrayList | ) |
void osg::Geometry::setVertexAttribBinding | ( | unsigned int | index, |
AttributeBinding | ab | ||
) |
Reimplemented in deprecated_osg::Geometry.
void osg::Geometry::setVertexAttribNormalize | ( | unsigned int | index, |
GLboolean | norm | ||
) |
deprecated, use array->set*Normalize(..).
Reimplemented in deprecated_osg::Geometry.
virtual bool osg::Geometry::supports | ( | const Drawable::AttributeFunctor & | ) | const [inline, virtual] |
Return true, osg::Geometry does support accept(Drawable::AttributeFunctor&).
Reimplemented from osg::Drawable.
virtual bool osg::Geometry::supports | ( | const Drawable::ConstAttributeFunctor & | ) | const [inline, virtual] |
Return true, osg::Geometry does support accept(Drawable::ConstAttributeFunctor&).
Reimplemented from osg::Drawable.
virtual bool osg::Geometry::supports | ( | const PrimitiveFunctor & | ) | const [inline, virtual] |
Return true, osg::Geometry does support accept(PrimitiveFunctor&).
Reimplemented from osg::Drawable.
virtual bool osg::Geometry::supports | ( | const PrimitiveIndexFunctor & | ) | const [inline, virtual] |
Return true, osg::Geometry does support accept(PrimitiveIndexFunctor&).
Reimplemented from osg::Drawable.
osg::ref_ptr<Array> osg::Geometry::_colorArray [protected] |
bool osg::Geometry::_containsDeprecatedData [protected] |
osg::ref_ptr<Array> osg::Geometry::_fogCoordArray [protected] |
osg::ref_ptr<Array> osg::Geometry::_normalArray [protected] |
PrimitiveSetList osg::Geometry::_primitives [protected] |
osg::ref_ptr<Array> osg::Geometry::_secondaryColorArray [protected] |
ArrayList osg::Geometry::_texCoordList [protected] |
osg::ref_ptr<Array> osg::Geometry::_vertexArray [protected] |
ArrayList osg::Geometry::_vertexAttribList [protected] |
![]() | Generated at Tue Dec 8 2015 00:14:24 for the OpenSceneGraph by doxygen 1.7.6.1. |