57 #ifndef _SO_VERTEX_PROPERTY
58 #define _SO_VERTEX_PROPERTY
276 {
return (generateNormals && sse->
needNormals()); }
285 {
return (needFromState & TEXTURE_FUNCTION_BIT) != 0; }
288 { (*vertexFunc)(vp); }
290 { (*normalFunc)(np); }
292 { (*colorFunc)(cp); }
294 { (*texCoordFunc)(tcp); }
302 {
return vertexPtr + vertexStride*i; }
304 {
return normalPtr + normalStride*i; }
306 {
return colorPtr + colorStride*i; }
308 {
return texCoordPtr + texCoordStride*i; }
388 TEXTURE_FUNCTION_BIT = 0x80,
389 OVERRIDE_FROM_STATE_BIT = 0x40,
390 COORD_FROM_STATE_BIT = 0x20,
391 COLOR_FROM_STATE_BITS = COLOR_BITS,
392 NORMAL_FROM_STATE_BITS = NORMAL_BITS,
393 TEXCOORD_FROM_STATE_BIT = TEXCOORD_BIT,
394 ALL_FROM_STATE_BITS = 0xFF
403 unsigned char normalBinding;
404 unsigned char materialBinding;
405 unsigned char texCoordBinding;
406 unsigned char renderCase;
407 unsigned char colorIsInVP;
408 unsigned char transpIsInVP;
#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_HEADER(className)
Non-abstract classes have everything abstract classes have, plus a way to create an instance.
void SoVPCacheFunc(const char *)
Description: The SoVertexPropertyCache class is a convenient way for vertex-based shapes to store inf...
Abstract base class for all actions.
Performs a generic traversal of the scene graph.
Renders a scene graph using OpenGL.
Computes bounding box of a scene.
Multiple-value field containing any number of uint32_tegers.
Multiple-value field containing any number of two-dimensional vectors.
Multiple-value field containing any number of three-dimensional vectors.
Binding
The (seemingly random) choice of values is for compatibility with Inventor 2.0 binary format files:
@ PER_VERTEX_INDEXED
One material for each vertex, indexed.
@ OVERALL
Whole object has same material.
@ PER_PART_INDEXED
One material for each part, indexed.
@ PER_VERTEX
One material for each vertex.
@ PER_FACE_INDEXED
One material for each face, indexed.
@ PER_FACE
One material for each face of object.
@ PER_PART
One material for each part of object.
Abstract base class for all database nodes.
Binding
The (seemingly random) choice of values is for compatibility with Inventor 2.0 binary format files:
Abstract base class for picking objects in a scene.
Field containing an enumerated value.
This elements stores some information shapes need to quickly determine whether or not they should ren...
bool needTexCoords() const
Returns TRUE if need texture coordinates:
bool needNormals() const
Returns TRUE if need normals:
int getRenderCaseMask() const
Returns a mask that can be used by the SoVertexPropertyCache class (see SoVertexProperty....
An SoState collects and holds state while traversing a scene graph.
Binding
The (seemingly random) choice of values is for compatibility with Inventor 2.0 binary format files:
SoVBO is used to manage OpenGL vertex buffer objects.
const char * getNormals(int i) const
SoTextureCoordinateBindingElement::Binding getTexCoordBinding()
bool shouldGenerateNormals(const SoShapeStyleElement *sse) const
SoVPCacheFunc * texCoordFunc
void fillInColorAndTranspAvail(const SoVertexProperty *, SoState *state)
SoVPCacheFunc * vertexFunc
Tables of functions, data, and strides to increment through data.
int getNumNormals() const
void sendTexCoord(const char *tcp) const
void sendVertex(const char *vp) const
bool mightNeedSomethingFromState(const SoShapeStyleElement *sse) const
API used by shapes:
int getNormalStride() const
unsigned char needFromState
int getRenderCase(const SoShapeStyleElement *sse) const
int getNumVertices() const
SoVertexPropertyCache()
Constructor. Initializes everything.
SoVPCacheFunc * normalFunc
bool transpIsInVtxProp() const
Indicates if non-opaque transparency is in vertex property.
int getNumTexCoords() const
int getTexCoordStride() const
void fillInCache(const SoVertexProperty *, SoState *)
bool colorIsInVtxProp() const
const char * getVertices(int i) const
SoMaterialBindingElement::Binding getMaterialBinding()
int getColorStride() const
const char * getTexCoords(int i) const
void sendColor(const char *cp) const
void sendNormal(const char *np) const
SoNormalBindingElement::Binding getNormalBinding()
SoVPCacheFunc * colorFunc
bool shouldGenerateTexCoords(const SoShapeStyleElement *sse) const
const char * getColors(int i) const
int getVertexStride() const
void putVBOsIntoState(SoState *state)
puts the VBOs into the SoGLVBOElement (MeVis ONLY)
virtual void doAction(SoAction *action)
This method performs the "typical" operation of a node for any action.
SoSFEnum materialBinding
Ignored unless orderedRGBA field set.
SoMFVec3f normal
Normal vector(s)
virtual ~SoVertexProperty()
SoSFEnum normalBinding
Ignored unless normal field set.
SoVertexProperty()
When traversed in a scene graph, sets coordinates, normals, texture coordinates, diffuse colors,...
virtual void pick(SoPickAction *action)
SoMFUInt32 orderedRGBA
Diffuse+transparency.
virtual void GLRender(SoGLRenderAction *action)
These virtual functions implement all of the actions for nodes, Most of the default implementations d...
virtual void getBoundingBox(SoGetBoundingBoxAction *action)
virtual void callback(SoCallbackAction *action)
SoMFVec2f texCoord
Texture coordinate(s)