OpenSceneGraph
3.4.0
|
Public Types | |
enum | Type { ArrayType = 0, ByteArrayType = 1, ShortArrayType = 2, IntArrayType = 3, UByteArrayType = 4, UShortArrayType = 5, UIntArrayType = 6, FloatArrayType = 7, DoubleArrayType = 8, Vec2bArrayType = 9, Vec3bArrayType = 10, Vec4bArrayType = 11, Vec2sArrayType = 12, Vec3sArrayType = 13, Vec4sArrayType = 14, Vec2iArrayType = 15, Vec3iArrayType = 16, Vec4iArrayType = 17, Vec2ubArrayType = 18, Vec3ubArrayType = 19, Vec4ubArrayType = 20, Vec2usArrayType = 21, Vec3usArrayType = 22, Vec4usArrayType = 23, Vec2uiArrayType = 24, Vec3uiArrayType = 25, Vec4uiArrayType = 26, Vec2ArrayType = 27, Vec3ArrayType = 28, Vec4ArrayType = 29, Vec2dArrayType = 30, Vec3dArrayType = 31, Vec4dArrayType = 32, MatrixArrayType = 33, MatrixdArrayType = 34 } |
enum | Binding { BIND_UNDEFINED = -1, BIND_OFF = 0, BIND_OVERALL = 1, BIND_PER_PRIMITIVE_SET = 2, BIND_PER_VERTEX = 4 } |
Public Member Functions | |
Array (Type arrayType=ArrayType, GLint dataSize=0, GLenum dataType=0, Binding binding=BIND_UNDEFINED) | |
Array (const Array &array, const CopyOp ©op=CopyOp::SHALLOW_COPY) | |
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. | |
virtual void | accept (ArrayVisitor &)=0 |
virtual void | accept (ConstArrayVisitor &) const =0 |
virtual void | accept (unsigned int index, ValueVisitor &)=0 |
virtual void | accept (unsigned int index, ConstValueVisitor &) const =0 |
virtual int | compare (unsigned int lhs, unsigned int rhs) const =0 |
Return -1 if lhs element is less than rhs element, 0 if equal, 1 if lhs element is greater than rhs element. | |
Type | getType () const |
GLint | getDataSize () const |
GLenum | getDataType () const |
virtual osg::Array * | asArray () |
virtual const osg::Array * | asArray () const |
virtual unsigned int | getElementSize () const =0 |
virtual const GLvoid * | getDataPointer () const =0 |
virtual unsigned int | getTotalDataSize () const =0 |
virtual unsigned int | getNumElements () const =0 |
virtual void | reserveArray (unsigned int num)=0 |
virtual void | resizeArray (unsigned int num)=0 |
void | setBinding (Binding binding) |
Specify how this array should be passed to OpenGL. | |
Binding | getBinding () const |
Get how this array should be passed to OpenGL. | |
void | setNormalize (bool normalize) |
Specify whether the array data should be normalized by OpenGL. | |
bool | getNormalize () const |
Get whether the array data should be normalized by OpenGL. | |
void | setPreserveDataType (bool preserve) |
Set hint to ask that the array data is passed via integer or double, or normal setVertexAttribPointer function. | |
bool | getPreserveDataType () const |
Get hint to ask that the array data is passed via integer or double, or normal setVertexAttribPointer function. | |
virtual void | trim () |
Frees unused space on this vector - i.e. | |
void | setVertexBufferObject (osg::VertexBufferObject *vbo) |
Set the VertexBufferObject. | |
osg::VertexBufferObject * | getVertexBufferObject () |
Get the VertexBufferObject. | |
const osg::VertexBufferObject * | getVertexBufferObject () const |
Get the const VertexBufferObject. | |
Protected Member Functions | |
virtual | ~Array () |
Protected Attributes | |
Type | _arrayType |
GLint | _dataSize |
GLenum | _dataType |
Binding | _binding |
bool | _normalize |
bool | _preserveDataType |
enum osg::Array::Binding |
enum osg::Array::Type |
osg::Array::Array | ( | Type | arrayType = ArrayType , |
GLint | dataSize = 0 , |
||
GLenum | dataType = 0 , |
||
Binding | binding = BIND_UNDEFINED |
||
) | [inline] |
osg::Array::Array | ( | const Array & | array, |
const CopyOp & | copyop = CopyOp::SHALLOW_COPY |
||
) | [inline] |
virtual osg::Array::~Array | ( | ) | [inline, protected, virtual] |
virtual void osg::Array::accept | ( | ArrayVisitor & | ) | [pure virtual] |
virtual void osg::Array::accept | ( | ConstArrayVisitor & | ) | const [pure virtual] |
virtual void osg::Array::accept | ( | unsigned int | index, |
ValueVisitor & | |||
) | [pure virtual] |
virtual void osg::Array::accept | ( | unsigned int | index, |
ConstValueVisitor & | |||
) | const [pure virtual] |
virtual osg::Array* osg::Array::asArray | ( | ) | [inline, virtual] |
Reimplemented from osg::BufferData.
virtual const osg::Array* osg::Array::asArray | ( | ) | const [inline, virtual] |
Reimplemented from osg::BufferData.
virtual const char* osg::Array::className | ( | ) | const [virtual] |
return the name of the object's class type.
Must be defined by derived classes.
Reimplemented from osg::BufferData.
virtual int osg::Array::compare | ( | unsigned int | lhs, |
unsigned int | rhs | ||
) | const [pure virtual] |
Return -1 if lhs element is less than rhs element, 0 if equal, 1 if lhs element is greater than rhs element.
Implemented in osg::TemplateIndexArray< T, ARRAYTYPE, DataSize, DataType >, and osg::TemplateArray< T, ARRAYTYPE, DataSize, DataType >.
Binding osg::Array::getBinding | ( | ) | const [inline] |
Get how this array should be passed to OpenGL.
Referenced by osg::ArrayDispatchers::activateColorArray(), osg::ArrayDispatchers::activateFogCoordArray(), osg::ArrayDispatchers::activateNormalArray(), osg::ArrayDispatchers::activateSecondaryColorArray(), osg::ArrayDispatchers::activateTexCoordArray(), osg::ArrayDispatchers::activateVertexArray(), osg::ArrayDispatchers::activateVertexAttribArray(), and osg::getBinding().
virtual const GLvoid* osg::Array::getDataPointer | ( | ) | const [pure virtual] |
Implements osg::BufferData.
Implemented in osg::TemplateIndexArray< T, ARRAYTYPE, DataSize, DataType >, and osg::TemplateArray< T, ARRAYTYPE, DataSize, DataType >.
Referenced by osg::State::setColorPointer(), osg::State::setFogCoordPointer(), osg::State::setNormalPointer(), osg::State::setSecondaryColorPointer(), osg::State::setTexCoordPointer(), osg::State::setVertexAttribIPointer(), osg::State::setVertexAttribLPointer(), osg::State::setVertexAttribPointer(), and osg::State::setVertexPointer().
GLint osg::Array::getDataSize | ( | ) | const [inline] |
GLenum osg::Array::getDataType | ( | ) | const [inline] |
Referenced by osg::State::setColorPointer(), osg::State::setFogCoordPointer(), osg::State::setNormalPointer(), osg::State::setSecondaryColorPointer(), osg::State::setTexCoordPointer(), osg::State::setVertexAttribIPointer(), osg::State::setVertexAttribLPointer(), osg::State::setVertexAttribPointer(), and osg::State::setVertexPointer().
virtual unsigned int osg::Array::getElementSize | ( | ) | const [pure virtual] |
bool osg::Array::getNormalize | ( | ) | const [inline] |
Get whether the array data should be normalized by OpenGL.
Referenced by osg::getNormalize(), osg::State::setColorPointer(), osg::State::setFogCoordPointer(), osg::State::setNormalPointer(), osg::State::setSecondaryColorPointer(), osg::State::setTexCoordPointer(), osg::State::setVertexAttribPointer(), and osg::State::setVertexPointer().
virtual unsigned int osg::Array::getNumElements | ( | ) | const [pure virtual] |
bool osg::Array::getPreserveDataType | ( | ) | const [inline] |
Get hint to ask that the array data is passed via integer or double, or normal setVertexAttribPointer function.
virtual unsigned int osg::Array::getTotalDataSize | ( | ) | const [pure virtual] |
Implements osg::BufferData.
Implemented in osg::TemplateIndexArray< T, ARRAYTYPE, DataSize, DataType >, and osg::TemplateArray< T, ARRAYTYPE, DataSize, DataType >.
Type osg::Array::getType | ( | ) | const [inline] |
osg::VertexBufferObject* osg::Array::getVertexBufferObject | ( | ) | [inline] |
Get the VertexBufferObject.
If no VBO is assigned returns NULL
const osg::VertexBufferObject* osg::Array::getVertexBufferObject | ( | ) | const [inline] |
Get the const VertexBufferObject.
If no VBO is assigned returns NULL
virtual bool osg::Array::isSameKindAs | ( | const Object * | obj | ) | const [inline, virtual] |
virtual const char* osg::Array::libraryName | ( | ) | const [inline, virtual] |
return the name of the object's library.
Must be defined by derived classes. The OpenSceneGraph convention is that the namespace of a library is the same as the library name.
Reimplemented from osg::BufferData.
virtual void osg::Array::reserveArray | ( | unsigned int | num | ) | [pure virtual] |
virtual void osg::Array::resizeArray | ( | unsigned int | num | ) | [pure virtual] |
void osg::Array::setBinding | ( | Binding | binding | ) | [inline] |
Specify how this array should be passed to OpenGL.
void osg::Array::setNormalize | ( | bool | normalize | ) | [inline] |
Specify whether the array data should be normalized by OpenGL.
void osg::Array::setPreserveDataType | ( | bool | preserve | ) | [inline] |
Set hint to ask that the array data is passed via integer or double, or normal setVertexAttribPointer function.
void osg::Array::setVertexBufferObject | ( | osg::VertexBufferObject * | vbo | ) | [inline] |
Set the VertexBufferObject.
virtual void osg::Array::trim | ( | ) | [inline, virtual] |
Frees unused space on this vector - i.e.
the difference between size() and max_size() of the underlying vector.
Reimplemented in osg::TemplateIndexArray< T, ARRAYTYPE, DataSize, DataType >, and osg::TemplateArray< T, ARRAYTYPE, DataSize, DataType >.
Type osg::Array::_arrayType [protected] |
Binding osg::Array::_binding [protected] |
GLint osg::Array::_dataSize [protected] |
GLenum osg::Array::_dataType [protected] |
bool osg::Array::_normalize [protected] |
bool osg::Array::_preserveDataType [protected] |
![]() | Generated at Tue Dec 8 2015 00:14:23 for the OpenSceneGraph by doxygen 1.7.6.1. |