#include <Inventor/nodes/SoVertexShape.h>
Inheritance diagram for SoVertexShape:
Basically, every polygon, line or point based shape will inherit this class. It contains methods for organizing the normal cache, and also holds the vertexProperty field which can be used to set vertex data inside the node.
Public Member Functions | |
virtual void | notify (SoNotList *nl) |
virtual SbBool | generateDefaultNormals (SoState *state, SoNormalBundle *bundle) |
virtual SbBool | generateDefaultNormals (SoState *state, SoNormalCache *cache) |
virtual void | write (SoWriteAction *action) |
Static Public Member Functions | |
void | initClass (void) |
Public Attributes | |
SoSFNode | vertexProperty |
Protected Member Functions | |
SoVertexShape (void) | |
virtual | ~SoVertexShape () |
virtual SbBool | shouldGLRender (SoGLRenderAction *action) |
void | setNormalCache (SoState *const state, const int num, const SbVec3f *normals) |
SoNormalCache * | getNormalCache (void) const |
SoNormalCache * | generateAndReadLockNormalCache (SoState *const state) |
void | getVertexData (SoState *state, const SoCoordinateElement *&coords, const SbVec3f *&normals, const SbBool neednormals) |
void | readLockNormalCache (void) |
void | readUnlockNormalCache (void) |
|
Constructor. |
|
Destructor. |
|
Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system. Reimplemented from SoShape. Reimplemented in SoFaceSet, SoIndexedFaceSet, SoIndexedLineSet, SoIndexedShape, SoIndexedTriangleStripSet, SoLineSet, SoMarkerSet, SoNonIndexedShape, SoPointSet, SoQuadMesh, and SoTriangleStripSet. |
|
Notifies all auditors for this instance when changes are made. Reimplemented from SoShape. |
|
This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.
Subclasses should override this method to generate default normals using the SoNormalBundle class.
Default method returns This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API. Reimplemented in SoFaceSet, SoIndexedFaceSet, SoIndexedTriangleStripSet, SoPointSet, SoQuadMesh, and SoTriangleStripSet. |
|
This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.
Subclasses should override this method to generate default normals using the SoNormalCache class. This is more effective than using SoNormalGenerator. Return
Default method just returns This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API. Reimplemented in SoFaceSet, SoIndexedFaceSet, SoIndexedTriangleStripSet, SoPointSet, SoQuadMesh, and SoTriangleStripSet. |
|
Action method for SoWriteAction. Writes out a node object, and any connected nodes, engines etc, if necessary. Reimplemented from SoNode. |
|
This API member is considered internal to the library, as it is not likely to be of interest to the application programmer. Reimplemented from SoShape. |
|
Sets normal cache to contain the normals specified by normals and num, and forces cache dependencies on coordinates, shape hints and crease angle. |
|
Returns the current normal cache, or NULL if there is none. |
|
Convenience method that can be used by subclasses to return or create a normal cache. If the current cache is not valid, it takes care of unrefing the old cache and pushing and popping the state to create element dependencies when creating the new cache. When returning from this method, the normal cache will be read locked, and the caller should call readUnlockNormalCache() when the normals in the cache is no longer needed. This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API.
|
|
Convenience method that returns the current coordinate and normal element. This method is not part of the OIV API. |
|
Read lock the normal cache. This method should be called before fetching the normal cache (using getNormalCache()). When the cached normals are no longer needed, readUnlockNormalCache() must be called. It is also possible to use generateAndReadLockNormalCache(). This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API.
|
|
Read unlock the normal cache. Should be called when the read-locked cached normals are no longer needed.
|
|
If you set the vertexProperty field, it should be with an SoVertexProperty node. Otherwise it will simply be ignored. Nodetypes inheriting SoVertexShape will then get their coordinate data from the vertexProperty node instead of from the global traversal state. The vertexProperty field of SoVertexShape-derived nodes breaks somewhat with the basic design of Open Inventor, as its contents are not passed to the global state. This is done to provide a simple path to highly optimized rendering of vertexbased shapes.
|