76#if (defined(__glu_h__) || defined(GLU_H)) && defined(GLU_VERSION_1_2)
77#define gluTESSELATOR GLUtesselator
79#define gluTESSELATOR GLUtriangulatorObj
80extern "C" struct GLUtriangulatorObj;
302 static bool sendTexCoords;
308 static int nestLevel;
310 static int primVertNum;
311 static int polyVertNum;
320 static int numPolyVertsAllocated;
321 static GLUtriangulatorObj *tobj;
356 void allocateVerts();
359 static void CALLBACK beginCB(GLenum primType);
360 static void CALLBACK vtxCB(
void *vertex);
361 static void CALLBACK endCB();
362 static void CALLBACK errorCB(GLenum err);
#define SoEXTENDER
Provide inline template functions for abs, swap, min, max, and clamp.
#define INVENTOR_API
Disable some annoying warnings on MSVC 6.
#define SO_NODE_ABSTRACT_HEADER(className)
Macros to be called within the class definition header for a node subclass:
Abstract base class for all actions.
Performs a generic traversal of the scene graph.
Base class for describing detail information about a shape node.
Stores detail information about vertex-based shapes made of faces.
Renders a scene graph using OpenGL.
Computes bounding box of a scene.
Bundle that allows shapes to deal with materials more easily.
Abstract base class for all database nodes.
Represents point on surface of picked object.
Stores detail information about vertex-based shapes made of points.
Represents a vertex of a generated primitive.
Intersects objects with a ray cast into scene.
Abstract base class for all shape nodes.
void computeObjectSpaceRay(SoRayPickAction *action, const SbMatrix &matrix)
virtual void callback(SoCallbackAction *action)
Implements primitive generation for all shapes.
void endSolidShape(SoGLRenderAction *action)
static void setPostVertexArrayRenderingCallback(VertexArrayRenderingCB *cb)
register global post callback for vertex array rendering (MeVis ONLY)
static void setPreVertexArrayRenderingCallback(VertexArrayRenderingCB *cb)
register global pre callback for vertex array rendering (MeVis ONLY)
void computeObjectSpaceRay(SoRayPickAction *action)
Computes a picking ray in the object space of the shape instance.
void beginShape(SoAction *action, TriangleShape shapeType, SoFaceDetail *faceDetail=NULL)
These methods can be used by subclasses to generate triangles more easily when those triangles are pa...
void beginSolidShape(SoGLRenderAction *action)
These can be used by solid shapes to indicate so during rendering.
virtual void GLRender(SoGLRenderAction *action)
Implements rendering by rendering each primitive generated by subclass.
virtual bool affectsState() const
Overrides default method on SoNode.
virtual bool shouldGLRender(SoGLRenderAction *action)
Returns TRUE if the shape should be rendered.
virtual SoDetail * createPointDetail(SoRayPickAction *action, const SoPrimitiveVertex *v, SoPickedPoint *pp)
virtual SoDetail * createLineSegmentDetail(SoRayPickAction *action, const SoPrimitiveVertex *v1, const SoPrimitiveVertex *v2, SoPickedPoint *pp)
static VertexArrayRenderingCB * _preVertexArrayRenderingCB
virtual SoDetail * createTriangleDetail(SoRayPickAction *action, const SoPrimitiveVertex *v1, const SoPrimitiveVertex *v2, const SoPrimitiveVertex *v3, SoPickedPoint *pp)
These methods are called during picking to create details representing extra info about a pick inters...
virtual void generatePrimitives(SoAction *action)=0
This method MUST be defined by each subclass to generate primitives (triangles, line segments,...
virtual void getBoundingBox(SoGetBoundingBoxAction *action)
Implements bounding box method using virtual computeBBox() method.
TriangleShape
This type is used by the triangle shape generation methods (beginShape, etc.)
void GLRenderBoundingBox(SoGLRenderAction *action)
Applies GLRender action to the bounding box surrounding the shape.
void invokeLineSegmentCallbacks(SoAction *action, const SoPrimitiveVertex *v1, const SoPrimitiveVertex *v2)
void shapeVertex(const SoPrimitiveVertex *v)
virtual void computeBBox(SoAction *action, SbBox3f &box, SbVec3f ¢er)=0
Computes bounding box for subclass using information in the given action (which may not necessarily b...
static VertexArrayRenderingCB * _postVertexArrayRenderingCB
void invokePointCallbacks(SoAction *action, const SoPrimitiveVertex *v)
bool shouldRayPick(SoRayPickAction *action)
Returns TRUE if the shape may be picked.
static void getScreenSize(SoState *state, const SbBox3f &boundingBox, SbVec2s &rectSize)
This can be used by subclasses when the complexity type is SCREEN_SPACE to determine how many window ...
void VertexArrayRenderingCB(SoNode *shape, SoGLRenderAction *, bool useVbo, uint32_t numVertices)
callback used for pre/post vertex array rendering on SoVertexShapes (MeVis ONLY)
void invokeTriangleCallbacks(SoAction *action, const SoPrimitiveVertex *v1, const SoPrimitiveVertex *v2, const SoPrimitiveVertex *v3)
These methods invoke whatever callbacks are registered with the primitive generation procedures.
virtual void rayPick(SoRayPickAction *action)
Implements picking along a ray by intersecting the ray with each primitive generated by subclass.
An SoState collects and holds state while traversing a scene graph.
SoVBO is used to manage OpenGL vertex buffer objects.
Helper struct used by primitive types like cube, sphere, ...
void drawArrays(SoShape *shape, SoGLRenderAction *action, GLenum primitiveType)
void enableVertexAttributes(SoState *state)
void disableVertexAttributes(SoState *state)