.TH "SoVertexShape" 3 "Sat Oct 12 2013" "Version 4.0.0a" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoVertexShape \- .PP The \fBSoVertexShape\fP class is the superclass for all vertex based shapes\&. .PP Basically, every polygon-, line- or point-based shape will inherit this class\&. It contains methods for organizing the normal cache, and also holds the \fBSoVertexShape::vertexProperty\fP field which can be used to set vertex data inside the node\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBSoShape\fP\&. .PP Inherited by \fBSoIndexedShape\fP, and \fBSoNonIndexedShape\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "virtual \fBSoType\fP \fBgetTypeId\fP (void) const " .br .RI "\fIReturns the type identification of an object derived from a class inheriting \fBSoBase\fP\&. This is used for run-time type checking and 'downward' casting\&. \fP" .ti -1c .RI "virtual void \fBnotify\fP (\fBSoNotList\fP *nl)" .br .ti -1c .RI "virtual SbBool \fBgenerateDefaultNormals\fP (\fBSoState\fP *state, \fBSoNormalBundle\fP *bundle)" .br .ti -1c .RI "virtual SbBool \fBgenerateDefaultNormals\fP (\fBSoState\fP *state, \fBSoNormalCache\fP *cache)" .br .ti -1c .RI "virtual void \fBwrite\fP (\fBSoWriteAction\fP *action)" .br .in -1c .SS "Static Public Member Functions" .in +1c .ti -1c .RI "static \fBSoType\fP \fBgetClassTypeId\fP (void)" .br .RI "\fIThis static method returns the \fBSoType\fP object associated with objects of this class\&. \fP" .ti -1c .RI "static void \fBinitClass\fP (void)" .br .RI "\fISets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system\&. \fP" .in -1c .SS "Public Attributes" .in +1c .ti -1c .RI "\fBSoSFNode\fP \fBvertexProperty\fP" .br .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "virtual const \fBSoFieldData\fP * \fBgetFieldData\fP (void) const " .br .ti -1c .RI "\fBSoVertexShape\fP (void)" .br .ti -1c .RI "virtual \fB~SoVertexShape\fP ()" .br .ti -1c .RI "virtual SbBool \fBshouldGLRender\fP (\fBSoGLRenderAction\fP *action)" .br .ti -1c .RI "void \fBsetNormalCache\fP (\fBSoState\fP *const state, const int num, const \fBSbVec3f\fP *normals)" .br .ti -1c .RI "\fBSoNormalCache\fP * \fBgetNormalCache\fP (void) const " .br .ti -1c .RI "\fBSoNormalCache\fP * \fBgenerateAndReadLockNormalCache\fP (\fBSoState\fP *const state)" .br .ti -1c .RI "void \fBgetVertexData\fP (\fBSoState\fP *state, const \fBSoCoordinateElement\fP *&coords, const \fBSbVec3f\fP *&normals, const SbBool neednormals)" .br .ti -1c .RI "void \fBreadLockNormalCache\fP (void)" .br .ti -1c .RI "void \fBreadUnlockNormalCache\fP (void)" .br .in -1c .SS "Static Protected Member Functions" .in +1c .ti -1c .RI "static const \fBSoFieldData\fP ** \fBgetFieldDataPtr\fP (void)" .br .in -1c .SS "Additional Inherited Members" .SH "Detailed Description" .PP The \fBSoVertexShape\fP class is the superclass for all vertex based shapes\&. .PP Basically, every polygon-, line- or point-based shape will inherit this class\&. It contains methods for organizing the normal cache, and also holds the \fBSoVertexShape::vertexProperty\fP field which can be used to set vertex data inside the node\&. .SH "Constructor & Destructor Documentation" .PP .SS "SoVertexShape::SoVertexShape (void)\fC [protected]\fP" Constructor\&. .SS "SoVertexShape::~SoVertexShape ()\fC [protected]\fP, \fC [virtual]\fP" Destructor\&. .SH "Member Function Documentation" .PP .SS "\fBSoType\fP SoVertexShape::getTypeId (void) const\fC [virtual]\fP" .PP Returns the type identification of an object derived from a class inheriting \fBSoBase\fP\&. This is used for run-time type checking and 'downward' casting\&. Usage example: .PP .PP .nf void foo(SoNode * node) { if (node->getTypeId() == SoFile::getClassTypeId()) { SoFile * filenode = (SoFile *)node; // safe downward cast, knows the type } } .fi .PP .PP For application programmers wanting to extend the library with new nodes, engines, nodekits, draggers or others: this method needs to be overridden in \fIall\fP subclasses\&. This is typically done as part of setting up the full type system for extension classes, which is usually accomplished by using the pre-defined macros available through for instance \fBInventor/nodes/SoSubNode\&.h\fP (SO_NODE_INIT_CLASS and SO_NODE_CONSTRUCTOR for node classes), Inventor/engines/SoSubEngine\&.h (for engine classes) and so on\&. .PP For more information on writing Coin extensions, see the class documentation of the toplevel superclasses for the various class groups\&. .PP Reimplemented from \fBSoShape\fP\&. .PP Reimplemented in \fBSoIndexedFaceSet\fP, \fBSoIndexedLineSet\fP, \fBSoIndexedTriangleStripSet\fP, \fBSoIndexedPointSet\fP, \fBSoFaceSet\fP, \fBSoIndexedMarkerSet\fP, \fBSoIndexedShape\fP, \fBSoNonIndexedShape\fP, \fBSoLineSet\fP, \fBSoMarkerSet\fP, \fBSoPointSet\fP, \fBSoQuadMesh\fP, and \fBSoTriangleStripSet\fP\&. .SS "const \fBSoFieldData\fP ** SoVertexShape::getFieldDataPtr (void)\fC [static]\fP, \fC [protected]\fP" \fIThis API member is considered internal to the library, as it is not likely to be of interest to the application programmer\&.\fP .PP Reimplemented from \fBSoShape\fP\&. .PP Reimplemented in \fBSoIndexedFaceSet\fP, \fBSoIndexedLineSet\fP, \fBSoIndexedTriangleStripSet\fP, \fBSoIndexedPointSet\fP, \fBSoFaceSet\fP, \fBSoIndexedMarkerSet\fP, \fBSoIndexedShape\fP, \fBSoNonIndexedShape\fP, \fBSoLineSet\fP, \fBSoMarkerSet\fP, \fBSoPointSet\fP, \fBSoQuadMesh\fP, and \fBSoTriangleStripSet\fP\&. .SS "const \fBSoFieldData\fP * SoVertexShape::getFieldData (void) const\fC [protected]\fP, \fC [virtual]\fP" Returns a pointer to the class-wide field data storage object for this instance\&. If no fields are present, returns \fCNULL\fP\&. .PP Reimplemented from \fBSoShape\fP\&. .PP Reimplemented in \fBSoIndexedFaceSet\fP, \fBSoIndexedLineSet\fP, \fBSoIndexedTriangleStripSet\fP, \fBSoIndexedPointSet\fP, \fBSoFaceSet\fP, \fBSoIndexedMarkerSet\fP, \fBSoIndexedShape\fP, \fBSoNonIndexedShape\fP, \fBSoLineSet\fP, \fBSoMarkerSet\fP, \fBSoPointSet\fP, \fBSoQuadMesh\fP, and \fBSoTriangleStripSet\fP\&. .SS "void SoVertexShape::notify (\fBSoNotList\fP *l)\fC [virtual]\fP" Notifies all auditors for this instance when changes are made\&. .PP Reimplemented from \fBSoShape\fP\&. .PP Reimplemented in \fBSoIndexedLineSet\fP, and \fBSoIndexedPointSet\fP\&. .SS "SbBool SoVertexShape::generateDefaultNormals (\fBSoState\fP *state, \fBSoNormalBundle\fP *bundle)\fC [virtual]\fP" \fIThis API member is considered internal to the library, as it is not likely to be of interest to the application programmer\&.\fP .PP Subclasses should override this method to generate default normals using the \fBSoNormalBundle\fP class\&. \fCTRUE\fP should be returned if normals were generated, \fCFALSE\fP otherwise\&. .PP Default method returns \fCFALSE\fP\&. .PP This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2\&.1 API\&. .PP Reimplemented in \fBSoIndexedPointSet\fP, \fBSoPointSet\fP, \fBSoIndexedFaceSet\fP, \fBSoIndexedTriangleStripSet\fP, \fBSoQuadMesh\fP, \fBSoFaceSet\fP, and \fBSoTriangleStripSet\fP\&. .SS "SbBool SoVertexShape::generateDefaultNormals (\fBSoState\fP *state, \fBSoNormalCache\fP *cache)\fC [virtual]\fP" \fIThis API member is considered internal to the library, as it is not likely to be of interest to the application programmer\&.\fP .PP Subclasses should override this method to generate default normals using the \fBSoNormalCache\fP class\&. This is more effective than using \fBSoNormalGenerator\fP\&. Return \fCTRUE\fP if normals were generated, \fCFALSE\fP otherwise\&. .PP Default method just returns \fCFALSE\fP\&. .PP This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2\&.1 API\&. .PP Reimplemented in \fBSoQuadMesh\fP, \fBSoFaceSet\fP, \fBSoIndexedPointSet\fP, \fBSoIndexedTriangleStripSet\fP, \fBSoPointSet\fP, \fBSoTriangleStripSet\fP, and \fBSoIndexedFaceSet\fP\&. .SS "void SoVertexShape::write (\fBSoWriteAction\fP *action)\fC [virtual]\fP" Action method for \fBSoWriteAction\fP\&. .PP Writes out a node object, and any connected nodes, engines etc, if necessary\&. .PP Reimplemented from \fBSoNode\fP\&. .SS "SbBool SoVertexShape::shouldGLRender (\fBSoGLRenderAction\fP *action)\fC [protected]\fP, \fC [virtual]\fP" \fIThis API member is considered internal to the library, as it is not likely to be of interest to the application programmer\&.\fP .PP Reimplemented from \fBSoShape\fP\&. .SS "void SoVertexShape::setNormalCache (\fBSoState\fP *conststate, const intnum, const \fBSbVec3f\fP *normals)\fC [protected]\fP" Sets normal cache to contain the normals specified by \fInormals\fP and \fInum\fP, and forces cache dependencies on coordinates, shape hints and crease angle\&. .SS "\fBSoNormalCache\fP * SoVertexShape::getNormalCache (void) const\fC [protected]\fP" Returns the current normal cache, or NULL if there is none\&. .SS "\fBSoNormalCache\fP * SoVertexShape::generateAndReadLockNormalCache (\fBSoState\fP *conststate)\fC [protected]\fP" 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\&. .PP When returning from this method, the normal cache will be read locked, and the caller should call \fBreadUnlockNormalCache()\fP when the normals in the cache is no longer needed\&. .PP This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2\&.1 API\&. .PP \fBSince:\fP .RS 4 Coin 2\&.0 .RE .PP .SS "void SoVertexShape::getVertexData (\fBSoState\fP *state, const \fBSoCoordinateElement\fP *&coords, const \fBSbVec3f\fP *&normals, const SbBoolneednormals)\fC [protected]\fP" Convenience method that returns the current coordinate and normal element\&. This method is not part of the OIV API\&. .SS "void SoVertexShape::readLockNormalCache (void)\fC [protected]\fP" Read lock the normal cache\&. This method should be called before fetching the normal cache (using \fBgetNormalCache()\fP)\&. When the cached normals are no longer needed, \fBreadUnlockNormalCache()\fP must be called\&. .PP It is also possible to use \fBgenerateAndReadLockNormalCache()\fP\&. .PP This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2\&.1 API\&. .PP \fBSee Also:\fP .RS 4 \fBreadUnlockNormalCache()\fP .RE .PP \fBSince:\fP .RS 4 Coin 2\&.0 .RE .PP .SS "void SoVertexShape::readUnlockNormalCache (void)\fC [protected]\fP" Read unlock the normal cache\&. Should be called when the read-locked cached normals are no longer needed\&. .PP \fBSee Also:\fP .RS 4 \fBreadLockNormalCache()\fP .RE .PP \fBSince:\fP .RS 4 Coin 2\&.0 .RE .PP .SH "Member Data Documentation" .PP .SS "\fBSoSFNode\fP SoVertexShape::vertexProperty" If you set the vertexProperty field, it should be with an \fBSoVertexProperty\fP node\&. Otherwise it will simply be ignored\&. Nodetypes inheriting \fBSoVertexShape\fP will then get their coordinate data from the vertexProperty node instead of from the global traversal state\&. .PP 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\&. .PP \fBSee Also:\fP .RS 4 \fBSoVertexProperty\fP .RE .PP \fBSince:\fP .RS 4 Coin 1\&.0 .PP SGI Inventor v2\&.1 .RE .PP .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.