Visualization Library

A lightweight C++ OpenGL middleware for 2D/3D graphics
[Home] [Tutorials] [All Classes] [Grouped Classes]

vl::Array< vector_type, scalar_type, gl_size, gl_type > Class Template Reference

The Array class is a template array used to conveniently manipulate data stored in a GLBufferObject. More...

#include <Array.hpp>

Inheritance diagram for vl::Array< vector_type, scalar_type, gl_size, gl_type >:

vl::ArrayAbstract vl::Object

List of all members.

Public Member Functions

virtual const char * className ()
 Returns the name of the class.
virtual int glSize () const
 Returns the number of scalar components for the array, ie 3 for ArrayFVec3, 1 for ArrayUInt etc.
virtual int glType () const
 Returns the OpenGL type for the array, ie GL_FLOAT for ArrayFVec3, GL_UNSIGNED_INT for ArrayUInt etc.
virtual ref< ArrayAbstractclone () const
void clear ()
void resize (int dim)
int size () const
 Returns the number of elements of an array.
int sizeGPU () const
int scalarCount () const
int scalarCountGPU () const
const vector_type * begin () const
vector_type * begin ()
const vector_type * end () const
vector_type * end ()
vector_type & at (int i)
const vector_type & at (int i) const
vector_type & operator[] (int i)
const vector_type & operator[] (int i) const
virtual int bytesPerVector () const
Sphere computeBoundingSphere () const
 Computes the bounding sphere enclosing the vectors contained in the buffer.
AABB computeBoundingBox () const
 Computes the axis aligned bounding box enclosing the vectors contained in the buffer.
void transform (const mat4 &m)
 Transforms the vectors contained in the buffer.
void normalize ()
 Normalizes the vectors contained in the buffer.
vec4 vectorAsVec4 (int vector_index) const
 Returns a vector from the buffer as a vec4 value.
int compare (int a, int b) const
 Compares two vectors.
void operator= (const std::vector< vector_type > &vector)


Detailed Description

template<typename vector_type, typename scalar_type, int gl_size, GLenum gl_type>
class vl::Array< vector_type, scalar_type, gl_size, gl_type >

The Array class is a template array used to conveniently manipulate data stored in a GLBufferObject.

See also:

Member Function Documentation

template<typename vector_type , typename scalar_type , int gl_size, GLenum gl_type>
virtual const char* vl::Array< vector_type, scalar_type, gl_size, gl_type >::className (  )  [inline, virtual]

Returns the name of the class.

Reimplemented from vl::ArrayAbstract.

template<typename vector_type , typename scalar_type , int gl_size, GLenum gl_type>
virtual int vl::Array< vector_type, scalar_type, gl_size, gl_type >::glSize (  )  const [inline, virtual]

Returns the number of scalar components for the array, ie 3 for ArrayFVec3, 1 for ArrayUInt etc.

Implements vl::ArrayAbstract.

template<typename vector_type , typename scalar_type , int gl_size, GLenum gl_type>
virtual int vl::Array< vector_type, scalar_type, gl_size, gl_type >::glType (  )  const [inline, virtual]

Returns the OpenGL type for the array, ie GL_FLOAT for ArrayFVec3, GL_UNSIGNED_INT for ArrayUInt etc.

Implements vl::ArrayAbstract.

template<typename vector_type , typename scalar_type , int gl_size, GLenum gl_type>
virtual ref<ArrayAbstract> vl::Array< vector_type, scalar_type, gl_size, gl_type >::clone (  )  const [inline, virtual]

Implements vl::ArrayAbstract.

template<typename vector_type , typename scalar_type , int gl_size, GLenum gl_type>
void vl::Array< vector_type, scalar_type, gl_size, gl_type >::clear (  )  [inline]

Reimplemented from vl::ArrayAbstract.

template<typename vector_type , typename scalar_type , int gl_size, GLenum gl_type>
void vl::Array< vector_type, scalar_type, gl_size, gl_type >::resize ( int  dim  )  [inline]

template<typename vector_type , typename scalar_type , int gl_size, GLenum gl_type>
int vl::Array< vector_type, scalar_type, gl_size, gl_type >::size (  )  const [inline, virtual]

Returns the number of elements of an array.

Implements vl::ArrayAbstract.

template<typename vector_type , typename scalar_type , int gl_size, GLenum gl_type>
int vl::Array< vector_type, scalar_type, gl_size, gl_type >::sizeGPU (  )  const [inline]

template<typename vector_type , typename scalar_type , int gl_size, GLenum gl_type>
int vl::Array< vector_type, scalar_type, gl_size, gl_type >::scalarCount (  )  const [inline]

template<typename vector_type , typename scalar_type , int gl_size, GLenum gl_type>
int vl::Array< vector_type, scalar_type, gl_size, gl_type >::scalarCountGPU (  )  const [inline]

template<typename vector_type , typename scalar_type , int gl_size, GLenum gl_type>
const vector_type* vl::Array< vector_type, scalar_type, gl_size, gl_type >::begin (  )  const [inline]

template<typename vector_type , typename scalar_type , int gl_size, GLenum gl_type>
vector_type* vl::Array< vector_type, scalar_type, gl_size, gl_type >::begin (  )  [inline]

template<typename vector_type , typename scalar_type , int gl_size, GLenum gl_type>
const vector_type* vl::Array< vector_type, scalar_type, gl_size, gl_type >::end (  )  const [inline]

template<typename vector_type , typename scalar_type , int gl_size, GLenum gl_type>
vector_type* vl::Array< vector_type, scalar_type, gl_size, gl_type >::end (  )  [inline]

template<typename vector_type , typename scalar_type , int gl_size, GLenum gl_type>
vector_type& vl::Array< vector_type, scalar_type, gl_size, gl_type >::at ( int  i  )  [inline]

template<typename vector_type , typename scalar_type , int gl_size, GLenum gl_type>
const vector_type& vl::Array< vector_type, scalar_type, gl_size, gl_type >::at ( int  i  )  const [inline]

template<typename vector_type , typename scalar_type , int gl_size, GLenum gl_type>
vector_type& vl::Array< vector_type, scalar_type, gl_size, gl_type >::operator[] ( int  i  )  [inline]

template<typename vector_type , typename scalar_type , int gl_size, GLenum gl_type>
const vector_type& vl::Array< vector_type, scalar_type, gl_size, gl_type >::operator[] ( int  i  )  const [inline]

template<typename vector_type , typename scalar_type , int gl_size, GLenum gl_type>
virtual int vl::Array< vector_type, scalar_type, gl_size, gl_type >::bytesPerVector (  )  const [inline, virtual]

template<typename vector_type , typename scalar_type , int gl_size, GLenum gl_type>
Sphere vl::Array< vector_type, scalar_type, gl_size, gl_type >::computeBoundingSphere (  )  const [inline, virtual]

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

Implements vl::ArrayAbstract.

template<typename vector_type , typename scalar_type , int gl_size, GLenum gl_type>
AABB vl::Array< vector_type, scalar_type, gl_size, gl_type >::computeBoundingBox (  )  const [inline, virtual]

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

Implements vl::ArrayAbstract.

template<typename vector_type , typename scalar_type , int gl_size, GLenum gl_type>
void vl::Array< vector_type, scalar_type, gl_size, gl_type >::transform ( const mat4 m  )  [inline, virtual]

Transforms the vectors contained in the buffer.

Implements vl::ArrayAbstract.

template<typename vector_type , typename scalar_type , int gl_size, GLenum gl_type>
void vl::Array< vector_type, scalar_type, gl_size, gl_type >::normalize (  )  [inline, virtual]

Normalizes the vectors contained in the buffer.

Implements vl::ArrayAbstract.

template<typename vector_type , typename scalar_type , int gl_size, GLenum gl_type>
vec4 vl::Array< vector_type, scalar_type, gl_size, gl_type >::vectorAsVec4 ( int  vector_index  )  const [inline, virtual]

Returns a vector from the buffer as a vec4 value.

Implements vl::ArrayAbstract.

template<typename vector_type , typename scalar_type , int gl_size, GLenum gl_type>
int vl::Array< vector_type, scalar_type, gl_size, gl_type >::compare ( int  a,
int  b 
) const [inline, virtual]

Compares two vectors.

Implements vl::ArrayAbstract.

template<typename vector_type , typename scalar_type , int gl_size, GLenum gl_type>
void vl::Array< vector_type, scalar_type, gl_size, gl_type >::operator= ( const std::vector< vector_type > &  vector  )  [inline]


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

Visualization Library v2009.08 Reference Documentation
Copyright 2005-2009 Michele Bosi. All rights reserved.
Updated on Fri Aug 28 10:14:09 2009.
Permission is granted to use this page to write and publish articles regarding Visualization Library.