OpenSceneGraph 3.6.5
|
Provides access to the triangles that compose an osg::Drawable
.
More...
#include <TriangleFunctor>
Public Member Functions | |
TriangleFunctor () | |
virtual | ~TriangleFunctor () |
virtual void | setVertexArray (unsigned int, const Vec2 *) |
Sets the array of vertices used to describe the primitives. | |
virtual void | setVertexArray (unsigned int count, const Vec3 *vertices) |
Sets the array of vertices used to describe the primitives. | |
virtual void | setVertexArray (unsigned int, const Vec4 *) |
Sets the array of vertices used to describe the primitives. | |
virtual void | setVertexArray (unsigned int, const Vec2d *) |
Sets the array of vertices used to describe the primitives. | |
virtual void | setVertexArray (unsigned int, const Vec3d *) |
Sets the array of vertices used to describe the primitives. | |
virtual void | setVertexArray (unsigned int, const Vec4d *) |
Sets the array of vertices used to describe the primitives. | |
virtual void | drawArrays (GLenum mode, GLint first, GLsizei count) |
Mimics the OpenGL glDrawArrays() function. | |
virtual void | drawElements (GLenum mode, GLsizei count, const GLubyte *indices) |
Mimics the OpenGL glDrawElements() function. | |
virtual void | drawElements (GLenum mode, GLsizei count, const GLushort *indices) |
Mimics the OpenGL glDrawElements() function. | |
virtual void | drawElements (GLenum mode, GLsizei count, const GLuint *indices) |
Mimics the OpenGL glDrawElements() function. | |
![]() | |
virtual | ~PrimitiveFunctor () |
virtual void | setVertexArray (unsigned int count, const Vec2 *vertices)=0 |
Sets the array of vertices used to describe the primitives. | |
virtual void | setVertexArray (unsigned int count, const Vec3 *vertices)=0 |
Sets the array of vertices used to describe the primitives. | |
virtual void | setVertexArray (unsigned int count, const Vec4 *vertices)=0 |
Sets the array of vertices used to describe the primitives. | |
virtual void | setVertexArray (unsigned int count, const Vec2d *vertices)=0 |
Sets the array of vertices used to describe the primitives. | |
virtual void | setVertexArray (unsigned int count, const Vec3d *vertices)=0 |
Sets the array of vertices used to describe the primitives. | |
virtual void | setVertexArray (unsigned int count, const Vec4d *vertices)=0 |
Sets the array of vertices used to describe the primitives. | |
virtual void | drawArrays (GLenum mode, GLint first, GLsizei count)=0 |
Mimics the OpenGL glDrawArrays() function. | |
virtual void | drawElements (GLenum mode, GLsizei count, const GLubyte *indices)=0 |
Mimics the OpenGL glDrawElements() function. | |
virtual void | drawElements (GLenum mode, GLsizei count, const GLushort *indices)=0 |
Mimics the OpenGL glDrawElements() function. | |
virtual void | drawElements (GLenum mode, GLsizei count, const GLuint *indices)=0 |
Mimics the OpenGL glDrawElements() function. | |
Protected Attributes | |
unsigned int | _vertexArraySize |
const Vec3 * | _vertexArrayPtr |
Provides access to the triangles that compose an osg::Drawable
.
If the Drawable
is not composed of triangles, the TriangleFunctor
will convert the primitives to triangles whenever possible.
Notice that TriangleFunctor
is a class template, and that it inherits from its template parameter T
. This template parameter must implement T::operator() (const osg::Vec3 v1, const osg::Vec3 v2, const osg::Vec3 v3, bool treatVertexDataAsTemporary)
, which will be called for every triangle when the functor is applied to a Drawable
. Parameters v1
, v2
, and v3
are the triangle vertices. The fourth parameter, treatVertexDataAsTemporary
, indicates whether these vertices are coming from a "real" vertex array, or from a temporary vertex array, created by the TriangleFunctor
from some other geometry representation.
PrimitiveFunctor
for general usage hints.
|
inline |
|
inlinevirtual |
|
inlinevirtual |
Mimics the OpenGL glDrawArrays()
function.
Implements osg::PrimitiveFunctor.
|
inlinevirtual |
Mimics the OpenGL glDrawElements()
function.
Implements osg::PrimitiveFunctor.
|
inlinevirtual |
Mimics the OpenGL glDrawElements()
function.
Implements osg::PrimitiveFunctor.
|
inlinevirtual |
Mimics the OpenGL glDrawElements()
function.
Implements osg::PrimitiveFunctor.
|
inlinevirtual |
Sets the array of vertices used to describe the primitives.
Somehow mimics the OpenGL glVertexPointer()
function.
Implements osg::PrimitiveFunctor.
|
inlinevirtual |
Sets the array of vertices used to describe the primitives.
Somehow mimics the OpenGL glVertexPointer()
function.
Implements osg::PrimitiveFunctor.
|
inlinevirtual |
Sets the array of vertices used to describe the primitives.
Somehow mimics the OpenGL glVertexPointer()
function.
Implements osg::PrimitiveFunctor.
|
inlinevirtual |
Sets the array of vertices used to describe the primitives.
Somehow mimics the OpenGL glVertexPointer()
function.
Implements osg::PrimitiveFunctor.
|
inlinevirtual |
Sets the array of vertices used to describe the primitives.
Somehow mimics the OpenGL glVertexPointer()
function.
Implements osg::PrimitiveFunctor.
|
inlinevirtual |
Sets the array of vertices used to describe the primitives.
Somehow mimics the OpenGL glVertexPointer()
function.
Implements osg::PrimitiveFunctor.
|
protected |
|
protected |
![]() | Generated at Thu May 11 2023 00:00:00 for the OpenSceneGraph by doxygen 1.9.7. |