.TH "SoIndexedNurbsCurve" 3 "Sat Oct 12 2013" "Version 4.0.0a" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoIndexedNurbsCurve \- .PP The \fBSoIndexedNurbsCurve\fP class is a node for representing smooth curves\&. .PP Explaining NURBS is beyond the scope of this documentation\&. If you are unfamiliar with the principles of representing smooth curves and surfaces when doing 3D visualization, we recommend finding a good book on the subject\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBSoShape\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 "\fBSoIndexedNurbsCurve\fP (void)" .br .ti -1c .RI "virtual void \fBGLRender\fP (\fBSoGLRenderAction\fP *action)" .br .ti -1c .RI "virtual void \fBrayPick\fP (\fBSoRayPickAction\fP *action)" .br .ti -1c .RI "virtual void \fBgetPrimitiveCount\fP (\fBSoGetPrimitiveCountAction\fP *action)" .br .ti -1c .RI "virtual void \fBgetBoundingBox\fP (\fBSoGetBoundingBoxAction\fP *action)" .br .ti -1c .RI "void \fBsendPrimitive\fP (\fBSoAction\fP *, \fBSoPrimitiveVertex\fP *)" .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 "\fBSoSFInt32\fP \fBnumControlPoints\fP" .br .ti -1c .RI "\fBSoMFInt32\fP \fBcoordIndex\fP" .br .ti -1c .RI "\fBSoMFFloat\fP \fBknotVector\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 "virtual \fB~SoIndexedNurbsCurve\fP ()" .br .ti -1c .RI "virtual void \fBgeneratePrimitives\fP (\fBSoAction\fP *action)" .br .ti -1c .RI "virtual void \fBcomputeBBox\fP (\fBSoAction\fP *action, \fBSbBox3f\fP &box, \fBSbVec3f\fP ¢er)" .br .ti -1c .RI "virtual \fBSoDetail\fP * \fBcreateLineSegmentDetail\fP (\fBSoRayPickAction\fP *action, const \fBSoPrimitiveVertex\fP *v1, const \fBSoPrimitiveVertex\fP *v2, \fBSoPickedPoint\fP *pp)" .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 \fBSoIndexedNurbsCurve\fP class is a node for representing smooth curves\&. .PP Explaining NURBS is beyond the scope of this documentation\&. If you are unfamiliar with the principles of representing smooth curves and surfaces when doing 3D visualization, we recommend finding a good book on the subject\&. \fBFILE FORMAT/DEFAULTS:\fP .PP .nf IndexedNurbsCurve { numControlPoints 0 coordIndex 0 knotVector 0 } .fi .PP .SH "Constructor & Destructor Documentation" .PP .SS "SoIndexedNurbsCurve::SoIndexedNurbsCurve (void)" Constructor\&. .SS "SoIndexedNurbsCurve::~SoIndexedNurbsCurve ()\fC [protected]\fP, \fC [virtual]\fP" Destructor\&. .SH "Member Function Documentation" .PP .SS "\fBSoType\fP SoIndexedNurbsCurve::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\&. .SS "const \fBSoFieldData\fP ** SoIndexedNurbsCurve::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\&. .SS "const \fBSoFieldData\fP * SoIndexedNurbsCurve::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\&. .SS "void SoIndexedNurbsCurve::GLRender (\fBSoGLRenderAction\fP *action)\fC [virtual]\fP" Action method for the \fBSoGLRenderAction\fP\&. .PP This is called during rendering traversals\&. Nodes influencing the rendering state in any way or who wants to throw geometry primitives at OpenGL overrides this method\&. .PP Reimplemented from \fBSoShape\fP\&. .SS "void SoIndexedNurbsCurve::rayPick (\fBSoRayPickAction\fP *action)\fC [virtual]\fP" Calculates picked point based on primitives generated by subclasses\&. .PP Reimplemented from \fBSoShape\fP\&. .SS "void SoIndexedNurbsCurve::getPrimitiveCount (\fBSoGetPrimitiveCountAction\fP *action)\fC [virtual]\fP" Action method for the \fBSoGetPrimitiveCountAction\fP\&. .PP Calculates the number of triangle, line segment and point primitives for the node and adds these to the counters of the \fIaction\fP\&. .PP Nodes influencing how geometry nodes calculates their primitive count also overrides this method to change the relevant state variables\&. .PP Reimplemented from \fBSoShape\fP\&. .SS "void SoIndexedNurbsCurve::getBoundingBox (\fBSoGetBoundingBoxAction\fP *action)\fC [virtual]\fP" Redefined to notify open caches that this shape contains lines\&. .PP Reimplemented from \fBSoShape\fP\&. .SS "void SoIndexedNurbsCurve::sendPrimitive (\fBSoAction\fP *, \fBSoPrimitiveVertex\fP *)" This method is part of the original SGI Inventor API, but not implemented in Coin, as it looks like a method that should probably have been private in Open Inventor\&. .SS "void SoIndexedNurbsCurve::generatePrimitives (\fBSoAction\fP *action)\fC [protected]\fP, \fC [virtual]\fP" The method implements action behavior for shape nodes for \fBSoCallbackAction\fP\&. It is invoked from \fBSoShape::callback()\fP\&. (Subclasses should \fInot\fP override \fBSoNode::callback()\fP\&.) .PP The subclass implementations uses the convenience methods \fBSoShape::beginShape()\fP, \fBSoShape::shapeVertex()\fP, and \fBSoShape::endShape()\fP, with \fBSoDetail\fP instances, to pass the primitives making up the shape back to the caller\&. .PP Implements \fBSoShape\fP\&. .SS "void SoIndexedNurbsCurve::computeBBox (\fBSoAction\fP *action, \fBSbBox3f\fP &box, \fBSbVec3f\fP ¢er)\fC [protected]\fP, \fC [virtual]\fP" Calculates the bounding box of all control points, and sets the center to the average of these points\&. .PP Implements \fBSoShape\fP\&. .SS "\fBSoDetail\fP * SoIndexedNurbsCurve::createLineSegmentDetail (\fBSoRayPickAction\fP *action, const \fBSoPrimitiveVertex\fP *v1, const \fBSoPrimitiveVertex\fP *v2, \fBSoPickedPoint\fP *pp)\fC [protected]\fP, \fC [virtual]\fP" Will create line detail for a \fBSoPickedPoint\fP\&. This method will only be called internally, when \fBgeneratePrimitives()\fP is used for picking (\fBSoShape::rayPick()\fP is not overridden)\&. .PP This method returns \fCNULL\fP in Open Inventor, and subclasses will need to override this method to create details for a \fBSoPickedPoint\fP\&. .PP This is not necessary with Coin\&. Of course, if you choose to override it, it will work in the same way as Open Inventor\&. .PP For this to work, you must supply a face or line detail when generating primitives\&. If you supply \fCNULL\fP for the detail argument in \fBSoShape::beginShape()\fP, you'll have to override this method\&. .PP Reimplemented from \fBSoShape\fP\&. .SH "Member Data Documentation" .PP .SS "\fBSoSFInt32\fP SoIndexedNurbsCurve::numControlPoints" Number of control points for this curve\&. .SS "\fBSoMFInt32\fP SoIndexedNurbsCurve::coordIndex" The control point indices\&. Supply at least numControlPoint indices\&. .SS "\fBSoMFFloat\fP SoIndexedNurbsCurve::knotVector" The knot vector\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.