Array
Go to the documentation of this file.
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
#ifndef OSG_ARRAY
#define OSG_ARRAY 1
#include <osg/MixinVector>
#include <osg/Vec2b>
#include <osg/Vec3b>
#include <osg/Vec4b>
#include <osg/Vec2s>
#include <osg/Vec3s>
#include <osg/Vec4s>
#include <osg/Vec2i>
#include <osg/Vec3i>
#include <osg/Vec4i>
#include <osg/Vec2ub>
#include <osg/Vec3ub>
#include <osg/Vec4ub>
#include <osg/Vec2us>
#include <osg/Vec3us>
#include <osg/Vec4us>
#include <osg/Vec2ui>
#include <osg/Vec3ui>
#include <osg/Vec4ui>
#include <osg/Vec2>
#include <osg/Vec3>
#include <osg/Vec4>
#include <osg/Vec2d>
#include <osg/Vec3d>
#include <osg/Vec4d>
#include <osg/Matrix>
#include <osg/Matrixd>
#include <osg/Quat>
#include <osg/BufferObject>
#include <osg/Object>
#include <osg/GL>
namespace osg {
class ArrayVisitor;
class ConstArrayVisitor;
class ValueVisitor;
class ConstValueVisitor;
class OSG_EXPORT Array : public BufferData
{
public:
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,
QuatArrayType = 35,
UInt64ArrayType = 36,
Int64ArrayType = 37,
LastArrayType = 37
// If new array types are added, update this and
// update Array::className() in src/osg/Array.cpp.
// Array::Type values are from ArrayType to
// LastArrayType, inclusive.
};
enum Binding
{
BIND_UNDEFINED=-1,
BIND_OFF=0,
BIND_OVERALL=1,
BIND_PER_PRIMITIVE_SET=2,
BIND_PER_VERTEX=4
};
Array(Type arrayType=ArrayType,GLint dataSize=0,GLenum dataType=0, Binding binding=BIND_UNDEFINED):
_arrayType(arrayType),
_dataSize(dataSize),
_dataType(dataType),
_binding(binding),
_normalize(false),
_preserveDataType(false) {}
Array(const Array& array,const CopyOp& copyop=CopyOp::SHALLOW_COPY):
BufferData(array,copyop),
_arrayType(array._arrayType),
_dataSize(array._dataSize),
_dataType(array._dataType),
_binding(array._binding),
_normalize(array._normalize),
_preserveDataType(array._preserveDataType) {}
virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast<const Array*>(obj)!=NULL; }
virtual const char* libraryName() const { return "osg"; }
virtual const char* className() const;
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;
Type getType() const { return _arrayType; }
GLint getDataSize() const { return _dataSize; }
GLenum getDataType() const { return _dataType; }
virtual osg::Array* asArray() { return this; }
virtual const osg::Array* asArray() const { return this; }
virtual unsigned int getElementSize() const = 0;
virtual const GLvoid* getDataPointer() const = 0;
virtual const GLvoid* getDataPointer(unsigned int index) 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) { _binding = binding; }
Binding getBinding() const { return _binding; }
void setNormalize(bool normalize) { _normalize = normalize; }
bool getNormalize() const { return _normalize; }
void setPreserveDataType(bool preserve) { _preserveDataType = preserve; }
bool getPreserveDataType() const { return _preserveDataType; }
virtual void trim() {}
inline void setVertexBufferObject(osg::VertexBufferObject* vbo) { setBufferObject(vbo); }
inline osg::VertexBufferObject* getVertexBufferObject() { return dynamic_cast<osg::VertexBufferObject*>(_bufferObject.get()); }
inline const osg::VertexBufferObject* getVertexBufferObject() const { return dynamic_cast<const osg::VertexBufferObject*>(_bufferObject.get()); }
protected:
virtual ~Array() {}
Type _arrayType;
GLint _dataSize;
GLenum _dataType;
Binding _binding;
bool _normalize;
bool _preserveDataType;
};
inline osg::Array::Binding getBinding(const osg::Array* array) { return array ? array->getBinding() : osg::Array::BIND_OFF; }
inline bool getNormalize(const osg::Array* array) { return array ? array->getNormalize() : false; }
template<typename T, Array::Type ARRAYTYPE, int DataSize, int DataType>
class TemplateArray : public Array, public MixinVector<T>
{
public:
TemplateArray(Binding binding=BIND_UNDEFINED) : Array(ARRAYTYPE,DataSize,DataType, binding) {}
TemplateArray(const TemplateArray& ta,const CopyOp& copyop=CopyOp::SHALLOW_COPY):
Array(ta,copyop),
MixinVector<T>(ta) {}
TemplateArray(unsigned int no) :
Array(ARRAYTYPE,DataSize,DataType),
MixinVector<T>(no) {}
TemplateArray(unsigned int no,const T* ptr) :
Array(ARRAYTYPE,DataSize,DataType),
MixinVector<T>(ptr,ptr+no) {}
TemplateArray(Binding binding, unsigned int no) :
Array(ARRAYTYPE,DataSize,DataType, binding),
MixinVector<T>(no) {}
TemplateArray(Binding binding, unsigned int no,const T* ptr) :
Array(ARRAYTYPE,DataSize,DataType, binding),
MixinVector<T>(ptr,ptr+no) {}
template <class InputIterator>
TemplateArray(InputIterator first,InputIterator last) :
Array(ARRAYTYPE,DataSize,DataType),
MixinVector<T>(first,last) {}
TemplateArray& operator = (const TemplateArray& array)
{
if (this==&array) return *this;
this->assign(array.begin(),array.end());
return *this;
}
virtual Object* cloneType() const { return new TemplateArray(); }
virtual Object* clone(const CopyOp& copyop) const { return new TemplateArray(*this,copyop); }
inline virtual void accept(ArrayVisitor& av);
inline virtual void accept(ConstArrayVisitor& av) const;
inline virtual void accept(unsigned int index,ValueVisitor& vv);
inline virtual void accept(unsigned int index,ConstValueVisitor& vv) const;
virtual int compare(unsigned int lhs,unsigned int rhs) const
{
const T& elem_lhs = (*this)[lhs];
const T& elem_rhs = (*this)[rhs];
if (elem_lhs<elem_rhs) return -1;
if (elem_rhs<elem_lhs) return 1;
return 0;
}
virtual void trim()
{
MixinVector<T>( *this ).swap( *this );
}
virtual unsigned int getElementSize() const { return sizeof(ElementDataType); }
virtual const GLvoid* getDataPointer() const { if (!this->empty()) return &this->front(); else return 0; }
virtual const GLvoid* getDataPointer(unsigned int index) const { if (!this->empty()) return &((*this)[index]); else return 0; }
virtual unsigned int getTotalDataSize() const { return static_cast<unsigned int>(this->size()*sizeof(ElementDataType)); }
virtual unsigned int getNumElements() const { return static_cast<unsigned int>(this->size()); }
virtual void reserveArray(unsigned int num) { this->reserve(num); }
virtual void resizeArray(unsigned int num) { this->resize(num); }
typedef T ElementDataType; // expose T
protected:
virtual ~TemplateArray() {}
};
class OSG_EXPORT IndexArray : public Array
{
public:
IndexArray(Type arrayType=ArrayType,GLint dataSize=0,GLenum dataType=0):
Array(arrayType,dataSize,dataType) {}
IndexArray(const Array& array,const CopyOp& copyop=CopyOp::SHALLOW_COPY):
Array(array,copyop) {}
virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast<const IndexArray*>(obj)!=NULL; }
virtual unsigned int index(unsigned int pos) const = 0;
protected:
virtual ~IndexArray() {}
};
template<typename T, Array::Type ARRAYTYPE, int DataSize, int DataType>
class TemplateIndexArray : public IndexArray, public MixinVector<T>
{
public:
TemplateIndexArray() : IndexArray(ARRAYTYPE,DataSize,DataType) {}
TemplateIndexArray(const TemplateIndexArray& ta,const CopyOp& copyop=CopyOp::SHALLOW_COPY):
IndexArray(ta,copyop),
MixinVector<T>(ta) {}
TemplateIndexArray(unsigned int no) :
IndexArray(ARRAYTYPE,DataSize,DataType),
MixinVector<T>(no) {}
TemplateIndexArray(unsigned int no,T* ptr) :
IndexArray(ARRAYTYPE,DataSize,DataType),
MixinVector<T>(ptr,ptr+no) {}
template <class InputIterator>
TemplateIndexArray(InputIterator first,InputIterator last) :
IndexArray(ARRAYTYPE,DataSize,DataType),
MixinVector<T>(first,last) {}
TemplateIndexArray& operator = (const TemplateIndexArray& array)
{
if (this==&array) return *this;
this->assign(array.begin(),array.end());
return *this;
}
virtual Object* cloneType() const { return new TemplateIndexArray(); }
virtual Object* clone(const CopyOp& copyop) const { return new TemplateIndexArray(*this,copyop); }
inline virtual void accept(ArrayVisitor& av);
inline virtual void accept(ConstArrayVisitor& av) const;
inline virtual void accept(unsigned int index,ValueVisitor& vv);
inline virtual void accept(unsigned int index,ConstValueVisitor& vv) const;
virtual int compare(unsigned int lhs,unsigned int rhs) const
{
const T& elem_lhs = (*this)[lhs];
const T& elem_rhs = (*this)[rhs];
if (elem_lhs<elem_rhs) return -1;
if (elem_rhs<elem_lhs) return 1;
return 0;
}
virtual void trim()
{
MixinVector<T>( *this ).swap( *this );
}
virtual unsigned int getElementSize() const { return sizeof(ElementDataType); }
virtual const GLvoid* getDataPointer() const { if (!this->empty()) return &this->front(); else return 0; }
virtual const GLvoid* getDataPointer(unsigned int index) const { if (!this->empty()) return &((*this)[index]); else return 0; }
virtual unsigned int getTotalDataSize() const { return static_cast<unsigned int>(this->size()*sizeof(T)); }
virtual unsigned int getNumElements() const { return static_cast<unsigned int>(this->size()); }
virtual void reserveArray(unsigned int num) { this->reserve(num); }
virtual void resizeArray(unsigned int num) { this->resize(num); }
virtual unsigned int index(unsigned int pos) const { return (*this)[pos]; }
typedef T ElementDataType; // expose T
protected:
virtual ~TemplateIndexArray() {}
};
// The predefined array types
typedef TemplateIndexArray<GLbyte,Array::ByteArrayType,1,GL_BYTE> ByteArray;
typedef TemplateIndexArray<GLshort,Array::ShortArrayType,1,GL_SHORT> ShortArray;
typedef TemplateIndexArray<GLint,Array::IntArrayType,1,GL_INT> IntArray;
typedef TemplateIndexArray<GLubyte,Array::UByteArrayType,1,GL_UNSIGNED_BYTE> UByteArray;
typedef TemplateIndexArray<GLushort,Array::UShortArrayType,1,GL_UNSIGNED_SHORT> UShortArray;
typedef TemplateIndexArray<GLuint,Array::UIntArrayType,1,GL_UNSIGNED_INT> UIntArray;
typedef TemplateArray<GLfloat,Array::FloatArrayType,1,GL_FLOAT> FloatArray;
typedef TemplateArray<GLdouble,Array::DoubleArrayType,1,GL_DOUBLE> DoubleArray;
typedef TemplateArray<Vec2b,Array::Vec2bArrayType,2,GL_BYTE> Vec2bArray;
typedef TemplateArray<Vec3b,Array::Vec3bArrayType,3,GL_BYTE> Vec3bArray;
typedef TemplateArray<Vec4b,Array::Vec4bArrayType,4,GL_BYTE> Vec4bArray;
typedef TemplateArray<Vec2s,Array::Vec2sArrayType,2,GL_SHORT> Vec2sArray;
typedef TemplateArray<Vec3s,Array::Vec3sArrayType,3,GL_SHORT> Vec3sArray;
typedef TemplateArray<Vec4s,Array::Vec4sArrayType,4,GL_SHORT> Vec4sArray;
typedef TemplateArray<Vec2i,Array::Vec2iArrayType,2,GL_INT> Vec2iArray;
typedef TemplateArray<Vec3i,Array::Vec3iArrayType,3,GL_INT> Vec3iArray;
typedef TemplateArray<Vec4i,Array::Vec4iArrayType,4,GL_INT> Vec4iArray;
typedef TemplateArray<Vec2ub,Array::Vec2ubArrayType,2,GL_UNSIGNED_BYTE> Vec2ubArray;
typedef TemplateArray<Vec3ub,Array::Vec3ubArrayType,3,GL_UNSIGNED_BYTE> Vec3ubArray;
typedef TemplateArray<Vec4ub,Array::Vec4ubArrayType,4,GL_UNSIGNED_BYTE> Vec4ubArray;
typedef TemplateArray<Vec2us,Array::Vec2usArrayType,2,GL_UNSIGNED_SHORT> Vec2usArray;
typedef TemplateArray<Vec3us,Array::Vec3usArrayType,3,GL_UNSIGNED_SHORT> Vec3usArray;
typedef TemplateArray<Vec4us,Array::Vec4usArrayType,4,GL_UNSIGNED_SHORT> Vec4usArray;
typedef TemplateArray<Vec2ui,Array::Vec2uiArrayType,2,GL_UNSIGNED_INT> Vec2uiArray;
typedef TemplateArray<Vec3ui,Array::Vec3uiArrayType,3,GL_UNSIGNED_INT> Vec3uiArray;
typedef TemplateArray<Vec4ui,Array::Vec4uiArrayType,4,GL_UNSIGNED_INT> Vec4uiArray;
typedef TemplateArray<Vec2,Array::Vec2ArrayType,2,GL_FLOAT> Vec2Array;
typedef TemplateArray<Vec3,Array::Vec3ArrayType,3,GL_FLOAT> Vec3Array;
typedef TemplateArray<Vec4,Array::Vec4ArrayType,4,GL_FLOAT> Vec4Array;
typedef TemplateArray<Vec2d,Array::Vec2dArrayType,2,GL_DOUBLE> Vec2dArray;
typedef TemplateArray<Vec3d,Array::Vec3dArrayType,3,GL_DOUBLE> Vec3dArray;
typedef TemplateArray<Vec4d,Array::Vec4dArrayType,4,GL_DOUBLE> Vec4dArray;
typedef TemplateArray<Matrixf,Array::MatrixArrayType,16,GL_FLOAT> MatrixfArray;
typedef TemplateArray<Matrixd,Array::MatrixdArrayType,16,GL_DOUBLE> MatrixdArray;
typedef TemplateArray<Quat,Array::QuatArrayType,4,GL_DOUBLE> QuatArray;
typedef TemplateIndexArray<GLuint64,Array::UInt64ArrayType,1,GL_UNSIGNED_INT64_ARB> UInt64Array;
typedef TemplateIndexArray<GLint64,Array::Int64ArrayType,1,GL_INT64_ARB> Int64Array;
class ArrayVisitor
{
public:
ArrayVisitor() {}
virtual ~ArrayVisitor() {}
virtual void apply(Array&) {}
virtual void apply(ByteArray&) {}
virtual void apply(ShortArray&) {}
virtual void apply(IntArray&) {}
virtual void apply(UByteArray&) {}
virtual void apply(UShortArray&) {}
virtual void apply(UIntArray&) {}
virtual void apply(FloatArray&) {}
virtual void apply(DoubleArray&) {}
virtual void apply(Vec2bArray&) {}
virtual void apply(Vec3bArray&) {}
virtual void apply(Vec4bArray&) {}
virtual void apply(Vec2sArray&) {}
virtual void apply(Vec3sArray&) {}
virtual void apply(Vec4sArray&) {}
virtual void apply(Vec2iArray&) {}
virtual void apply(Vec3iArray&) {}
virtual void apply(Vec4iArray&) {}
virtual void apply(Vec2ubArray&) {}
virtual void apply(Vec3ubArray&) {}
virtual void apply(Vec4ubArray&) {}
virtual void apply(Vec2usArray&) {}
virtual void apply(Vec3usArray&) {}
virtual void apply(Vec4usArray&) {}
virtual void apply(Vec2uiArray&) {}
virtual void apply(Vec3uiArray&) {}
virtual void apply(Vec4uiArray&) {}
virtual void apply(Vec2Array&) {}
virtual void apply(Vec3Array&) {}
virtual void apply(Vec4Array&) {}
virtual void apply(Vec2dArray&) {}
virtual void apply(Vec3dArray&) {}
virtual void apply(Vec4dArray&) {}
virtual void apply(MatrixfArray&) {}
virtual void apply(MatrixdArray&) {}
virtual void apply(UInt64Array&) {}
virtual void apply(Int64Array&) {}
};
class ConstArrayVisitor
{
public:
ConstArrayVisitor() {}
virtual ~ConstArrayVisitor() {}
virtual void apply(const Array&) {}
virtual void apply(const ByteArray&) {}
virtual void apply(const ShortArray&) {}
virtual void apply(const IntArray&) {}
virtual void apply(const UByteArray&) {}
virtual void apply(const UShortArray&) {}
virtual void apply(const UIntArray&) {}
virtual void apply(const FloatArray&) {}
virtual void apply(const DoubleArray&) {}
virtual void apply(const Vec2bArray&) {}
virtual void apply(const Vec3bArray&) {}
virtual void apply(const Vec4bArray&) {}
virtual void apply(const Vec2sArray&) {}
virtual void apply(const Vec3sArray&) {}
virtual void apply(const Vec4sArray&) {}
virtual void apply(const Vec2iArray&) {}
virtual void apply(const Vec3iArray&) {}
virtual void apply(const Vec4iArray&) {}
virtual void apply(const Vec2ubArray&) {}
virtual void apply(const Vec3ubArray&) {}
virtual void apply(const Vec4ubArray&) {}
virtual void apply(const Vec2usArray&) {}
virtual void apply(const Vec3usArray&) {}
virtual void apply(const Vec4usArray&) {}
virtual void apply(const Vec2uiArray&) {}
virtual void apply(const Vec3uiArray&) {}
virtual void apply(const Vec4uiArray&) {}
virtual void apply(const Vec2Array&) {}
virtual void apply(const Vec3Array&) {}
virtual void apply(const Vec4Array&) {}
virtual void apply(const Vec2dArray&) {}
virtual void apply(const Vec3dArray&) {}
virtual void apply(const Vec4dArray&) {}
virtual void apply(const MatrixfArray&) {}
virtual void apply(const MatrixdArray&) {}
virtual void apply(const UInt64Array&) {}
virtual void apply(const Int64Array&) {}
};
class ValueVisitor
{
public:
ValueVisitor() {}
virtual ~ValueVisitor() {}
virtual void apply(GLbyte&) {}
virtual void apply(GLshort&) {}
virtual void apply(GLint&) {}
virtual void apply(GLushort&) {}
virtual void apply(GLubyte&) {}
virtual void apply(GLuint&) {}
virtual void apply(GLfloat&) {}
virtual void apply(GLdouble&) {}
virtual void apply(Vec2b&) {}
virtual void apply(Vec3b&) {}
virtual void apply(Vec4b&) {}
virtual void apply(Vec2s&) {}
virtual void apply(Vec3s&) {}
virtual void apply(Vec4s&) {}
virtual void apply(Vec2i&) {}
virtual void apply(Vec3i&) {}
virtual void apply(Vec4i&) {}
virtual void apply(Vec2ub&) {}
virtual void apply(Vec3ub&) {}
virtual void apply(Vec4ub&) {}
virtual void apply(Vec2us&) {}
virtual void apply(Vec3us&) {}
virtual void apply(Vec4us&) {}
virtual void apply(Vec2ui&) {}
virtual void apply(Vec3ui&) {}
virtual void apply(Vec4ui&) {}
virtual void apply(Vec2&) {}
virtual void apply(Vec3&) {}
virtual void apply(Vec4&) {}
virtual void apply(Vec2d&) {}
virtual void apply(Vec3d&) {}
virtual void apply(Vec4d&) {}
virtual void apply(Matrixf&) {}
virtual void apply(Matrixd&) {}
virtual void apply(Quat&) {}
virtual void apply(GLuint64&){}
virtual void apply(GLint64&){}
};
class ConstValueVisitor
{
public:
ConstValueVisitor() {}
virtual ~ConstValueVisitor() {}
virtual void apply(const GLbyte&) {}
virtual void apply(const GLshort&) {}
virtual void apply(const GLint&) {}
virtual void apply(const GLushort&) {}
virtual void apply(const GLubyte&) {}
virtual void apply(const GLuint&) {}
virtual void apply(const GLfloat&) {}
virtual void apply(const GLdouble&) {}
virtual void apply(const Vec2b&) {}
virtual void apply(const Vec3b&) {}
virtual void apply(const Vec4b&) {}
virtual void apply(const Vec2s&) {}
virtual void apply(const Vec3s&) {}
virtual void apply(const Vec4s&) {}
virtual void apply(const Vec2i&) {}
virtual void apply(const Vec3i&) {}
virtual void apply(const Vec4i&) {}
virtual void apply(const Vec2ub&) {}
virtual void apply(const Vec3ub&) {}
virtual void apply(const Vec4ub&) {}
virtual void apply(const Vec2us&) {}
virtual void apply(const Vec3us&) {}
virtual void apply(const Vec4us&) {}
virtual void apply(const Vec2ui&) {}
virtual void apply(const Vec3ui&) {}
virtual void apply(const Vec4ui&) {}
virtual void apply(const Vec2&) {}
virtual void apply(const Vec3&) {}
virtual void apply(const Vec4&) {}
virtual void apply(const Vec2d&) {}
virtual void apply(const Vec3d&) {}
virtual void apply(const Vec4d&) {}
virtual void apply(const Matrixf&) {}
virtual void apply(const Matrixd&) {}
virtual void apply(const Quat&) {}
virtual void apply(const GLuint64&){}
virtual void apply(const GLint64&){}
};
template<typename T, Array::Type ARRAYTYPE, int DataSize, int DataType>
inline void TemplateArray<T,ARRAYTYPE,DataSize,DataType>::accept(ArrayVisitor& av) { av.apply(*this); }
template<typename T, Array::Type ARRAYTYPE, int DataSize, int DataType>
inline void TemplateArray<T,ARRAYTYPE,DataSize,DataType>::accept(ConstArrayVisitor& av) const { av.apply(*this); }
template<typename T, Array::Type ARRAYTYPE, int DataSize, int DataType>
inline void TemplateArray<T,ARRAYTYPE,DataSize,DataType>::accept(unsigned int index,ValueVisitor& vv) { vv.apply( (*this)[index] ); }
template<typename T, Array::Type ARRAYTYPE, int DataSize, int DataType>
inline void TemplateArray<T,ARRAYTYPE,DataSize,DataType>::accept(unsigned int index,ConstValueVisitor& vv) const { vv.apply( (*this)[index] );}
template<typename T, Array::Type ARRAYTYPE, int DataSize, int DataType>
inline void TemplateIndexArray<T,ARRAYTYPE,DataSize,DataType>::accept(ArrayVisitor& av) { av.apply(*this); }
template<typename T, Array::Type ARRAYTYPE, int DataSize, int DataType>
inline void TemplateIndexArray<T,ARRAYTYPE,DataSize,DataType>::accept(ConstArrayVisitor& av) const { av.apply(*this); }
template<typename T, Array::Type ARRAYTYPE, int DataSize, int DataType>
inline void TemplateIndexArray<T,ARRAYTYPE,DataSize,DataType>::accept(unsigned int index,ValueVisitor& vv) { vv.apply( (*this)[index] ); }
template<typename T, Array::Type ARRAYTYPE, int DataSize, int DataType>
inline void TemplateIndexArray<T,ARRAYTYPE,DataSize,DataType>::accept(unsigned int index,ConstValueVisitor& vv) const { vv.apply( (*this)[index] );}
}
#endif
BufferObject
Matrix
Matrixd
MixinVector
Object
Quat
Vec2
Vec2b
Vec2d
Vec2i
Vec2s
Vec2ub
Vec2ui
Vec2us
Vec3
Vec3b
Vec3d
Vec3i
Vec3s
Vec3ub
Vec3ui
Vec3us
Vec4
Vec4b
Vec4d
Vec4i
Vec4s
Vec4ub
Vec4ui
Vec4us
osg::ArrayVisitor
Definition Array:465
osg::ArrayVisitor::apply
virtual void apply(Vec4ubArray &)
Definition Array:498
osg::ArrayVisitor::ArrayVisitor
ArrayVisitor()
Definition Array:467
osg::ArrayVisitor::apply
virtual void apply(Vec2ubArray &)
Definition Array:496
osg::ArrayVisitor::apply
virtual void apply(Vec3ubArray &)
Definition Array:497
osg::ArrayVisitor::apply
virtual void apply(UShortArray &)
Definition Array:477
osg::ArrayVisitor::apply
virtual void apply(FloatArray &)
Definition Array:480
osg::ArrayVisitor::apply
virtual void apply(Vec4sArray &)
Definition Array:490
osg::ArrayVisitor::apply
virtual void apply(Vec2bArray &)
Definition Array:484
osg::ArrayVisitor::apply
virtual void apply(IntArray &)
Definition Array:474
osg::ArrayVisitor::apply
virtual void apply(Vec3Array &)
Definition Array:509
osg::ArrayVisitor::apply
virtual void apply(ByteArray &)
Definition Array:472
osg::ArrayVisitor::apply
virtual void apply(UInt64Array &)
Definition Array:519
osg::ArrayVisitor::apply
virtual void apply(MatrixdArray &)
Definition Array:517
osg::ArrayVisitor::apply
virtual void apply(UByteArray &)
Definition Array:476
osg::ArrayVisitor::apply
virtual void apply(Vec2dArray &)
Definition Array:512
osg::ArrayVisitor::apply
virtual void apply(Vec4iArray &)
Definition Array:494
osg::ArrayVisitor::~ArrayVisitor
virtual ~ArrayVisitor()
Definition Array:468
osg::ArrayVisitor::apply
virtual void apply(Vec4Array &)
Definition Array:510
osg::ArrayVisitor::apply
virtual void apply(UIntArray &)
Definition Array:478
osg::ArrayVisitor::apply
virtual void apply(Vec3uiArray &)
Definition Array:505
osg::ArrayVisitor::apply
virtual void apply(Vec2Array &)
Definition Array:508
osg::ArrayVisitor::apply
virtual void apply(Vec3bArray &)
Definition Array:485
osg::ArrayVisitor::apply
virtual void apply(Vec2uiArray &)
Definition Array:504
osg::ArrayVisitor::apply
virtual void apply(Vec3dArray &)
Definition Array:513
osg::ArrayVisitor::apply
virtual void apply(Vec4dArray &)
Definition Array:514
osg::ArrayVisitor::apply
virtual void apply(Vec3iArray &)
Definition Array:493
osg::ArrayVisitor::apply
virtual void apply(Vec3usArray &)
Definition Array:501
osg::ArrayVisitor::apply
virtual void apply(MatrixfArray &)
Definition Array:516
osg::ArrayVisitor::apply
virtual void apply(Vec2usArray &)
Definition Array:500
osg::ArrayVisitor::apply
virtual void apply(ShortArray &)
Definition Array:473
osg::ArrayVisitor::apply
virtual void apply(Vec3sArray &)
Definition Array:489
osg::ArrayVisitor::apply
virtual void apply(DoubleArray &)
Definition Array:481
osg::ArrayVisitor::apply
virtual void apply(Vec4bArray &)
Definition Array:486
osg::ArrayVisitor::apply
virtual void apply(Vec2iArray &)
Definition Array:492
osg::ArrayVisitor::apply
virtual void apply(Array &)
Definition Array:470
osg::ArrayVisitor::apply
virtual void apply(Vec4uiArray &)
Definition Array:506
osg::ArrayVisitor::apply
virtual void apply(Vec4usArray &)
Definition Array:502
osg::ArrayVisitor::apply
virtual void apply(Int64Array &)
Definition Array:520
osg::ArrayVisitor::apply
virtual void apply(Vec2sArray &)
Definition Array:488
osg::Array
Definition Array:61
osg::Array::accept
virtual void accept(ArrayVisitor &)=0
osg::Array::setVertexBufferObject
void setVertexBufferObject(osg::VertexBufferObject *vbo)
Definition Array:213
osg::Array::className
virtual const char * className() const
osg::Array::accept
virtual void accept(unsigned int index, ValueVisitor &)=0
osg::Array::getElementSize
virtual unsigned int getElementSize() const =0
osg::Array::getTotalDataSize
virtual unsigned int getTotalDataSize() const =0
osg::Array::Binding
Binding
The scope of applicability of the values in this array.
Definition Array:130
osg::Array::BIND_OFF
@ BIND_OFF
Definition Array:132
osg::Array::BIND_UNDEFINED
@ BIND_UNDEFINED
Definition Array:131
osg::Array::BIND_PER_VERTEX
@ BIND_PER_VERTEX
Definition Array:135
osg::Array::BIND_PER_PRIMITIVE_SET
@ BIND_PER_PRIMITIVE_SET
Definition Array:134
osg::Array::BIND_OVERALL
@ BIND_OVERALL
Definition Array:133
osg::Array::Array
Array(const Array &array, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
Definition Array:146
osg::Array::getPreserveDataType
bool getPreserveDataType() const
Definition Array:206
osg::Array::_dataType
GLenum _dataType
Definition Array:227
osg::Array::Array
Array(Type arrayType=ArrayType, GLint dataSize=0, GLenum dataType=0, Binding binding=BIND_UNDEFINED)
Definition Array:138
osg::Array::getVertexBufferObject
const osg::VertexBufferObject * getVertexBufferObject() const
Definition Array:219
osg::Array::libraryName
virtual const char * libraryName() const
Definition Array:156
osg::Array::accept
virtual void accept(ConstArrayVisitor &) const =0
osg::Array::_normalize
bool _normalize
Definition Array:229
osg::Array::~Array
virtual ~Array()
Definition Array:223
osg::Array::asArray
virtual const osg::Array * asArray() const
Definition Array:177
osg::Array::getNumElements
virtual unsigned int getNumElements() const =0
osg::Array::getNormalize
bool getNormalize() const
Definition Array:199
osg::Array::setBinding
void setBinding(Binding binding)
Definition Array:189
osg::Array::setPreserveDataType
void setPreserveDataType(bool preserve)
Definition Array:203
osg::Array::getBinding
Binding getBinding() const
Definition Array:192
osg::Array::getDataSize
GLint getDataSize() const
Definition Array:173
osg::Array::compare
virtual int compare(unsigned int lhs, unsigned int rhs) const =0
osg::Array::setNormalize
void setNormalize(bool normalize)
Definition Array:196
osg::Array::getType
Type getType() const
Definition Array:172
osg::Array::getDataPointer
virtual const GLvoid * getDataPointer() const =0
osg::Array::getVertexBufferObject
osg::VertexBufferObject * getVertexBufferObject()
Definition Array:216
osg::Array::_arrayType
Type _arrayType
Definition Array:225
osg::Array::isSameKindAs
virtual bool isSameKindAs(const Object *obj) const
Definition Array:155
osg::Array::accept
virtual void accept(unsigned int index, ConstValueVisitor &) const =0
osg::Array::trim
virtual void trim()
Definition Array:210
osg::Array::getDataType
GLenum getDataType() const
Definition Array:174
osg::Array::getDataPointer
virtual const GLvoid * getDataPointer(unsigned int index) const =0
osg::Array::_dataSize
GLint _dataSize
Definition Array:226
osg::Array::Type
Type
The type of data stored in this array.
Definition Array:67
osg::Array::Vec4ubArrayType
@ Vec4ubArrayType
Definition Array:95
osg::Array::Vec2ArrayType
@ Vec2ArrayType
Definition Array:105
osg::Array::Vec2bArrayType
@ Vec2bArrayType
Definition Array:81
osg::Array::Vec4sArrayType
@ Vec4sArrayType
Definition Array:87
osg::Array::ShortArrayType
@ ShortArrayType
Definition Array:71
osg::Array::Vec3ArrayType
@ Vec3ArrayType
Definition Array:106
osg::Array::Vec3ubArrayType
@ Vec3ubArrayType
Definition Array:94
osg::Array::Vec2iArrayType
@ Vec2iArrayType
Definition Array:89
osg::Array::Vec2sArrayType
@ Vec2sArrayType
Definition Array:85
osg::Array::Vec3dArrayType
@ Vec3dArrayType
Definition Array:110
osg::Array::Vec4dArrayType
@ Vec4dArrayType
Definition Array:111
osg::Array::Vec3uiArrayType
@ Vec3uiArrayType
Definition Array:102
osg::Array::MatrixArrayType
@ MatrixArrayType
Definition Array:113
osg::Array::Vec4ArrayType
@ Vec4ArrayType
Definition Array:107
osg::Array::Vec2ubArrayType
@ Vec2ubArrayType
Definition Array:93
osg::Array::FloatArrayType
@ FloatArrayType
Definition Array:78
osg::Array::Vec3usArrayType
@ Vec3usArrayType
Definition Array:98
osg::Array::UByteArrayType
@ UByteArrayType
Definition Array:74
osg::Array::ByteArrayType
@ ByteArrayType
Definition Array:70
osg::Array::Vec4bArrayType
@ Vec4bArrayType
Definition Array:83
osg::Array::Vec3iArrayType
@ Vec3iArrayType
Definition Array:90
osg::Array::QuatArrayType
@ QuatArrayType
Definition Array:116
osg::Array::Vec4usArrayType
@ Vec4usArrayType
Definition Array:99
osg::Array::Vec2dArrayType
@ Vec2dArrayType
Definition Array:109
osg::Array::Vec3sArrayType
@ Vec3sArrayType
Definition Array:86
osg::Array::Vec4uiArrayType
@ Vec4uiArrayType
Definition Array:103
osg::Array::UIntArrayType
@ UIntArrayType
Definition Array:76
osg::Array::IntArrayType
@ IntArrayType
Definition Array:72
osg::Array::Vec3bArrayType
@ Vec3bArrayType
Definition Array:82
osg::Array::DoubleArrayType
@ DoubleArrayType
Definition Array:79
osg::Array::Vec2uiArrayType
@ Vec2uiArrayType
Definition Array:101
osg::Array::MatrixdArrayType
@ MatrixdArrayType
Definition Array:114
osg::Array::UInt64ArrayType
@ UInt64ArrayType
Definition Array:118
osg::Array::LastArrayType
@ LastArrayType
Definition Array:121
osg::Array::Vec2usArrayType
@ Vec2usArrayType
Definition Array:97
osg::Array::Int64ArrayType
@ Int64ArrayType
Definition Array:119
osg::Array::UShortArrayType
@ UShortArrayType
Definition Array:75
osg::Array::ArrayType
@ ArrayType
Definition Array:68
osg::Array::Vec4iArrayType
@ Vec4iArrayType
Definition Array:91
osg::Array::_binding
Binding _binding
Definition Array:228
osg::Array::reserveArray
virtual void reserveArray(unsigned int num)=0
osg::Array::asArray
virtual osg::Array * asArray()
Definition Array:176
osg::Array::_preserveDataType
bool _preserveDataType
Definition Array:230
osg::Array::resizeArray
virtual void resizeArray(unsigned int num)=0
osg::BufferData::BufferData
BufferData()
Definition BufferObject:498
osg::BufferData::_bufferObject
osg::ref_ptr< BufferObject > _bufferObject
Definition BufferObject:590
osg::BufferData::setBufferObject
void setBufferObject(BufferObject *bufferObject)
osg::ConstArrayVisitor
Definition Array:524
osg::ConstArrayVisitor::apply
virtual void apply(const Vec4uiArray &)
Definition Array:565
osg::ConstArrayVisitor::apply
virtual void apply(const Vec2ubArray &)
Definition Array:555
osg::ConstArrayVisitor::apply
virtual void apply(const ShortArray &)
Definition Array:532
osg::ConstArrayVisitor::apply
virtual void apply(const Array &)
Definition Array:529
osg::ConstArrayVisitor::~ConstArrayVisitor
virtual ~ConstArrayVisitor()
Definition Array:527
osg::ConstArrayVisitor::apply
virtual void apply(const Vec2sArray &)
Definition Array:547
osg::ConstArrayVisitor::apply
virtual void apply(const MatrixdArray &)
Definition Array:576
osg::ConstArrayVisitor::apply
virtual void apply(const FloatArray &)
Definition Array:539
osg::ConstArrayVisitor::apply
virtual void apply(const Vec3ubArray &)
Definition Array:556
osg::ConstArrayVisitor::apply
virtual void apply(const Vec2iArray &)
Definition Array:551
osg::ConstArrayVisitor::apply
virtual void apply(const Vec2usArray &)
Definition Array:559
osg::ConstArrayVisitor::apply
virtual void apply(const MatrixfArray &)
Definition Array:575
osg::ConstArrayVisitor::apply
virtual void apply(const Vec4usArray &)
Definition Array:561
osg::ConstArrayVisitor::apply
virtual void apply(const ByteArray &)
Definition Array:531
osg::ConstArrayVisitor::apply
virtual void apply(const UShortArray &)
Definition Array:536
osg::ConstArrayVisitor::apply
virtual void apply(const Vec3uiArray &)
Definition Array:564
osg::ConstArrayVisitor::apply
virtual void apply(const Vec3dArray &)
Definition Array:572
osg::ConstArrayVisitor::apply
virtual void apply(const Vec4Array &)
Definition Array:569
osg::ConstArrayVisitor::ConstArrayVisitor
ConstArrayVisitor()
Definition Array:526
osg::ConstArrayVisitor::apply
virtual void apply(const Vec4sArray &)
Definition Array:549
osg::ConstArrayVisitor::apply
virtual void apply(const Vec3usArray &)
Definition Array:560
osg::ConstArrayVisitor::apply
virtual void apply(const Int64Array &)
Definition Array:579
osg::ConstArrayVisitor::apply
virtual void apply(const Vec4iArray &)
Definition Array:553
osg::ConstArrayVisitor::apply
virtual void apply(const Vec2uiArray &)
Definition Array:563
osg::ConstArrayVisitor::apply
virtual void apply(const Vec3bArray &)
Definition Array:544
osg::ConstArrayVisitor::apply
virtual void apply(const Vec4dArray &)
Definition Array:573
osg::ConstArrayVisitor::apply
virtual void apply(const Vec3Array &)
Definition Array:568
osg::ConstArrayVisitor::apply
virtual void apply(const UIntArray &)
Definition Array:537
osg::ConstArrayVisitor::apply
virtual void apply(const Vec3iArray &)
Definition Array:552
osg::ConstArrayVisitor::apply
virtual void apply(const UInt64Array &)
Definition Array:578
osg::ConstArrayVisitor::apply
virtual void apply(const Vec4ubArray &)
Definition Array:557
osg::ConstArrayVisitor::apply
virtual void apply(const IntArray &)
Definition Array:533
osg::ConstArrayVisitor::apply
virtual void apply(const UByteArray &)
Definition Array:535
osg::ConstArrayVisitor::apply
virtual void apply(const DoubleArray &)
Definition Array:540
osg::ConstArrayVisitor::apply
virtual void apply(const Vec3sArray &)
Definition Array:548
osg::ConstArrayVisitor::apply
virtual void apply(const Vec2bArray &)
Definition Array:543
osg::ConstArrayVisitor::apply
virtual void apply(const Vec4bArray &)
Definition Array:545
osg::ConstArrayVisitor::apply
virtual void apply(const Vec2Array &)
Definition Array:567
osg::ConstArrayVisitor::apply
virtual void apply(const Vec2dArray &)
Definition Array:571
osg::ConstValueVisitor
Definition Array:643
osg::ConstValueVisitor::apply
virtual void apply(const Matrixf &)
Definition Array:692
osg::ConstValueVisitor::apply
virtual void apply(const Vec4b &)
Definition Array:662
osg::ConstValueVisitor::apply
virtual void apply(const Matrixd &)
Definition Array:693
osg::ConstValueVisitor::apply
virtual void apply(const Vec3 &)
Definition Array:685
osg::ConstValueVisitor::apply
virtual void apply(const Quat &)
Definition Array:695
osg::ConstValueVisitor::apply
virtual void apply(const Vec3ub &)
Definition Array:673
osg::ConstValueVisitor::apply
virtual void apply(const GLdouble &)
Definition Array:657
osg::ConstValueVisitor::apply
virtual void apply(const Vec3ui &)
Definition Array:681
osg::ConstValueVisitor::apply
virtual void apply(const Vec2us &)
Definition Array:676
osg::ConstValueVisitor::apply
virtual void apply(const GLuint64 &)
Definition Array:697
osg::ConstValueVisitor::apply
virtual void apply(const GLushort &)
Definition Array:652
osg::ConstValueVisitor::apply
virtual void apply(const Vec2s &)
Definition Array:664
osg::ConstValueVisitor::apply
virtual void apply(const GLbyte &)
Definition Array:648
osg::ConstValueVisitor::ConstValueVisitor
ConstValueVisitor()
Definition Array:645
osg::ConstValueVisitor::apply
virtual void apply(const Vec4ub &)
Definition Array:674
osg::ConstValueVisitor::apply
virtual void apply(const Vec2ub &)
Definition Array:672
osg::ConstValueVisitor::apply
virtual void apply(const Vec3b &)
Definition Array:661
osg::ConstValueVisitor::apply
virtual void apply(const Vec4d &)
Definition Array:690
osg::ConstValueVisitor::apply
virtual void apply(const Vec4us &)
Definition Array:678
osg::ConstValueVisitor::apply
virtual void apply(const Vec3us &)
Definition Array:677
osg::ConstValueVisitor::apply
virtual void apply(const GLfloat &)
Definition Array:656
osg::ConstValueVisitor::apply
virtual void apply(const GLubyte &)
Definition Array:653
osg::ConstValueVisitor::apply
virtual void apply(const GLuint &)
Definition Array:654
osg::ConstValueVisitor::apply
virtual void apply(const Vec2i &)
Definition Array:668
osg::ConstValueVisitor::apply
virtual void apply(const Vec3i &)
Definition Array:669
osg::ConstValueVisitor::apply
virtual void apply(const GLshort &)
Definition Array:649
osg::ConstValueVisitor::~ConstValueVisitor
virtual ~ConstValueVisitor()
Definition Array:646
osg::ConstValueVisitor::apply
virtual void apply(const Vec4i &)
Definition Array:670
osg::ConstValueVisitor::apply
virtual void apply(const Vec4 &)
Definition Array:686
osg::ConstValueVisitor::apply
virtual void apply(const Vec2 &)
Definition Array:684
osg::ConstValueVisitor::apply
virtual void apply(const Vec3d &)
Definition Array:689
osg::ConstValueVisitor::apply
virtual void apply(const Vec2ui &)
Definition Array:680
osg::ConstValueVisitor::apply
virtual void apply(const Vec2d &)
Definition Array:688
osg::ConstValueVisitor::apply
virtual void apply(const GLint &)
Definition Array:650
osg::ConstValueVisitor::apply
virtual void apply(const Vec2b &)
Definition Array:660
osg::ConstValueVisitor::apply
virtual void apply(const Vec3s &)
Definition Array:665
osg::ConstValueVisitor::apply
virtual void apply(const GLint64 &)
Definition Array:698
osg::ConstValueVisitor::apply
virtual void apply(const Vec4s &)
Definition Array:666
osg::ConstValueVisitor::apply
virtual void apply(const Vec4ui &)
Definition Array:682
osg::CopyOp
Definition CopyOp:41
osg::CopyOp::SHALLOW_COPY
@ SHALLOW_COPY
Definition CopyOp:47
osg::IndexArray::IndexArray
IndexArray(const Array &array, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
Definition Array:327
osg::IndexArray::~IndexArray
virtual ~IndexArray()
Definition Array:336
osg::IndexArray::index
virtual unsigned int index(unsigned int pos) const =0
osg::IndexArray::isSameKindAs
virtual bool isSameKindAs(const Object *obj) const
Definition Array:330
osg::IndexArray::IndexArray
IndexArray(Type arrayType=ArrayType, GLint dataSize=0, GLenum dataType=0)
Definition Array:324
osg::Matrixd
Definition Matrixd:27
osg::Matrixf
Definition Matrixf:27
osg::MixinVector< T >::size
size_type size() const
Definition MixinVector:92
osg::MixinVector::end
const_iterator end() const
Definition MixinVector:99
osg::MixinVector< T >::resize
void resize(size_type new_size, const value_type &fill_value=value_type())
Definition MixinVector:85
osg::MixinVector< T >::assign
void assign(size_type count, const value_type &value)
Definition MixinVector:113
osg::MixinVector< T >::front
const_reference front() const
Definition MixinVector:138
osg::MixinVector< T >::reserve
void reserve(size_type new_capacity)
Definition MixinVector:86
osg::MixinVector::begin
const_iterator begin() const
Definition MixinVector:97
osg::MixinVector< T >::MixinVector
MixinVector()
Definition MixinVector:45
osg::MixinVector< T >::empty
bool empty() const
Definition MixinVector:91
osg::Object
Definition Object:61
osg::Quat
Definition Quat:30
osg::TemplateArray
A concrete array holding elements of type T.
Definition Array:243
osg::TemplateArray::accept
virtual void accept(ConstArrayVisitor &av) const
Definition Array:705
osg::TemplateArray::getNumElements
virtual unsigned int getNumElements() const
Definition Array:308
osg::TemplateArray::getDataPointer
virtual const GLvoid * getDataPointer(unsigned int index) const
Definition Array:306
osg::TemplateArray::TemplateArray
TemplateArray(unsigned int no)
Definition Array:252
osg::TemplateArray< GLfloat, Array::FloatArrayType, 1, GL_FLOAT >::ElementDataType
GLfloat ElementDataType
Definition Array:312
osg::TemplateArray::getTotalDataSize
virtual unsigned int getTotalDataSize() const
Definition Array:307
osg::TemplateArray::TemplateArray
TemplateArray(Binding binding=BIND_UNDEFINED)
Definition Array:246
osg::TemplateArray::TemplateArray
TemplateArray(const TemplateArray &ta, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
Definition Array:248
osg::TemplateArray::compare
virtual int compare(unsigned int lhs, unsigned int rhs) const
Definition Array:289
osg::TemplateArray::getDataPointer
virtual const GLvoid * getDataPointer() const
Definition Array:305
osg::TemplateArray::cloneType
virtual Object * cloneType() const
Definition Array:280
osg::TemplateArray::trim
virtual void trim()
Definition Array:299
osg::TemplateArray::operator=
TemplateArray & operator=(const TemplateArray &array)
Definition Array:273
osg::TemplateArray::accept
virtual void accept(ArrayVisitor &av)
Definition Array:702
osg::TemplateArray::TemplateArray
TemplateArray(Binding binding, unsigned int no)
Definition Array:260
osg::TemplateArray::resizeArray
virtual void resizeArray(unsigned int num)
Definition Array:310
osg::TemplateArray::TemplateArray
TemplateArray(unsigned int no, const T *ptr)
Definition Array:256
osg::TemplateArray::reserveArray
virtual void reserveArray(unsigned int num)
Definition Array:309
osg::TemplateArray::~TemplateArray
virtual ~TemplateArray()
Definition Array:316
osg::TemplateArray::TemplateArray
TemplateArray(Binding binding, unsigned int no, const T *ptr)
Definition Array:264
osg::TemplateArray::accept
virtual void accept(unsigned int index, ValueVisitor &vv)
Definition Array:708
osg::TemplateArray::TemplateArray
TemplateArray(InputIterator first, InputIterator last)
Definition Array:269
osg::TemplateArray::getElementSize
virtual unsigned int getElementSize() const
Definition Array:304
osg::TemplateArray::accept
virtual void accept(unsigned int index, ConstValueVisitor &vv) const
Definition Array:711
osg::TemplateArray::clone
virtual Object * clone(const CopyOp &copyop) const
Definition Array:281
osg::TemplateIndexArray
Definition Array:341
osg::TemplateIndexArray::getDataPointer
virtual const GLvoid * getDataPointer(unsigned int index) const
Definition Array:396
osg::TemplateIndexArray::getDataPointer
virtual const GLvoid * getDataPointer() const
Definition Array:395
osg::TemplateIndexArray::getTotalDataSize
virtual unsigned int getTotalDataSize() const
Definition Array:397
osg::TemplateIndexArray< GLbyte, Array::ByteArrayType, 1, GL_BYTE >::index
virtual unsigned int index(unsigned int pos) const
Definition Array:402
osg::TemplateIndexArray::TemplateIndexArray
TemplateIndexArray(unsigned int no, T *ptr)
Definition Array:354
osg::TemplateIndexArray::accept
virtual void accept(unsigned int index, ValueVisitor &vv)
Definition Array:720
osg::TemplateIndexArray::cloneType
virtual Object * cloneType() const
Definition Array:370
osg::TemplateIndexArray::TemplateIndexArray
TemplateIndexArray(const TemplateIndexArray &ta, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
Definition Array:346
osg::TemplateIndexArray::reserveArray
virtual void reserveArray(unsigned int num)
Definition Array:399
osg::TemplateIndexArray::operator=
TemplateIndexArray & operator=(const TemplateIndexArray &array)
Definition Array:363
osg::TemplateIndexArray::resizeArray
virtual void resizeArray(unsigned int num)
Definition Array:400
osg::TemplateIndexArray::TemplateIndexArray
TemplateIndexArray(InputIterator first, InputIterator last)
Definition Array:359
osg::TemplateIndexArray< GLbyte, Array::ByteArrayType, 1, GL_BYTE >::ElementDataType
GLbyte ElementDataType
Definition Array:404
osg::TemplateIndexArray::compare
virtual int compare(unsigned int lhs, unsigned int rhs) const
Definition Array:379
osg::TemplateIndexArray::clone
virtual Object * clone(const CopyOp &copyop) const
Definition Array:371
osg::TemplateIndexArray::trim
virtual void trim()
Definition Array:389
osg::TemplateIndexArray::~TemplateIndexArray
virtual ~TemplateIndexArray()
Definition Array:408
osg::TemplateIndexArray::TemplateIndexArray
TemplateIndexArray(unsigned int no)
Definition Array:350
osg::TemplateIndexArray::getElementSize
virtual unsigned int getElementSize() const
Definition Array:394
osg::TemplateIndexArray::accept
virtual void accept(ConstArrayVisitor &av) const
Definition Array:717
osg::TemplateIndexArray::accept
virtual void accept(unsigned int index, ConstValueVisitor &vv) const
Definition Array:723
osg::TemplateIndexArray::TemplateIndexArray
TemplateIndexArray()
Definition Array:344
osg::TemplateIndexArray::accept
virtual void accept(ArrayVisitor &av)
Definition Array:714
osg::TemplateIndexArray::getNumElements
virtual unsigned int getNumElements() const
Definition Array:398
osg::ValueVisitor
Definition Array:584
osg::ValueVisitor::apply
virtual void apply(GLushort &)
Definition Array:593
osg::ValueVisitor::apply
virtual void apply(Vec3us &)
Definition Array:618
osg::ValueVisitor::apply
virtual void apply(Vec2us &)
Definition Array:617
osg::ValueVisitor::apply
virtual void apply(Vec3i &)
Definition Array:610
osg::ValueVisitor::apply
virtual void apply(GLshort &)
Definition Array:590
osg::ValueVisitor::apply
virtual void apply(Vec2i &)
Definition Array:609
osg::ValueVisitor::apply
virtual void apply(Matrixf &)
Definition Array:633
osg::ValueVisitor::apply
virtual void apply(Vec4ub &)
Definition Array:615
osg::ValueVisitor::apply
virtual void apply(Vec4d &)
Definition Array:631
osg::ValueVisitor::apply
virtual void apply(Vec3b &)
Definition Array:602
osg::ValueVisitor::apply
virtual void apply(GLuint &)
Definition Array:595
osg::ValueVisitor::apply
virtual void apply(GLdouble &)
Definition Array:598
osg::ValueVisitor::apply
virtual void apply(GLint &)
Definition Array:591
osg::ValueVisitor::apply
virtual void apply(Vec4i &)
Definition Array:611
osg::ValueVisitor::apply
virtual void apply(Vec4us &)
Definition Array:619
osg::ValueVisitor::apply
virtual void apply(GLuint64 &)
Definition Array:638
osg::ValueVisitor::ValueVisitor
ValueVisitor()
Definition Array:586
osg::ValueVisitor::apply
virtual void apply(Matrixd &)
Definition Array:634
osg::ValueVisitor::apply
virtual void apply(Vec2s &)
Definition Array:605
osg::ValueVisitor::apply
virtual void apply(Vec2ui &)
Definition Array:621
osg::ValueVisitor::apply
virtual void apply(Vec2d &)
Definition Array:629
osg::ValueVisitor::apply
virtual void apply(Vec3d &)
Definition Array:630
osg::ValueVisitor::apply
virtual void apply(Vec3ub &)
Definition Array:614
osg::ValueVisitor::apply
virtual void apply(Vec2 &)
Definition Array:625
osg::ValueVisitor::apply
virtual void apply(Vec4b &)
Definition Array:603
osg::ValueVisitor::apply
virtual void apply(GLint64 &)
Definition Array:639
osg::ValueVisitor::apply
virtual void apply(Vec3ui &)
Definition Array:622
osg::ValueVisitor::apply
virtual void apply(Vec4 &)
Definition Array:627
osg::ValueVisitor::apply
virtual void apply(Vec4s &)
Definition Array:607
osg::ValueVisitor::apply
virtual void apply(Quat &)
Definition Array:636
osg::ValueVisitor::apply
virtual void apply(Vec3 &)
Definition Array:626
osg::ValueVisitor::apply
virtual void apply(Vec3s &)
Definition Array:606
osg::ValueVisitor::apply
virtual void apply(Vec2ub &)
Definition Array:613
osg::ValueVisitor::apply
virtual void apply(Vec2b &)
Definition Array:601
osg::ValueVisitor::apply
virtual void apply(GLfloat &)
Definition Array:597
osg::ValueVisitor::~ValueVisitor
virtual ~ValueVisitor()
Definition Array:587
osg::ValueVisitor::apply
virtual void apply(Vec4ui &)
Definition Array:623
osg::ValueVisitor::apply
virtual void apply(GLbyte &)
Definition Array:589
osg::ValueVisitor::apply
virtual void apply(GLubyte &)
Definition Array:594
osg::Vec2b
Definition Vec2b:26
osg::Vec2d
Definition Vec2d:29
osg::Vec2i
Definition Vec2i:22
osg::Vec2s
Definition Vec2s:20
osg::Vec2ub
Definition Vec2ub:22
osg::Vec2ui
Definition Vec2ui:22
osg::Vec2us
Definition Vec2us:20
osg::Vec3b
Definition Vec3b:26
osg::Vec3d
Definition Vec3d:30
osg::Vec3i
Definition Vec3i:22
osg::Vec3s
Definition Vec3s:20
osg::Vec3ub
Definition Vec3ub:26
osg::Vec3ui
Definition Vec3ui:22
osg::Vec3us
Definition Vec3us:20
osg::Vec4b
Definition Vec4b:26
osg::Vec4d
Definition Vec4d:29
osg::Vec4i
Definition Vec4i:22
osg::Vec4s
Definition Vec4s:26
osg::Vec4ub
Definition Vec4ub:28
osg::Vec4ui
Definition Vec4ui:22
osg::Vec4us
Definition Vec4us:26
osg::VertexBufferObject
Definition BufferObject:599
osg
Definition AlphaFunc:19
osg::UIntArray
TemplateIndexArray< GLuint, Array::UIntArrayType, 1, GL_UNSIGNED_INT > UIntArray
Definition Array:419
osg::Vec2ubArray
TemplateArray< Vec2ub, Array::Vec2ubArrayType, 2, GL_UNSIGNED_BYTE > Vec2ubArray
Definition Array:436
osg::Vec2Array
TemplateArray< Vec2, Array::Vec2ArrayType, 2, GL_FLOAT > Vec2Array
Definition Array:448
osg::Vec4Array
TemplateArray< Vec4, Array::Vec4ArrayType, 4, GL_FLOAT > Vec4Array
Definition Array:450
osg::QuatArray
TemplateArray< Quat, Array::QuatArrayType, 4, GL_DOUBLE > QuatArray
Definition Array:459
osg::Vec3bArray
TemplateArray< Vec3b, Array::Vec3bArrayType, 3, GL_BYTE > Vec3bArray
Definition Array:425
osg::Vec4iArray
TemplateArray< Vec4i, Array::Vec4iArrayType, 4, GL_INT > Vec4iArray
Definition Array:434
osg::Vec3ubArray
TemplateArray< Vec3ub, Array::Vec3ubArrayType, 3, GL_UNSIGNED_BYTE > Vec3ubArray
Definition Array:437
osg::ShortArray
TemplateIndexArray< GLshort, Array::ShortArrayType, 1, GL_SHORT > ShortArray
Definition Array:414
osg::Vec2
Vec2f Vec2
Definition Vec2:21
osg::Vec3usArray
TemplateArray< Vec3us, Array::Vec3usArrayType, 3, GL_UNSIGNED_SHORT > Vec3usArray
Definition Array:441
osg::Vec4usArray
TemplateArray< Vec4us, Array::Vec4usArrayType, 4, GL_UNSIGNED_SHORT > Vec4usArray
Definition Array:442
osg::getBinding
osg::Array::Binding getBinding(const osg::Array *array)
Definition Array:234
osg::Vec3dArray
TemplateArray< Vec3d, Array::Vec3dArrayType, 3, GL_DOUBLE > Vec3dArray
Definition Array:453
osg::Vec2iArray
TemplateArray< Vec2i, Array::Vec2iArrayType, 2, GL_INT > Vec2iArray
Definition Array:432
osg::Vec3Array
TemplateArray< Vec3, Array::Vec3ArrayType, 3, GL_FLOAT > Vec3Array
Definition Array:449
osg::Vec3
Vec3f Vec3
Definition Vec3:21
osg::FloatArray
TemplateArray< GLfloat, Array::FloatArrayType, 1, GL_FLOAT > FloatArray
Definition Array:421
osg::Vec2usArray
TemplateArray< Vec2us, Array::Vec2usArrayType, 2, GL_UNSIGNED_SHORT > Vec2usArray
Definition Array:440
osg::Vec2uiArray
TemplateArray< Vec2ui, Array::Vec2uiArrayType, 2, GL_UNSIGNED_INT > Vec2uiArray
Definition Array:444
osg::Vec2bArray
TemplateArray< Vec2b, Array::Vec2bArrayType, 2, GL_BYTE > Vec2bArray
Definition Array:424
osg::UShortArray
TemplateIndexArray< GLushort, Array::UShortArrayType, 1, GL_UNSIGNED_SHORT > UShortArray
Definition Array:418
osg::DoubleArray
TemplateArray< GLdouble, Array::DoubleArrayType, 1, GL_DOUBLE > DoubleArray
Definition Array:422
osg::Vec4dArray
TemplateArray< Vec4d, Array::Vec4dArrayType, 4, GL_DOUBLE > Vec4dArray
Definition Array:454
osg::getNormalize
bool getNormalize(const osg::Array *array)
Definition Array:237
osg::Vec2sArray
TemplateArray< Vec2s, Array::Vec2sArrayType, 2, GL_SHORT > Vec2sArray
Definition Array:428
osg::MatrixdArray
TemplateArray< Matrixd, Array::MatrixdArrayType, 16, GL_DOUBLE > MatrixdArray
Definition Array:457
osg::Vec3sArray
TemplateArray< Vec3s, Array::Vec3sArrayType, 3, GL_SHORT > Vec3sArray
Definition Array:429
osg::ByteArray
TemplateIndexArray< GLbyte, Array::ByteArrayType, 1, GL_BYTE > ByteArray
Definition Array:413
osg::Vec4bArray
TemplateArray< Vec4b, Array::Vec4bArrayType, 4, GL_BYTE > Vec4bArray
Definition Array:426
osg::Vec4
Vec4f Vec4
Definition Vec4:21
osg::Vec3iArray
TemplateArray< Vec3i, Array::Vec3iArrayType, 3, GL_INT > Vec3iArray
Definition Array:433
osg::UInt64Array
TemplateIndexArray< GLuint64, Array::UInt64ArrayType, 1, GL_UNSIGNED_INT64_ARB > UInt64Array
Definition Array:461
osg::Vec4sArray
TemplateArray< Vec4s, Array::Vec4sArrayType, 4, GL_SHORT > Vec4sArray
Definition Array:430
osg::Vec3uiArray
TemplateArray< Vec3ui, Array::Vec3uiArrayType, 3, GL_UNSIGNED_INT > Vec3uiArray
Definition Array:445
osg::Vec2dArray
TemplateArray< Vec2d, Array::Vec2dArrayType, 2, GL_DOUBLE > Vec2dArray
Definition Array:452
osg::UByteArray
TemplateIndexArray< GLubyte, Array::UByteArrayType, 1, GL_UNSIGNED_BYTE > UByteArray
Definition Array:417
osg::Vec4uiArray
TemplateArray< Vec4ui, Array::Vec4uiArrayType, 4, GL_UNSIGNED_INT > Vec4uiArray
Definition Array:446
osg::MatrixfArray
TemplateArray< Matrixf, Array::MatrixArrayType, 16, GL_FLOAT > MatrixfArray
Definition Array:456
osg::Vec4ubArray
TemplateArray< Vec4ub, Array::Vec4ubArrayType, 4, GL_UNSIGNED_BYTE > Vec4ubArray
Definition Array:438
osg::Int64Array
TemplateIndexArray< GLint64, Array::Int64ArrayType, 1, GL_INT64_ARB > Int64Array
Definition Array:462
osg::IntArray
TemplateIndexArray< GLint, Array::IntArrayType, 1, GL_INT > IntArray
Definition Array:415
NULL
#define NULL
Definition osg/Export:55
OSG_EXPORT
#define OSG_EXPORT
Definition osg/Export:39