|
OSG
3.4.0
|
#include <TriangleFunctor.h>


Public Member Functions | |
| TriangleFunctor () | |
| virtual | ~TriangleFunctor () |
| void | setTreatVertexDataAsTemporary (bool treatVertexDataAsTemporary) |
| bool | getTreatVertexDataAsTemporary () const |
| virtual void | setVertexArray (unsigned int, const Vec2 *) |
| virtual void | setVertexArray (unsigned int count, const Vec3 *vertices) |
| virtual void | setVertexArray (unsigned int, const Vec4 *) |
| virtual void | setVertexArray (unsigned int, const Vec2d *) |
| virtual void | setVertexArray (unsigned int, const Vec3d *) |
| virtual void | setVertexArray (unsigned int, const Vec4d *) |
| virtual void | drawArrays (GLenum mode, GLint first, GLsizei count) |
Mimics the OpenGL glDrawArrays() function. More... | |
| 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 void | begin (GLenum mode) |
| virtual void | vertex (const Vec2 &vert) |
Mimics the OpenGL glVertex() "family of functions". More... | |
| virtual void | vertex (const Vec3 &vert) |
Mimics the OpenGL glVertex() "family of functions". More... | |
| virtual void | vertex (const Vec4 &vert) |
Mimics the OpenGL glVertex() "family of functions". More... | |
| virtual void | vertex (float x, float y) |
Mimics the OpenGL glVertex() "family of functions". More... | |
| virtual void | vertex (float x, float y, float z) |
Mimics the OpenGL glVertex() "family of functions". More... | |
| virtual void | vertex (float x, float y, float z, float w) |
Mimics the OpenGL glVertex() "family of functions". More... | |
| virtual void | end () |
Mimics the OpenGL glEnd() function. More... | |
Public Member Functions inherited from osg::PrimitiveFunctor | |
| virtual | ~PrimitiveFunctor () |
| void | useVertexCacheAsVertexArray () |
Protected Attributes | |
| unsigned int | _vertexArraySize |
| const Vec3 * | _vertexArrayPtr |
| GLenum | _modeCache |
Additional Inherited Members | |
Public Attributes inherited from osg::PrimitiveFunctor | |
| std::vector< Vec3 > | _vertexCache |
| bool | _treatVertexDataAsTemporary |
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. Definition at line 38 of file TriangleFunctor.h.
|
inline |
Definition at line 42 of file TriangleFunctor.h.
|
inlinevirtual |
Definition at line 50 of file TriangleFunctor.h.
|
inlinevirtual |
Note: begin(..),vertex(..) & end() are convenience methods for adapting non vertex array primitives to vertex array based primitives. This is done to simplify the implementation of primitive functor subclasses - users only need override drawArray and drawElements.
Implements osg::PrimitiveFunctor.
Definition at line 361 of file TriangleFunctor.h.
|
inlinevirtual |
Mimics the OpenGL glDrawArrays() function.
Implements osg::PrimitiveFunctor.
Definition at line 86 of file TriangleFunctor.h.

|
inlinevirtual |
Mimics the OpenGL glDrawElements() function.
Implements osg::PrimitiveFunctor.
Definition at line 150 of file TriangleFunctor.h.
|
inlinevirtual |
Mimics the OpenGL glDrawElements() function.
Implements osg::PrimitiveFunctor.
Definition at line 217 of file TriangleFunctor.h.
|
inlinevirtual |
Mimics the OpenGL glDrawElements() function.
Implements osg::PrimitiveFunctor.
Definition at line 286 of file TriangleFunctor.h.
|
inlinevirtual |
Mimics the OpenGL glEnd() function.
Implements osg::PrimitiveFunctor.
Definition at line 373 of file TriangleFunctor.h.

|
inline |
Definition at line 53 of file TriangleFunctor.h.
|
inline |
Definition at line 52 of file TriangleFunctor.h.
|
inlinevirtual |
Sets the array of vertices used to describe the primitives. Somehow mimics the OpenGL glVertexPointer() function.
Implements osg::PrimitiveFunctor.
Definition at line 55 of file TriangleFunctor.h.


|
inlinevirtual |
Sets the array of vertices used to describe the primitives. Somehow mimics the OpenGL glVertexPointer() function.
Implements osg::PrimitiveFunctor.
Definition at line 60 of file TriangleFunctor.h.
|
inlinevirtual |
Sets the array of vertices used to describe the primitives. Somehow mimics the OpenGL glVertexPointer() function.
Implements osg::PrimitiveFunctor.
Definition at line 66 of file TriangleFunctor.h.

|
inlinevirtual |
Sets the array of vertices used to describe the primitives. Somehow mimics the OpenGL glVertexPointer() function.
Implements osg::PrimitiveFunctor.
Definition at line 71 of file TriangleFunctor.h.

|
inlinevirtual |
Sets the array of vertices used to describe the primitives. Somehow mimics the OpenGL glVertexPointer() function.
Implements osg::PrimitiveFunctor.
Definition at line 76 of file TriangleFunctor.h.

|
inlinevirtual |
Sets the array of vertices used to describe the primitives. Somehow mimics the OpenGL glVertexPointer() function.
Implements osg::PrimitiveFunctor.
Definition at line 81 of file TriangleFunctor.h.

|
inlinevirtual |
Mimics the OpenGL glVertex() "family of functions".
Implements osg::PrimitiveFunctor.
Definition at line 367 of file TriangleFunctor.h.
|
inlinevirtual |
Mimics the OpenGL glVertex() "family of functions".
Implements osg::PrimitiveFunctor.
Definition at line 368 of file TriangleFunctor.h.
|
inlinevirtual |
Mimics the OpenGL glVertex() "family of functions".
Implements osg::PrimitiveFunctor.
Definition at line 369 of file TriangleFunctor.h.
|
inlinevirtual |
Mimics the OpenGL glVertex() "family of functions".
Implements osg::PrimitiveFunctor.
Definition at line 370 of file TriangleFunctor.h.
|
inlinevirtual |
Mimics the OpenGL glVertex() "family of functions".
Implements osg::PrimitiveFunctor.
Definition at line 371 of file TriangleFunctor.h.
|
inlinevirtual |
Mimics the OpenGL glVertex() "family of functions".
Implements osg::PrimitiveFunctor.
Definition at line 372 of file TriangleFunctor.h.
|
protected |
Definition at line 389 of file TriangleFunctor.h.
|
protected |
Definition at line 387 of file TriangleFunctor.h.
|
protected |
Definition at line 386 of file TriangleFunctor.h.
1.8.8