![]() |
OpenSceneGraph
|
Provides access to the primitives that compose an osg::Drawable
.
More...
Public Member Functions | |
TemplatePrimitiveFunctor () | |
virtual | ~TemplatePrimitiveFunctor () |
virtual void | setVertexArray (unsigned int, const Vec2 *) |
Sets the array of vertices used to describe the primitives. More... | |
virtual void | setVertexArray (unsigned int count, const Vec3 *vertices) |
Sets the array of vertices used to describe the primitives. More... | |
virtual void | setVertexArray (unsigned int, const Vec4 *) |
Sets the array of vertices used to describe the primitives. More... | |
virtual void | setVertexArray (unsigned int, const Vec2d *) |
Sets the array of vertices used to describe the primitives. More... | |
virtual void | setVertexArray (unsigned int, const Vec3d *) |
Sets the array of vertices used to describe the primitives. More... | |
virtual void | setVertexArray (unsigned int, const Vec4d *) |
Sets the array of vertices used to describe the primitives. More... | |
virtual void | drawArrays (GLenum mode, GLint first, GLsizei count) |
Mimics the OpenGL glDrawArrays() function. More... | |
template<class IndexType > | |
void | drawElementsTemplate (GLenum mode, GLsizei count, const IndexType *indices) |
virtual void | drawElements (GLenum mode, GLsizei count, const GLubyte *indices) |
Mimics the OpenGL glDrawElements() function. More... | |
virtual void | drawElements (GLenum mode, GLsizei count, const GLushort *indices) |
Mimics the OpenGL glDrawElements() function. More... | |
virtual void | drawElements (GLenum mode, GLsizei count, const GLuint *indices) |
Mimics the OpenGL glDrawElements() function. More... | |
![]() | |
virtual | ~PrimitiveFunctor () |
Protected Attributes | |
unsigned int | _vertexArraySize |
const Vec3 * | _vertexArrayPtr |
Provides access to the primitives that compose an osg::Drawable
.
Notice that TemplatePrimitiveFunctor
is a class template, and that it inherits from its template parameter T
. This template parameter must implement operator()(const osg::Vec3 v1, const osg::Vec3 v2, const osg::Vec3 v3, bool treatVertexDataAsTemporary)
, operator()(const osg::Vec3 v1, const osg::Vec3 v2, bool treatVertexDataAsTemporary)
, operator()(const osg::Vec3 v1, const osg::Vec3 v2, const osg::Vec3 v3, bool treatVertexDataAsTemporary)
, and operator()(const osg::Vec3 v1, const osg::Vec3 v2, const osg::Vec3 v3, const osg::Vec3 v4, bool treatVertexDataAsTemporary)
which will be called for the matching primitive when the functor is applied to a Drawable
. Parameters v1
, v2
, v3
, and v4
are the vertices of the primitive. The last parameter, treatVertexDataAsTemporary
, indicates whether these vertices are coming from a "real" vertex array, or from a temporary vertex array, created by the TemplatePrimitiveFunctor
from some other geometry representation.
PrimitiveFunctor
for general usage hints.
|
inline |
|
inlinevirtual |
|
inlinevirtual |
Mimics the OpenGL glDrawArrays()
function.
Implements osg::PrimitiveFunctor.
References osg::TemplatePrimitiveFunctor< T >::_vertexArrayPtr, and GL_LINE_STRIP_ADJACENCY.
|
inlinevirtual |
Mimics the OpenGL glDrawElements()
function.
Implements osg::PrimitiveFunctor.
References osg::TemplatePrimitiveFunctor< T >::drawElementsTemplate().
|
inlinevirtual |
Mimics the OpenGL glDrawElements()
function.
Implements osg::PrimitiveFunctor.
References osg::TemplatePrimitiveFunctor< T >::drawElementsTemplate().
|
inlinevirtual |
Mimics the OpenGL glDrawElements()
function.
Implements osg::PrimitiveFunctor.
References osg::TemplatePrimitiveFunctor< T >::drawElementsTemplate().
|
inline |
References osg::TemplatePrimitiveFunctor< T >::_vertexArrayPtr, and GL_LINE_STRIP_ADJACENCY.
Referenced by osg::TemplatePrimitiveFunctor< T >::drawElements().
|
inlinevirtual |
Sets the array of vertices used to describe the primitives.
Somehow mimics the OpenGL glVertexPointer()
function.
Implements osg::PrimitiveFunctor.
References osg::notify(), and osg::WARN.
|
inlinevirtual |
Sets the array of vertices used to describe the primitives.
Somehow mimics the OpenGL glVertexPointer()
function.
Implements osg::PrimitiveFunctor.
References osg::TemplatePrimitiveFunctor< T >::_vertexArrayPtr, and osg::TemplatePrimitiveFunctor< T >::_vertexArraySize.
|
inlinevirtual |
Sets the array of vertices used to describe the primitives.
Somehow mimics the OpenGL glVertexPointer()
function.
Implements osg::PrimitiveFunctor.
References osg::notify(), and osg::WARN.
|
inlinevirtual |
Sets the array of vertices used to describe the primitives.
Somehow mimics the OpenGL glVertexPointer()
function.
Implements osg::PrimitiveFunctor.
References osg::notify(), and osg::WARN.
|
inlinevirtual |
Sets the array of vertices used to describe the primitives.
Somehow mimics the OpenGL glVertexPointer()
function.
Implements osg::PrimitiveFunctor.
References osg::notify(), and osg::WARN.
|
inlinevirtual |
Sets the array of vertices used to describe the primitives.
Somehow mimics the OpenGL glVertexPointer()
function.
Implements osg::PrimitiveFunctor.
References osg::notify(), and osg::WARN.
|
protected |
|
protected |