Visualization Library 2.0.0-b3

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | Protected Attributes | List of all members
vl::ArrayAbstract Class Referenceabstract

The ArrayAbstract class defines an abstract interface to conveniently manipulate data stored in a BufferObject. More...

#include <Array.hpp>

+ Inheritance diagram for vl::ArrayAbstract:

Public Member Functions

 ArrayAbstract ()
 Default constructor. More...
 
 ArrayAbstract (const ArrayAbstract &other)
 Copies only the local data and not the BufferObject related fields. More...
 
void operator= (const ArrayAbstract &other)
 Copies only the local data and not the BufferObject related fields. More...
 
virtual ref< ArrayAbstractclone () const =0
 
const BufferObjectbufferObject () const
 
BufferObjectbufferObject ()
 
void clear ()
 
const unsigned char * ptr () const
 Returns the pointer to the first element of the local buffer. Equivalent to bufferObject()->ptr() More...
 
unsigned char * ptr ()
 Returns the pointer to the first element of the local buffer. Equivalent to bufferObject()->ptr() More...
 
virtual size_t bytesUsed () const
 Returns the amount of memory in bytes used by an array. Equivalent to bufferObject()->bytesUsed(). More...
 
virtual size_t glSize () const =0
 Returns the number of scalar components for the array, ie 3 for ArrayFloat3, 1 for ArrayUInt1 etc. More...
 
virtual GLenum glType () const =0
 Returns the OpenGL type for the array, ie GL_FLOAT for ArrayFloat3, GL_UNSIGNED_INT for ArrayUInt1 etc. More...
 
virtual size_t size () const =0
 Returns the number of elements of an array. More...
 
virtual Sphere computeBoundingSphere () const =0
 Computes the bounding sphere enclosing the vectors contained in the buffer. More...
 
virtual AABB computeBoundingBox () const =0
 Computes the axis aligned bounding box enclosing the vectors contained in the buffer. More...
 
virtual void transform (const mat4 &m)=0
 Transforms the vectors contained in the buffer. More...
 
virtual void normalize ()=0
 Normalizes the vectors contained in the buffer. More...
 
virtual vec4 getAsVec4 (size_t vector_index) const =0
 Returns a vector from the buffer as a vec4 value. More...
 
virtual vec3 getAsVec3 (size_t vector_index) const =0
 Returns a vector from the buffer as a vec3 value. More...
 
virtual vec2 getAsVec2 (size_t vector_index) const =0
 Returns a vector from the buffer as a vec2 value. More...
 
virtual int compare (int a, int b) const =0
 Compares two vectors. More...
 
bool isBufferObjectDirty () const
 Wether the BufferObject should be updated or not using the local storage. More...
 
void setBufferObjectDirty (bool dirty=true)
 Wether the BufferObject should be updated or not using the local storage. More...
 
EBufferObjectUsage usage () const
 BU_STATIC_DRAW by default. More...
 
void setUsage (EBufferObjectUsage usage)
 BU_STATIC_DRAW by default. More...
 
void updateBufferObject (EBufferObjectUpdateMode mode=BUM_KeepRamBuffer)
 Updates the BufferObject. More...
 
void setNormalize (bool normalize)
 The 'normalized' parameter as used with glVertexAttribPointer() More...
 
bool normalize () const
 The 'normalized' parameter as used with glVertexAttribPointer() More...
 
void setInterpretation (EVertexAttribInterpretation behavior)
 How the data is interpreted by the OpenGL, see EVertexAttribInterpretation. More...
 
EVertexAttribInterpretation interpretation () const
 How the data is interpreted by the OpenGL, see EVertexAttribInterpretation. More...
 
- Public Member Functions inherited from vl::Object
 Object ()
 Constructor. More...
 
 Object (const Object &other)
 Copy constructor: copies the name, ref count mutex and user data. More...
 
Objectoperator= (const Object &other)
 Copy operator: copies the object's name, ref count mutex and user data. More...
 
const std::string & objectName () const
 The name of the object, by default set to the object's class name. More...
 
void setObjectName (const char *name)
 The name of the object, by default set to the object's class name in debug builds. More...
 
void setObjectName (const std::string &name)
 The name of the object, by default set to the object's class name in debug builds. More...
 
void setRefCountMutex (IMutex *mutex)
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
IMutexrefCountMutex ()
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
const IMutexrefCountMutex () const
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
int referenceCount () const
 Returns the number of references of an object. More...
 
void incReference () const
 Increments the reference count of an object. More...
 
void decReference ()
 Decrements the reference count of an object and deletes it if both automaticDelete() is true the count reaches 0. More...
 
void setAutomaticDelete (bool autodel_on)
 If set to true the Object is deleted when its reference count reaches 0. More...
 
bool automaticDelete () const
 If set to true the Object is deleted when its reference count reaches 0. More...
 
template<class T >
T * as ()
 Casts an Object to the specified class. More...
 
template<class T >
const T * as () const
 Casts an Object to the specified class. More...
 

Protected Attributes

ref< BufferObjectmBufferObject
 
EBufferObjectUsage mBufferObjectUsage
 
bool mBufferObjectDirty
 
EVertexAttribInterpretation mInterpretation
 
bool mNormalize
 
- Protected Attributes inherited from vl::Object
std::string mObjectName
 
IMutexmRefCountMutex
 
int mReferenceCount
 
bool mAutomaticDelete
 

Additional Inherited Members

- Protected Member Functions inherited from vl::Object
virtual ~Object ()
 

Detailed Description

The ArrayAbstract class defines an abstract interface to conveniently manipulate data stored in a BufferObject.

See also

Definition at line 58 of file Array.hpp.

Constructor & Destructor Documentation

◆ ArrayAbstract() [1/2]

vl::ArrayAbstract::ArrayAbstract ( )
inline

Default constructor.

Definition at line 64 of file Array.hpp.

References vl::BU_STATIC_DRAW, mBufferObject, mBufferObjectDirty, mBufferObjectUsage, mInterpretation, mNormalize, and vl::VAI_NORMAL.

◆ ArrayAbstract() [2/2]

vl::ArrayAbstract::ArrayAbstract ( const ArrayAbstract other)
inline

Copies only the local data and not the BufferObject related fields.

Definition at line 75 of file Array.hpp.

References vl::BU_STATIC_DRAW, mBufferObject, mBufferObjectDirty, mBufferObjectUsage, mInterpretation, mNormalize, operator=(), and vl::VAI_NORMAL.

Member Function Documentation

◆ bufferObject() [1/2]

const BufferObject* vl::ArrayAbstract::bufferObject ( ) const
inline

◆ bufferObject() [2/2]

BufferObject* vl::ArrayAbstract::bufferObject ( )
inline

Definition at line 98 of file Array.hpp.

References mBufferObject.

◆ bytesUsed()

virtual size_t vl::ArrayAbstract::bytesUsed ( ) const
inlinevirtual

◆ clear()

void vl::ArrayAbstract::clear ( )
inline

Definition at line 100 of file Array.hpp.

References bufferObject(), and vl::Buffer::clear().

◆ clone()

virtual ref<ArrayAbstract> vl::ArrayAbstract::clone ( ) const
pure virtual

Implemented in vl::Array< T_VectorType, T_Scalar, T_GL_Size, T_GL_Type >, vl::Array< uvec4, GLuint, 4, GL_FIXED >, vl::Array< uvec2, GLuint, 2, GL_FIXED >, vl::Array< ubvec4, GLubyte, 4, GL_UNSIGNED_BYTE >, vl::Array< ubvec2, GLubyte, 2, GL_UNSIGNED_BYTE >, vl::Array< svec4, GLshort, 4, GL_SHORT >, vl::Array< svec2, GLshort, 2, GL_SHORT >, vl::Array< GLshort, GLshort, 1, GL_SHORT >, vl::Array< uvec4, GLuint, 4, GL_UNSIGNED_INT >, vl::Array< ivec3, GLint, 3, GL_INT_2_10_10_10_REV >, vl::Array< GLuint, GLuint, 1, GL_FIXED >, vl::Array< uvec2, GLuint, 2, GL_UNSIGNED_INT >, vl::Array< GLuint, GLuint, 1, GL_UNSIGNED_INT >, vl::Array< hvec3, half, 3, GL_HALF_FLOAT >, vl::Array< hvec2, half, 2, GL_HALF_FLOAT >, vl::Array< uvec3, GLuint, 3, GL_FIXED >, vl::Array< dvec4, GLdouble, 4, GL_DOUBLE >, vl::Array< ivec3, GLint, 3, GL_INT >, vl::Array< ivec2, GLint, 2, GL_INT >, vl::Array< GLbyte, GLbyte, 1, GL_BYTE >, vl::Array< uvec2, GLuint, 2, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< dvec3, GLdouble, 3, GL_DOUBLE >, vl::Array< GLdouble, GLdouble, 1, GL_DOUBLE >, vl::Array< uvec3, GLuint, 3, GL_UNSIGNED_INT >, vl::Array< GLint, GLint, 1, GL_INT >, vl::Array< ubvec3, GLubyte, 3, GL_UNSIGNED_BYTE >, vl::Array< ivec4, GLint, 4, GL_INT >, vl::Array< usvec4, GLushort, 4, GL_UNSIGNED_SHORT >, vl::Array< usvec2, GLushort, 2, GL_UNSIGNED_SHORT >, vl::Array< uvec4, GLuint, 4, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< GLubyte, GLubyte, 1, GL_UNSIGNED_BYTE >, vl::Array< usvec3, GLushort, 3, GL_UNSIGNED_SHORT >, vl::Array< half, half, 1, GL_HALF_FLOAT >, vl::Array< GLuint, GLuint, 1, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< dvec2, GLdouble, 2, GL_DOUBLE >, vl::Array< fvec3, GLfloat, 3, GL_FLOAT >, vl::Array< hvec4, half, 4, GL_HALF_FLOAT >, vl::Array< ivec4, GLint, 4, GL_INT_2_10_10_10_REV >, vl::Array< ivec2, GLint, 2, GL_INT_2_10_10_10_REV >, vl::Array< GLushort, GLushort, 1, GL_UNSIGNED_SHORT >, vl::Array< uvec3, GLuint, 3, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< GLfloat, GLfloat, 1, GL_FLOAT >, vl::Array< GLint, GLint, 1, GL_INT_2_10_10_10_REV >, vl::Array< fvec4, GLfloat, 4, GL_FLOAT >, vl::Array< fvec2, GLfloat, 2, GL_FLOAT >, vl::Array< svec3, GLshort, 3, GL_SHORT >, vl::Array< bvec4, GLbyte, 4, GL_BYTE >, vl::Array< bvec3, GLbyte, 3, GL_BYTE >, and vl::Array< bvec2, GLbyte, 2, GL_BYTE >.

Referenced by operator=().

◆ compare()

virtual int vl::ArrayAbstract::compare ( int  a,
int  b 
) const
pure virtual

Compares two vectors.

Implemented in vl::Array< T_VectorType, T_Scalar, T_GL_Size, T_GL_Type >, vl::Array< uvec4, GLuint, 4, GL_FIXED >, vl::Array< uvec2, GLuint, 2, GL_FIXED >, vl::Array< ubvec4, GLubyte, 4, GL_UNSIGNED_BYTE >, vl::Array< ubvec2, GLubyte, 2, GL_UNSIGNED_BYTE >, vl::Array< svec4, GLshort, 4, GL_SHORT >, vl::Array< svec2, GLshort, 2, GL_SHORT >, vl::Array< GLshort, GLshort, 1, GL_SHORT >, vl::Array< uvec4, GLuint, 4, GL_UNSIGNED_INT >, vl::Array< ivec3, GLint, 3, GL_INT_2_10_10_10_REV >, vl::Array< GLuint, GLuint, 1, GL_FIXED >, vl::Array< uvec2, GLuint, 2, GL_UNSIGNED_INT >, vl::Array< GLuint, GLuint, 1, GL_UNSIGNED_INT >, vl::Array< hvec3, half, 3, GL_HALF_FLOAT >, vl::Array< hvec2, half, 2, GL_HALF_FLOAT >, vl::Array< uvec3, GLuint, 3, GL_FIXED >, vl::Array< dvec4, GLdouble, 4, GL_DOUBLE >, vl::Array< ivec3, GLint, 3, GL_INT >, vl::Array< ivec2, GLint, 2, GL_INT >, vl::Array< GLbyte, GLbyte, 1, GL_BYTE >, vl::Array< uvec2, GLuint, 2, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< dvec3, GLdouble, 3, GL_DOUBLE >, vl::Array< GLdouble, GLdouble, 1, GL_DOUBLE >, vl::Array< uvec3, GLuint, 3, GL_UNSIGNED_INT >, vl::Array< GLint, GLint, 1, GL_INT >, vl::Array< ubvec3, GLubyte, 3, GL_UNSIGNED_BYTE >, vl::Array< ivec4, GLint, 4, GL_INT >, vl::Array< usvec4, GLushort, 4, GL_UNSIGNED_SHORT >, vl::Array< usvec2, GLushort, 2, GL_UNSIGNED_SHORT >, vl::Array< uvec4, GLuint, 4, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< GLubyte, GLubyte, 1, GL_UNSIGNED_BYTE >, vl::Array< usvec3, GLushort, 3, GL_UNSIGNED_SHORT >, vl::Array< half, half, 1, GL_HALF_FLOAT >, vl::Array< GLuint, GLuint, 1, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< dvec2, GLdouble, 2, GL_DOUBLE >, vl::Array< fvec3, GLfloat, 3, GL_FLOAT >, vl::Array< hvec4, half, 4, GL_HALF_FLOAT >, vl::Array< ivec4, GLint, 4, GL_INT_2_10_10_10_REV >, vl::Array< ivec2, GLint, 2, GL_INT_2_10_10_10_REV >, vl::Array< GLushort, GLushort, 1, GL_UNSIGNED_SHORT >, vl::Array< uvec3, GLuint, 3, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< GLfloat, GLfloat, 1, GL_FLOAT >, vl::Array< GLint, GLint, 1, GL_INT_2_10_10_10_REV >, vl::Array< fvec4, GLfloat, 4, GL_FLOAT >, vl::Array< fvec2, GLfloat, 2, GL_FLOAT >, vl::Array< svec3, GLshort, 3, GL_SHORT >, vl::Array< bvec4, GLbyte, 4, GL_BYTE >, vl::Array< bvec3, GLbyte, 3, GL_BYTE >, and vl::Array< bvec2, GLbyte, 2, GL_BYTE >.

Referenced by bytesUsed().

◆ computeBoundingBox()

virtual AABB vl::ArrayAbstract::computeBoundingBox ( ) const
pure virtual

Computes the axis aligned bounding box enclosing the vectors contained in the buffer.

Implemented in vl::Array< T_VectorType, T_Scalar, T_GL_Size, T_GL_Type >, vl::Array< uvec4, GLuint, 4, GL_FIXED >, vl::Array< uvec2, GLuint, 2, GL_FIXED >, vl::Array< ubvec4, GLubyte, 4, GL_UNSIGNED_BYTE >, vl::Array< ubvec2, GLubyte, 2, GL_UNSIGNED_BYTE >, vl::Array< svec4, GLshort, 4, GL_SHORT >, vl::Array< svec2, GLshort, 2, GL_SHORT >, vl::Array< GLshort, GLshort, 1, GL_SHORT >, vl::Array< uvec4, GLuint, 4, GL_UNSIGNED_INT >, vl::Array< ivec3, GLint, 3, GL_INT_2_10_10_10_REV >, vl::Array< GLuint, GLuint, 1, GL_FIXED >, vl::Array< uvec2, GLuint, 2, GL_UNSIGNED_INT >, vl::Array< GLuint, GLuint, 1, GL_UNSIGNED_INT >, vl::Array< hvec3, half, 3, GL_HALF_FLOAT >, vl::Array< hvec2, half, 2, GL_HALF_FLOAT >, vl::Array< uvec3, GLuint, 3, GL_FIXED >, vl::Array< dvec4, GLdouble, 4, GL_DOUBLE >, vl::Array< ivec3, GLint, 3, GL_INT >, vl::Array< ivec2, GLint, 2, GL_INT >, vl::Array< GLbyte, GLbyte, 1, GL_BYTE >, vl::Array< uvec2, GLuint, 2, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< dvec3, GLdouble, 3, GL_DOUBLE >, vl::Array< GLdouble, GLdouble, 1, GL_DOUBLE >, vl::Array< uvec3, GLuint, 3, GL_UNSIGNED_INT >, vl::Array< GLint, GLint, 1, GL_INT >, vl::Array< ubvec3, GLubyte, 3, GL_UNSIGNED_BYTE >, vl::Array< ivec4, GLint, 4, GL_INT >, vl::Array< usvec4, GLushort, 4, GL_UNSIGNED_SHORT >, vl::Array< usvec2, GLushort, 2, GL_UNSIGNED_SHORT >, vl::Array< uvec4, GLuint, 4, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< GLubyte, GLubyte, 1, GL_UNSIGNED_BYTE >, vl::Array< usvec3, GLushort, 3, GL_UNSIGNED_SHORT >, vl::Array< half, half, 1, GL_HALF_FLOAT >, vl::Array< GLuint, GLuint, 1, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< dvec2, GLdouble, 2, GL_DOUBLE >, vl::Array< fvec3, GLfloat, 3, GL_FLOAT >, vl::Array< hvec4, half, 4, GL_HALF_FLOAT >, vl::Array< ivec4, GLint, 4, GL_INT_2_10_10_10_REV >, vl::Array< ivec2, GLint, 2, GL_INT_2_10_10_10_REV >, vl::Array< GLushort, GLushort, 1, GL_UNSIGNED_SHORT >, vl::Array< uvec3, GLuint, 3, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< GLfloat, GLfloat, 1, GL_FLOAT >, vl::Array< GLint, GLint, 1, GL_INT_2_10_10_10_REV >, vl::Array< fvec4, GLfloat, 4, GL_FLOAT >, vl::Array< fvec2, GLfloat, 2, GL_FLOAT >, vl::Array< svec3, GLshort, 3, GL_SHORT >, vl::Array< bvec4, GLbyte, 4, GL_BYTE >, vl::Array< bvec3, GLbyte, 3, GL_BYTE >, and vl::Array< bvec2, GLbyte, 2, GL_BYTE >.

Referenced by bytesUsed().

◆ computeBoundingSphere()

virtual Sphere vl::ArrayAbstract::computeBoundingSphere ( ) const
pure virtual

Computes the bounding sphere enclosing the vectors contained in the buffer.

Implemented in vl::Array< T_VectorType, T_Scalar, T_GL_Size, T_GL_Type >, vl::Array< uvec4, GLuint, 4, GL_FIXED >, vl::Array< uvec2, GLuint, 2, GL_FIXED >, vl::Array< ubvec4, GLubyte, 4, GL_UNSIGNED_BYTE >, vl::Array< ubvec2, GLubyte, 2, GL_UNSIGNED_BYTE >, vl::Array< svec4, GLshort, 4, GL_SHORT >, vl::Array< svec2, GLshort, 2, GL_SHORT >, vl::Array< GLshort, GLshort, 1, GL_SHORT >, vl::Array< uvec4, GLuint, 4, GL_UNSIGNED_INT >, vl::Array< ivec3, GLint, 3, GL_INT_2_10_10_10_REV >, vl::Array< GLuint, GLuint, 1, GL_FIXED >, vl::Array< uvec2, GLuint, 2, GL_UNSIGNED_INT >, vl::Array< GLuint, GLuint, 1, GL_UNSIGNED_INT >, vl::Array< hvec3, half, 3, GL_HALF_FLOAT >, vl::Array< hvec2, half, 2, GL_HALF_FLOAT >, vl::Array< uvec3, GLuint, 3, GL_FIXED >, vl::Array< dvec4, GLdouble, 4, GL_DOUBLE >, vl::Array< ivec3, GLint, 3, GL_INT >, vl::Array< ivec2, GLint, 2, GL_INT >, vl::Array< GLbyte, GLbyte, 1, GL_BYTE >, vl::Array< uvec2, GLuint, 2, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< dvec3, GLdouble, 3, GL_DOUBLE >, vl::Array< GLdouble, GLdouble, 1, GL_DOUBLE >, vl::Array< uvec3, GLuint, 3, GL_UNSIGNED_INT >, vl::Array< GLint, GLint, 1, GL_INT >, vl::Array< ubvec3, GLubyte, 3, GL_UNSIGNED_BYTE >, vl::Array< ivec4, GLint, 4, GL_INT >, vl::Array< usvec4, GLushort, 4, GL_UNSIGNED_SHORT >, vl::Array< usvec2, GLushort, 2, GL_UNSIGNED_SHORT >, vl::Array< uvec4, GLuint, 4, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< GLubyte, GLubyte, 1, GL_UNSIGNED_BYTE >, vl::Array< usvec3, GLushort, 3, GL_UNSIGNED_SHORT >, vl::Array< half, half, 1, GL_HALF_FLOAT >, vl::Array< GLuint, GLuint, 1, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< dvec2, GLdouble, 2, GL_DOUBLE >, vl::Array< fvec3, GLfloat, 3, GL_FLOAT >, vl::Array< hvec4, half, 4, GL_HALF_FLOAT >, vl::Array< ivec4, GLint, 4, GL_INT_2_10_10_10_REV >, vl::Array< ivec2, GLint, 2, GL_INT_2_10_10_10_REV >, vl::Array< GLushort, GLushort, 1, GL_UNSIGNED_SHORT >, vl::Array< uvec3, GLuint, 3, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< GLfloat, GLfloat, 1, GL_FLOAT >, vl::Array< GLint, GLint, 1, GL_INT_2_10_10_10_REV >, vl::Array< fvec4, GLfloat, 4, GL_FLOAT >, vl::Array< fvec2, GLfloat, 2, GL_FLOAT >, vl::Array< svec3, GLshort, 3, GL_SHORT >, vl::Array< bvec4, GLbyte, 4, GL_BYTE >, vl::Array< bvec3, GLbyte, 3, GL_BYTE >, and vl::Array< bvec2, GLbyte, 2, GL_BYTE >.

Referenced by bytesUsed().

◆ getAsVec2()

virtual vec2 vl::ArrayAbstract::getAsVec2 ( size_t  vector_index) const
pure virtual

Returns a vector from the buffer as a vec2 value.

Implemented in vl::Array< T_VectorType, T_Scalar, T_GL_Size, T_GL_Type >, vl::Array< uvec4, GLuint, 4, GL_FIXED >, vl::Array< uvec2, GLuint, 2, GL_FIXED >, vl::Array< ubvec4, GLubyte, 4, GL_UNSIGNED_BYTE >, vl::Array< ubvec2, GLubyte, 2, GL_UNSIGNED_BYTE >, vl::Array< svec4, GLshort, 4, GL_SHORT >, vl::Array< svec2, GLshort, 2, GL_SHORT >, vl::Array< GLshort, GLshort, 1, GL_SHORT >, vl::Array< uvec4, GLuint, 4, GL_UNSIGNED_INT >, vl::Array< ivec3, GLint, 3, GL_INT_2_10_10_10_REV >, vl::Array< GLuint, GLuint, 1, GL_FIXED >, vl::Array< uvec2, GLuint, 2, GL_UNSIGNED_INT >, vl::Array< GLuint, GLuint, 1, GL_UNSIGNED_INT >, vl::Array< hvec3, half, 3, GL_HALF_FLOAT >, vl::Array< hvec2, half, 2, GL_HALF_FLOAT >, vl::Array< uvec3, GLuint, 3, GL_FIXED >, vl::Array< dvec4, GLdouble, 4, GL_DOUBLE >, vl::Array< ivec3, GLint, 3, GL_INT >, vl::Array< ivec2, GLint, 2, GL_INT >, vl::Array< GLbyte, GLbyte, 1, GL_BYTE >, vl::Array< uvec2, GLuint, 2, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< dvec3, GLdouble, 3, GL_DOUBLE >, vl::Array< GLdouble, GLdouble, 1, GL_DOUBLE >, vl::Array< uvec3, GLuint, 3, GL_UNSIGNED_INT >, vl::Array< GLint, GLint, 1, GL_INT >, vl::Array< ubvec3, GLubyte, 3, GL_UNSIGNED_BYTE >, vl::Array< ivec4, GLint, 4, GL_INT >, vl::Array< usvec4, GLushort, 4, GL_UNSIGNED_SHORT >, vl::Array< usvec2, GLushort, 2, GL_UNSIGNED_SHORT >, vl::Array< uvec4, GLuint, 4, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< GLubyte, GLubyte, 1, GL_UNSIGNED_BYTE >, vl::Array< usvec3, GLushort, 3, GL_UNSIGNED_SHORT >, vl::Array< half, half, 1, GL_HALF_FLOAT >, vl::Array< GLuint, GLuint, 1, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< dvec2, GLdouble, 2, GL_DOUBLE >, vl::Array< fvec3, GLfloat, 3, GL_FLOAT >, vl::Array< hvec4, half, 4, GL_HALF_FLOAT >, vl::Array< ivec4, GLint, 4, GL_INT_2_10_10_10_REV >, vl::Array< ivec2, GLint, 2, GL_INT_2_10_10_10_REV >, vl::Array< GLushort, GLushort, 1, GL_UNSIGNED_SHORT >, vl::Array< uvec3, GLuint, 3, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< GLfloat, GLfloat, 1, GL_FLOAT >, vl::Array< GLint, GLint, 1, GL_INT_2_10_10_10_REV >, vl::Array< fvec4, GLfloat, 4, GL_FLOAT >, vl::Array< fvec2, GLfloat, 2, GL_FLOAT >, vl::Array< svec3, GLshort, 3, GL_SHORT >, vl::Array< bvec4, GLbyte, 4, GL_BYTE >, vl::Array< bvec3, GLbyte, 3, GL_BYTE >, and vl::Array< bvec2, GLbyte, 2, GL_BYTE >.

Referenced by bytesUsed().

◆ getAsVec3()

virtual vec3 vl::ArrayAbstract::getAsVec3 ( size_t  vector_index) const
pure virtual

Returns a vector from the buffer as a vec3 value.

Implemented in vl::Array< T_VectorType, T_Scalar, T_GL_Size, T_GL_Type >, vl::Array< uvec4, GLuint, 4, GL_FIXED >, vl::Array< uvec2, GLuint, 2, GL_FIXED >, vl::Array< ubvec4, GLubyte, 4, GL_UNSIGNED_BYTE >, vl::Array< ubvec2, GLubyte, 2, GL_UNSIGNED_BYTE >, vl::Array< svec4, GLshort, 4, GL_SHORT >, vl::Array< svec2, GLshort, 2, GL_SHORT >, vl::Array< GLshort, GLshort, 1, GL_SHORT >, vl::Array< uvec4, GLuint, 4, GL_UNSIGNED_INT >, vl::Array< ivec3, GLint, 3, GL_INT_2_10_10_10_REV >, vl::Array< GLuint, GLuint, 1, GL_FIXED >, vl::Array< uvec2, GLuint, 2, GL_UNSIGNED_INT >, vl::Array< GLuint, GLuint, 1, GL_UNSIGNED_INT >, vl::Array< hvec3, half, 3, GL_HALF_FLOAT >, vl::Array< hvec2, half, 2, GL_HALF_FLOAT >, vl::Array< uvec3, GLuint, 3, GL_FIXED >, vl::Array< dvec4, GLdouble, 4, GL_DOUBLE >, vl::Array< ivec3, GLint, 3, GL_INT >, vl::Array< ivec2, GLint, 2, GL_INT >, vl::Array< GLbyte, GLbyte, 1, GL_BYTE >, vl::Array< uvec2, GLuint, 2, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< dvec3, GLdouble, 3, GL_DOUBLE >, vl::Array< GLdouble, GLdouble, 1, GL_DOUBLE >, vl::Array< uvec3, GLuint, 3, GL_UNSIGNED_INT >, vl::Array< GLint, GLint, 1, GL_INT >, vl::Array< ubvec3, GLubyte, 3, GL_UNSIGNED_BYTE >, vl::Array< ivec4, GLint, 4, GL_INT >, vl::Array< usvec4, GLushort, 4, GL_UNSIGNED_SHORT >, vl::Array< usvec2, GLushort, 2, GL_UNSIGNED_SHORT >, vl::Array< uvec4, GLuint, 4, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< GLubyte, GLubyte, 1, GL_UNSIGNED_BYTE >, vl::Array< usvec3, GLushort, 3, GL_UNSIGNED_SHORT >, vl::Array< half, half, 1, GL_HALF_FLOAT >, vl::Array< GLuint, GLuint, 1, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< dvec2, GLdouble, 2, GL_DOUBLE >, vl::Array< fvec3, GLfloat, 3, GL_FLOAT >, vl::Array< hvec4, half, 4, GL_HALF_FLOAT >, vl::Array< ivec4, GLint, 4, GL_INT_2_10_10_10_REV >, vl::Array< ivec2, GLint, 2, GL_INT_2_10_10_10_REV >, vl::Array< GLushort, GLushort, 1, GL_UNSIGNED_SHORT >, vl::Array< uvec3, GLuint, 3, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< GLfloat, GLfloat, 1, GL_FLOAT >, vl::Array< GLint, GLint, 1, GL_INT_2_10_10_10_REV >, vl::Array< fvec4, GLfloat, 4, GL_FLOAT >, vl::Array< fvec2, GLfloat, 2, GL_FLOAT >, vl::Array< svec3, GLshort, 3, GL_SHORT >, vl::Array< bvec4, GLbyte, 4, GL_BYTE >, vl::Array< bvec3, GLbyte, 3, GL_BYTE >, and vl::Array< bvec2, GLbyte, 2, GL_BYTE >.

Referenced by bytesUsed(), vl::Geometry::computeBounds_Implementation(), vl::Geometry::computeNormals(), vl::EdgeExtractor::extractEdges(), vl::Geometry::fixTriangleWinding(), vl::RayIntersector::intersectGeometry(), vl::DepthSortCallback::onActorRenderStarted(), vl::VectorGraphics::popScissor(), and vl::PolygonSimplifier::simplify().

◆ getAsVec4()

virtual vec4 vl::ArrayAbstract::getAsVec4 ( size_t  vector_index) const
pure virtual

Returns a vector from the buffer as a vec4 value.

Implemented in vl::Array< T_VectorType, T_Scalar, T_GL_Size, T_GL_Type >, vl::Array< uvec4, GLuint, 4, GL_FIXED >, vl::Array< uvec2, GLuint, 2, GL_FIXED >, vl::Array< ubvec4, GLubyte, 4, GL_UNSIGNED_BYTE >, vl::Array< ubvec2, GLubyte, 2, GL_UNSIGNED_BYTE >, vl::Array< svec4, GLshort, 4, GL_SHORT >, vl::Array< svec2, GLshort, 2, GL_SHORT >, vl::Array< GLshort, GLshort, 1, GL_SHORT >, vl::Array< uvec4, GLuint, 4, GL_UNSIGNED_INT >, vl::Array< ivec3, GLint, 3, GL_INT_2_10_10_10_REV >, vl::Array< GLuint, GLuint, 1, GL_FIXED >, vl::Array< uvec2, GLuint, 2, GL_UNSIGNED_INT >, vl::Array< GLuint, GLuint, 1, GL_UNSIGNED_INT >, vl::Array< hvec3, half, 3, GL_HALF_FLOAT >, vl::Array< hvec2, half, 2, GL_HALF_FLOAT >, vl::Array< uvec3, GLuint, 3, GL_FIXED >, vl::Array< dvec4, GLdouble, 4, GL_DOUBLE >, vl::Array< ivec3, GLint, 3, GL_INT >, vl::Array< ivec2, GLint, 2, GL_INT >, vl::Array< GLbyte, GLbyte, 1, GL_BYTE >, vl::Array< uvec2, GLuint, 2, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< dvec3, GLdouble, 3, GL_DOUBLE >, vl::Array< GLdouble, GLdouble, 1, GL_DOUBLE >, vl::Array< uvec3, GLuint, 3, GL_UNSIGNED_INT >, vl::Array< GLint, GLint, 1, GL_INT >, vl::Array< ubvec3, GLubyte, 3, GL_UNSIGNED_BYTE >, vl::Array< ivec4, GLint, 4, GL_INT >, vl::Array< usvec4, GLushort, 4, GL_UNSIGNED_SHORT >, vl::Array< usvec2, GLushort, 2, GL_UNSIGNED_SHORT >, vl::Array< uvec4, GLuint, 4, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< GLubyte, GLubyte, 1, GL_UNSIGNED_BYTE >, vl::Array< usvec3, GLushort, 3, GL_UNSIGNED_SHORT >, vl::Array< half, half, 1, GL_HALF_FLOAT >, vl::Array< GLuint, GLuint, 1, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< dvec2, GLdouble, 2, GL_DOUBLE >, vl::Array< fvec3, GLfloat, 3, GL_FLOAT >, vl::Array< hvec4, half, 4, GL_HALF_FLOAT >, vl::Array< ivec4, GLint, 4, GL_INT_2_10_10_10_REV >, vl::Array< ivec2, GLint, 2, GL_INT_2_10_10_10_REV >, vl::Array< GLushort, GLushort, 1, GL_UNSIGNED_SHORT >, vl::Array< uvec3, GLuint, 3, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< GLfloat, GLfloat, 1, GL_FLOAT >, vl::Array< GLint, GLint, 1, GL_INT_2_10_10_10_REV >, vl::Array< fvec4, GLfloat, 4, GL_FLOAT >, vl::Array< fvec2, GLfloat, 2, GL_FLOAT >, vl::Array< svec3, GLshort, 3, GL_SHORT >, vl::Array< bvec4, GLbyte, 4, GL_BYTE >, vl::Array< bvec3, GLbyte, 3, GL_BYTE >, and vl::Array< bvec2, GLbyte, 2, GL_BYTE >.

Referenced by bytesUsed(), and vl::VectorGraphics::popScissor().

◆ glSize()

virtual size_t vl::ArrayAbstract::glSize ( ) const
pure virtual

Returns the number of scalar components for the array, ie 3 for ArrayFloat3, 1 for ArrayUInt1 etc.

Implemented in vl::Array< T_VectorType, T_Scalar, T_GL_Size, T_GL_Type >, vl::Array< uvec4, GLuint, 4, GL_FIXED >, vl::Array< uvec2, GLuint, 2, GL_FIXED >, vl::Array< ubvec4, GLubyte, 4, GL_UNSIGNED_BYTE >, vl::Array< ubvec2, GLubyte, 2, GL_UNSIGNED_BYTE >, vl::Array< svec4, GLshort, 4, GL_SHORT >, vl::Array< svec2, GLshort, 2, GL_SHORT >, vl::Array< GLshort, GLshort, 1, GL_SHORT >, vl::Array< uvec4, GLuint, 4, GL_UNSIGNED_INT >, vl::Array< ivec3, GLint, 3, GL_INT_2_10_10_10_REV >, vl::Array< GLuint, GLuint, 1, GL_FIXED >, vl::Array< uvec2, GLuint, 2, GL_UNSIGNED_INT >, vl::Array< GLuint, GLuint, 1, GL_UNSIGNED_INT >, vl::Array< hvec3, half, 3, GL_HALF_FLOAT >, vl::Array< hvec2, half, 2, GL_HALF_FLOAT >, vl::Array< uvec3, GLuint, 3, GL_FIXED >, vl::Array< dvec4, GLdouble, 4, GL_DOUBLE >, vl::Array< ivec3, GLint, 3, GL_INT >, vl::Array< ivec2, GLint, 2, GL_INT >, vl::Array< GLbyte, GLbyte, 1, GL_BYTE >, vl::Array< uvec2, GLuint, 2, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< dvec3, GLdouble, 3, GL_DOUBLE >, vl::Array< GLdouble, GLdouble, 1, GL_DOUBLE >, vl::Array< uvec3, GLuint, 3, GL_UNSIGNED_INT >, vl::Array< GLint, GLint, 1, GL_INT >, vl::Array< ubvec3, GLubyte, 3, GL_UNSIGNED_BYTE >, vl::Array< ivec4, GLint, 4, GL_INT >, vl::Array< usvec4, GLushort, 4, GL_UNSIGNED_SHORT >, vl::Array< usvec2, GLushort, 2, GL_UNSIGNED_SHORT >, vl::Array< uvec4, GLuint, 4, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< GLubyte, GLubyte, 1, GL_UNSIGNED_BYTE >, vl::Array< usvec3, GLushort, 3, GL_UNSIGNED_SHORT >, vl::Array< half, half, 1, GL_HALF_FLOAT >, vl::Array< GLuint, GLuint, 1, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< dvec2, GLdouble, 2, GL_DOUBLE >, vl::Array< fvec3, GLfloat, 3, GL_FLOAT >, vl::Array< hvec4, half, 4, GL_HALF_FLOAT >, vl::Array< ivec4, GLint, 4, GL_INT_2_10_10_10_REV >, vl::Array< ivec2, GLint, 2, GL_INT_2_10_10_10_REV >, vl::Array< GLushort, GLushort, 1, GL_UNSIGNED_SHORT >, vl::Array< uvec3, GLuint, 3, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< GLfloat, GLfloat, 1, GL_FLOAT >, vl::Array< GLint, GLint, 1, GL_INT_2_10_10_10_REV >, vl::Array< fvec4, GLfloat, 4, GL_FLOAT >, vl::Array< fvec2, GLfloat, 2, GL_FLOAT >, vl::Array< svec3, GLshort, 3, GL_SHORT >, vl::Array< bvec4, GLbyte, 4, GL_BYTE >, vl::Array< bvec3, GLbyte, 3, GL_BYTE >, and vl::Array< bvec2, GLbyte, 2, GL_BYTE >.

Referenced by vl::OpenGLContext::bindVAS_Attribs(), vl::OpenGLContext::bindVAS_Fixed(), bytesUsed(), vl::Geometry::setColorArray(), vl::Geometry::setFogCoordArray(), vl::Geometry::setNormalArray(), vl::Geometry::setSecondaryColorArray(), vl::Geometry::setTexCoordArray(), and vl::Geometry::setVertexArray().

◆ glType()

virtual GLenum vl::ArrayAbstract::glType ( ) const
pure virtual

Returns the OpenGL type for the array, ie GL_FLOAT for ArrayFloat3, GL_UNSIGNED_INT for ArrayUInt1 etc.

Implemented in vl::Array< T_VectorType, T_Scalar, T_GL_Size, T_GL_Type >, vl::Array< uvec4, GLuint, 4, GL_FIXED >, vl::Array< uvec2, GLuint, 2, GL_FIXED >, vl::Array< ubvec4, GLubyte, 4, GL_UNSIGNED_BYTE >, vl::Array< ubvec2, GLubyte, 2, GL_UNSIGNED_BYTE >, vl::Array< svec4, GLshort, 4, GL_SHORT >, vl::Array< svec2, GLshort, 2, GL_SHORT >, vl::Array< GLshort, GLshort, 1, GL_SHORT >, vl::Array< uvec4, GLuint, 4, GL_UNSIGNED_INT >, vl::Array< ivec3, GLint, 3, GL_INT_2_10_10_10_REV >, vl::Array< GLuint, GLuint, 1, GL_FIXED >, vl::Array< uvec2, GLuint, 2, GL_UNSIGNED_INT >, vl::Array< GLuint, GLuint, 1, GL_UNSIGNED_INT >, vl::Array< hvec3, half, 3, GL_HALF_FLOAT >, vl::Array< hvec2, half, 2, GL_HALF_FLOAT >, vl::Array< uvec3, GLuint, 3, GL_FIXED >, vl::Array< dvec4, GLdouble, 4, GL_DOUBLE >, vl::Array< ivec3, GLint, 3, GL_INT >, vl::Array< ivec2, GLint, 2, GL_INT >, vl::Array< GLbyte, GLbyte, 1, GL_BYTE >, vl::Array< uvec2, GLuint, 2, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< dvec3, GLdouble, 3, GL_DOUBLE >, vl::Array< GLdouble, GLdouble, 1, GL_DOUBLE >, vl::Array< uvec3, GLuint, 3, GL_UNSIGNED_INT >, vl::Array< GLint, GLint, 1, GL_INT >, vl::Array< ubvec3, GLubyte, 3, GL_UNSIGNED_BYTE >, vl::Array< ivec4, GLint, 4, GL_INT >, vl::Array< usvec4, GLushort, 4, GL_UNSIGNED_SHORT >, vl::Array< usvec2, GLushort, 2, GL_UNSIGNED_SHORT >, vl::Array< uvec4, GLuint, 4, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< GLubyte, GLubyte, 1, GL_UNSIGNED_BYTE >, vl::Array< usvec3, GLushort, 3, GL_UNSIGNED_SHORT >, vl::Array< half, half, 1, GL_HALF_FLOAT >, vl::Array< GLuint, GLuint, 1, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< dvec2, GLdouble, 2, GL_DOUBLE >, vl::Array< fvec3, GLfloat, 3, GL_FLOAT >, vl::Array< hvec4, half, 4, GL_HALF_FLOAT >, vl::Array< ivec4, GLint, 4, GL_INT_2_10_10_10_REV >, vl::Array< ivec2, GLint, 2, GL_INT_2_10_10_10_REV >, vl::Array< GLushort, GLushort, 1, GL_UNSIGNED_SHORT >, vl::Array< uvec3, GLuint, 3, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< GLfloat, GLfloat, 1, GL_FLOAT >, vl::Array< GLint, GLint, 1, GL_INT_2_10_10_10_REV >, vl::Array< fvec4, GLfloat, 4, GL_FLOAT >, vl::Array< fvec2, GLfloat, 2, GL_FLOAT >, vl::Array< svec3, GLshort, 3, GL_SHORT >, vl::Array< bvec4, GLbyte, 4, GL_BYTE >, vl::Array< bvec3, GLbyte, 3, GL_BYTE >, and vl::Array< bvec2, GLbyte, 2, GL_BYTE >.

Referenced by vl::OpenGLContext::bindVAS_Attribs(), vl::OpenGLContext::bindVAS_Fixed(), bytesUsed(), vl::Geometry::setColorArray(), vl::Geometry::setFogCoordArray(), vl::Geometry::setNormalArray(), vl::Geometry::setSecondaryColorArray(), and vl::Geometry::setTexCoordArray().

◆ interpretation()

EVertexAttribInterpretation vl::ArrayAbstract::interpretation ( ) const
inline

How the data is interpreted by the OpenGL, see EVertexAttribInterpretation.

Definition at line 182 of file Array.hpp.

References mInterpretation.

Referenced by vl::OpenGLContext::bindVAS_Attribs().

◆ isBufferObjectDirty()

bool vl::ArrayAbstract::isBufferObjectDirty ( ) const
inline

Wether the BufferObject should be updated or not using the local storage.

Initially set to true. IMPORTANT: To automatically update the buffer object of a Renderable, Geometry etc. you also need to call Renderable::setBufferObjectDirty(). IMPORTANT: To immediately update the buffer object manually call the updateBufferObject() method of this class.

Definition at line 147 of file Array.hpp.

References mBufferObjectDirty.

◆ normalize() [1/2]

virtual void vl::ArrayAbstract::normalize ( )
pure virtual

Normalizes the vectors contained in the buffer.

Implemented in vl::Array< T_VectorType, T_Scalar, T_GL_Size, T_GL_Type >, vl::Array< uvec4, GLuint, 4, GL_FIXED >, vl::Array< uvec2, GLuint, 2, GL_FIXED >, vl::Array< ubvec4, GLubyte, 4, GL_UNSIGNED_BYTE >, vl::Array< ubvec2, GLubyte, 2, GL_UNSIGNED_BYTE >, vl::Array< svec4, GLshort, 4, GL_SHORT >, vl::Array< svec2, GLshort, 2, GL_SHORT >, vl::Array< GLshort, GLshort, 1, GL_SHORT >, vl::Array< uvec4, GLuint, 4, GL_UNSIGNED_INT >, vl::Array< ivec3, GLint, 3, GL_INT_2_10_10_10_REV >, vl::Array< GLuint, GLuint, 1, GL_FIXED >, vl::Array< uvec2, GLuint, 2, GL_UNSIGNED_INT >, vl::Array< GLuint, GLuint, 1, GL_UNSIGNED_INT >, vl::Array< hvec3, half, 3, GL_HALF_FLOAT >, vl::Array< hvec2, half, 2, GL_HALF_FLOAT >, vl::Array< uvec3, GLuint, 3, GL_FIXED >, vl::Array< dvec4, GLdouble, 4, GL_DOUBLE >, vl::Array< ivec3, GLint, 3, GL_INT >, vl::Array< ivec2, GLint, 2, GL_INT >, vl::Array< GLbyte, GLbyte, 1, GL_BYTE >, vl::Array< uvec2, GLuint, 2, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< dvec3, GLdouble, 3, GL_DOUBLE >, vl::Array< GLdouble, GLdouble, 1, GL_DOUBLE >, vl::Array< uvec3, GLuint, 3, GL_UNSIGNED_INT >, vl::Array< GLint, GLint, 1, GL_INT >, vl::Array< ubvec3, GLubyte, 3, GL_UNSIGNED_BYTE >, vl::Array< ivec4, GLint, 4, GL_INT >, vl::Array< usvec4, GLushort, 4, GL_UNSIGNED_SHORT >, vl::Array< usvec2, GLushort, 2, GL_UNSIGNED_SHORT >, vl::Array< uvec4, GLuint, 4, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< GLubyte, GLubyte, 1, GL_UNSIGNED_BYTE >, vl::Array< usvec3, GLushort, 3, GL_UNSIGNED_SHORT >, vl::Array< half, half, 1, GL_HALF_FLOAT >, vl::Array< GLuint, GLuint, 1, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< dvec2, GLdouble, 2, GL_DOUBLE >, vl::Array< fvec3, GLfloat, 3, GL_FLOAT >, vl::Array< hvec4, half, 4, GL_HALF_FLOAT >, vl::Array< ivec4, GLint, 4, GL_INT_2_10_10_10_REV >, vl::Array< ivec2, GLint, 2, GL_INT_2_10_10_10_REV >, vl::Array< GLushort, GLushort, 1, GL_UNSIGNED_SHORT >, vl::Array< uvec3, GLuint, 3, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< GLfloat, GLfloat, 1, GL_FLOAT >, vl::Array< GLint, GLint, 1, GL_INT_2_10_10_10_REV >, vl::Array< fvec4, GLfloat, 4, GL_FLOAT >, vl::Array< fvec2, GLfloat, 2, GL_FLOAT >, vl::Array< svec3, GLshort, 3, GL_SHORT >, vl::Array< bvec4, GLbyte, 4, GL_BYTE >, vl::Array< bvec3, GLbyte, 3, GL_BYTE >, and vl::Array< bvec2, GLbyte, 2, GL_BYTE >.

Referenced by vl::OpenGLContext::bindVAS_Attribs(), bytesUsed(), setNormalize(), and vl::Geometry::transform().

◆ normalize() [2/2]

bool vl::ArrayAbstract::normalize ( ) const
inline

The 'normalized' parameter as used with glVertexAttribPointer()

See also

Definition at line 176 of file Array.hpp.

References mNormalize.

◆ operator=()

void vl::ArrayAbstract::operator= ( const ArrayAbstract other)
inline

Copies only the local data and not the BufferObject related fields.

Definition at line 87 of file Array.hpp.

References bufferObject(), bytesUsed(), vl::Buffer::bytesUsed(), clone(), mInterpretation, mNormalize, ptr(), and vl::Buffer::resize().

Referenced by ArrayAbstract().

◆ ptr() [1/2]

const unsigned char* vl::ArrayAbstract::ptr ( ) const
inline

◆ ptr() [2/2]

unsigned char* vl::ArrayAbstract::ptr ( )
inline

Returns the pointer to the first element of the local buffer. Equivalent to bufferObject()->ptr()

Definition at line 106 of file Array.hpp.

References bufferObject(), NULL, and vl::Buffer::ptr().

◆ setBufferObjectDirty()

void vl::ArrayAbstract::setBufferObjectDirty ( bool  dirty = true)
inline

Wether the BufferObject should be updated or not using the local storage.

Initially set to true. IMPORTANT: To automatically update the buffer object of a Renderable, Geometry etc. you also need to call Renderable::setBufferObjectDirty(). IMPORTANT: To immediately update the buffer object manually call the updateBufferObject() method of this class.

Definition at line 152 of file Array.hpp.

References mBufferObjectDirty.

Referenced by vl::BezierSurface::updateBezierSurface(), and updateBufferObject().

◆ setInterpretation()

void vl::ArrayAbstract::setInterpretation ( EVertexAttribInterpretation  behavior)
inline

How the data is interpreted by the OpenGL, see EVertexAttribInterpretation.

Definition at line 179 of file Array.hpp.

References mInterpretation.

◆ setNormalize()

void vl::ArrayAbstract::setNormalize ( bool  normalize)
inline

The 'normalized' parameter as used with glVertexAttribPointer()

See also

Definition at line 171 of file Array.hpp.

References mNormalize, and normalize().

◆ setUsage()

void vl::ArrayAbstract::setUsage ( EBufferObjectUsage  usage)
inline

BU_STATIC_DRAW by default.

Definition at line 158 of file Array.hpp.

References mBufferObjectUsage, and usage().

◆ size()

virtual size_t vl::ArrayAbstract::size ( ) const
pure virtual

Returns the number of elements of an array.

Implemented in vl::Array< T_VectorType, T_Scalar, T_GL_Size, T_GL_Type >, vl::Array< uvec4, GLuint, 4, GL_FIXED >, vl::Array< uvec2, GLuint, 2, GL_FIXED >, vl::Array< ubvec4, GLubyte, 4, GL_UNSIGNED_BYTE >, vl::Array< ubvec2, GLubyte, 2, GL_UNSIGNED_BYTE >, vl::Array< svec4, GLshort, 4, GL_SHORT >, vl::Array< svec2, GLshort, 2, GL_SHORT >, vl::Array< GLshort, GLshort, 1, GL_SHORT >, vl::Array< uvec4, GLuint, 4, GL_UNSIGNED_INT >, vl::Array< ivec3, GLint, 3, GL_INT_2_10_10_10_REV >, vl::Array< GLuint, GLuint, 1, GL_FIXED >, vl::Array< uvec2, GLuint, 2, GL_UNSIGNED_INT >, vl::Array< GLuint, GLuint, 1, GL_UNSIGNED_INT >, vl::Array< hvec3, half, 3, GL_HALF_FLOAT >, vl::Array< hvec2, half, 2, GL_HALF_FLOAT >, vl::Array< uvec3, GLuint, 3, GL_FIXED >, vl::Array< dvec4, GLdouble, 4, GL_DOUBLE >, vl::Array< ivec3, GLint, 3, GL_INT >, vl::Array< ivec2, GLint, 2, GL_INT >, vl::Array< GLbyte, GLbyte, 1, GL_BYTE >, vl::Array< uvec2, GLuint, 2, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< dvec3, GLdouble, 3, GL_DOUBLE >, vl::Array< GLdouble, GLdouble, 1, GL_DOUBLE >, vl::Array< uvec3, GLuint, 3, GL_UNSIGNED_INT >, vl::Array< GLint, GLint, 1, GL_INT >, vl::Array< ubvec3, GLubyte, 3, GL_UNSIGNED_BYTE >, vl::Array< ivec4, GLint, 4, GL_INT >, vl::Array< usvec4, GLushort, 4, GL_UNSIGNED_SHORT >, vl::Array< usvec2, GLushort, 2, GL_UNSIGNED_SHORT >, vl::Array< uvec4, GLuint, 4, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< GLubyte, GLubyte, 1, GL_UNSIGNED_BYTE >, vl::Array< usvec3, GLushort, 3, GL_UNSIGNED_SHORT >, vl::Array< half, half, 1, GL_HALF_FLOAT >, vl::Array< GLuint, GLuint, 1, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< dvec2, GLdouble, 2, GL_DOUBLE >, vl::Array< fvec3, GLfloat, 3, GL_FLOAT >, vl::Array< hvec4, half, 4, GL_HALF_FLOAT >, vl::Array< ivec4, GLint, 4, GL_INT_2_10_10_10_REV >, vl::Array< ivec2, GLint, 2, GL_INT_2_10_10_10_REV >, vl::Array< GLushort, GLushort, 1, GL_UNSIGNED_SHORT >, vl::Array< uvec3, GLuint, 3, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< GLfloat, GLfloat, 1, GL_FLOAT >, vl::Array< GLint, GLint, 1, GL_INT_2_10_10_10_REV >, vl::Array< fvec4, GLfloat, 4, GL_FLOAT >, vl::Array< fvec2, GLfloat, 2, GL_FLOAT >, vl::Array< svec3, GLshort, 3, GL_SHORT >, vl::Array< bvec4, GLbyte, 4, GL_BYTE >, vl::Array< bvec3, GLbyte, 3, GL_BYTE >, and vl::Array< bvec2, GLbyte, 2, GL_BYTE >.

Referenced by vl::Array< bvec2, GLbyte, 2, GL_BYTE >::at(), bytesUsed(), vl::Array< bvec2, GLbyte, 2, GL_BYTE >::clone(), vl::Geometry::colorizePrimitives(), vl::Array< bvec2, GLbyte, 2, GL_BYTE >::computeBoundingBox(), vl::Array< bvec2, GLbyte, 2, GL_BYTE >::computeBoundingSphere(), vl::Geometry::computeBounds_Implementation(), vl::Geometry::computeNormals(), vl::Geometry::convertDrawCallToDrawArrays(), vl::VectorGraphics::drawLines(), vl::Array< bvec2, GLbyte, 2, GL_BYTE >::end(), vl::Extrusion::extrude(), vl::VectorGraphics::fillPolygon(), vl::Geometry::fixTriangleWinding(), vl::makeUVSphere(), vl::Geometry::mergeTriangleStrips(), vl::Array< bvec2, GLbyte, 2, GL_BYTE >::normalize(), vl::DepthSortCallback::onActorRenderStarted(), vl::VectorGraphics::popScissor(), vl::DoubleVertexRemover::removeDoubles(), vl::MarchingCubes::run(), vl::Array< bvec2, GLbyte, 2, GL_BYTE >::scalarCount(), vl::PolygonSimplifier::simplify(), vl::Geometry::sortVertices(), and vl::Array< bvec2, GLbyte, 2, GL_BYTE >::transform().

◆ transform()

virtual void vl::ArrayAbstract::transform ( const mat4 m)
pure virtual

Transforms the vectors contained in the buffer.

Implemented in vl::Array< T_VectorType, T_Scalar, T_GL_Size, T_GL_Type >, vl::Array< uvec4, GLuint, 4, GL_FIXED >, vl::Array< uvec2, GLuint, 2, GL_FIXED >, vl::Array< ubvec4, GLubyte, 4, GL_UNSIGNED_BYTE >, vl::Array< ubvec2, GLubyte, 2, GL_UNSIGNED_BYTE >, vl::Array< svec4, GLshort, 4, GL_SHORT >, vl::Array< svec2, GLshort, 2, GL_SHORT >, vl::Array< GLshort, GLshort, 1, GL_SHORT >, vl::Array< uvec4, GLuint, 4, GL_UNSIGNED_INT >, vl::Array< ivec3, GLint, 3, GL_INT_2_10_10_10_REV >, vl::Array< GLuint, GLuint, 1, GL_FIXED >, vl::Array< uvec2, GLuint, 2, GL_UNSIGNED_INT >, vl::Array< GLuint, GLuint, 1, GL_UNSIGNED_INT >, vl::Array< hvec3, half, 3, GL_HALF_FLOAT >, vl::Array< hvec2, half, 2, GL_HALF_FLOAT >, vl::Array< uvec3, GLuint, 3, GL_FIXED >, vl::Array< dvec4, GLdouble, 4, GL_DOUBLE >, vl::Array< ivec3, GLint, 3, GL_INT >, vl::Array< ivec2, GLint, 2, GL_INT >, vl::Array< GLbyte, GLbyte, 1, GL_BYTE >, vl::Array< uvec2, GLuint, 2, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< dvec3, GLdouble, 3, GL_DOUBLE >, vl::Array< GLdouble, GLdouble, 1, GL_DOUBLE >, vl::Array< uvec3, GLuint, 3, GL_UNSIGNED_INT >, vl::Array< GLint, GLint, 1, GL_INT >, vl::Array< ubvec3, GLubyte, 3, GL_UNSIGNED_BYTE >, vl::Array< ivec4, GLint, 4, GL_INT >, vl::Array< usvec4, GLushort, 4, GL_UNSIGNED_SHORT >, vl::Array< usvec2, GLushort, 2, GL_UNSIGNED_SHORT >, vl::Array< uvec4, GLuint, 4, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< GLubyte, GLubyte, 1, GL_UNSIGNED_BYTE >, vl::Array< usvec3, GLushort, 3, GL_UNSIGNED_SHORT >, vl::Array< half, half, 1, GL_HALF_FLOAT >, vl::Array< GLuint, GLuint, 1, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< dvec2, GLdouble, 2, GL_DOUBLE >, vl::Array< fvec3, GLfloat, 3, GL_FLOAT >, vl::Array< hvec4, half, 4, GL_HALF_FLOAT >, vl::Array< ivec4, GLint, 4, GL_INT_2_10_10_10_REV >, vl::Array< ivec2, GLint, 2, GL_INT_2_10_10_10_REV >, vl::Array< GLushort, GLushort, 1, GL_UNSIGNED_SHORT >, vl::Array< uvec3, GLuint, 3, GL_UNSIGNED_INT_2_10_10_10_REV >, vl::Array< GLfloat, GLfloat, 1, GL_FLOAT >, vl::Array< GLint, GLint, 1, GL_INT_2_10_10_10_REV >, vl::Array< fvec4, GLfloat, 4, GL_FLOAT >, vl::Array< fvec2, GLfloat, 2, GL_FLOAT >, vl::Array< svec3, GLshort, 3, GL_SHORT >, vl::Array< bvec4, GLbyte, 4, GL_BYTE >, vl::Array< bvec3, GLbyte, 3, GL_BYTE >, and vl::Array< bvec2, GLbyte, 2, GL_BYTE >.

Referenced by bytesUsed(), and vl::Geometry::transform().

◆ updateBufferObject()

void vl::ArrayAbstract::updateBufferObject ( EBufferObjectUpdateMode  mode = BUM_KeepRamBuffer)
inline

Updates the BufferObject.

Parameters
modeOnly the BUF_DiscardRamBuffer flag is checked as the BUF_ForceUpdate flag is considered always set for this function. By default mode is set to BUM_KeepRamBuffer.

Definition at line 162 of file Array.hpp.

References vl::BUF_DiscardRamBuffer, bufferObject(), vl::BufferObject::setBufferData(), setBufferObjectDirty(), and usage().

◆ usage()

EBufferObjectUsage vl::ArrayAbstract::usage ( ) const
inline

BU_STATIC_DRAW by default.

Definition at line 155 of file Array.hpp.

References mBufferObjectUsage.

Referenced by setUsage(), and updateBufferObject().

Member Data Documentation

◆ mBufferObject

ref<BufferObject> vl::ArrayAbstract::mBufferObject
protected

Definition at line 185 of file Array.hpp.

Referenced by ArrayAbstract(), and bufferObject().

◆ mBufferObjectDirty

bool vl::ArrayAbstract::mBufferObjectDirty
protected

Definition at line 187 of file Array.hpp.

Referenced by ArrayAbstract(), isBufferObjectDirty(), and setBufferObjectDirty().

◆ mBufferObjectUsage

EBufferObjectUsage vl::ArrayAbstract::mBufferObjectUsage
protected

Definition at line 186 of file Array.hpp.

Referenced by ArrayAbstract(), setUsage(), and usage().

◆ mInterpretation

EVertexAttribInterpretation vl::ArrayAbstract::mInterpretation
protected

Definition at line 188 of file Array.hpp.

Referenced by ArrayAbstract(), interpretation(), operator=(), and setInterpretation().

◆ mNormalize

bool vl::ArrayAbstract::mNormalize
protected

Definition at line 189 of file Array.hpp.

Referenced by ArrayAbstract(), normalize(), operator=(), and setNormalize().


The documentation for this class was generated from the following file: