.TH "SoCone" 3 "Thu May 29 2014" "Version 4.0.0a" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoCone \- .PP The \fBSoCone\fP class is for rendering cone shapes\&. .PP Insert a cone shape into the scenegraph\&. The cone is rendered with the current material, texture and drawstyle settings (if any, otherwise the default settings are used)\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBSoShape\fP\&. .SS "Public Types" .in +1c .ti -1c .RI "enum \fBPart\fP { \fBSIDES\fP = 0x01, \fBBOTTOM\fP = 0x02, \fBALL\fP = (SIDES|BOTTOM) }" .br .in -1c .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 "\fBSoCone\fP (void)" .br .ti -1c .RI "void \fBaddPart\fP (\fBSoCone::Part\fP part)" .br .ti -1c .RI "void \fBremovePart\fP (\fBSoCone::Part\fP part)" .br .ti -1c .RI "SbBool \fBhasPart\fP (\fBSoCone::Part\fP part) const " .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 .in -1c .SS "Static Public Member Functions" .in +1c .ti -1c .RI "static \fBSoType\fP \fBgetClassTypeId\fP (void)" .br .ti -1c .RI "static void \fBinitClass\fP (void)" .br .in -1c .SS "Public Attributes" .in +1c .ti -1c .RI "\fBSoSFBitMask\fP \fBparts\fP" .br .ti -1c .RI "\fBSoSFFloat\fP \fBbottomRadius\fP" .br .ti -1c .RI "\fBSoSFFloat\fP \fBheight\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~SoCone\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 .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 \fBSoCone\fP class is for rendering cone shapes\&. .PP Insert a cone shape into the scenegraph\&. The cone is rendered with the current material, texture and drawstyle settings (if any, otherwise the default settings are used)\&. The \fBSoCone\fP node class is provided as a convenient abstraction for the application programmer to use 'complex' shapes of this type without having to do the tessellation to polygons and other low-level programming herself\&. .PP A cone is visualized by the underlying rendering system by first tessellating the conceptual cone into a set of polygons\&. To control the trade-off between an as much as possible correct visual appearance of the cone versus fast rendering, use an \fBSoComplexity\fP node to influence the number of polygons generated from the tessellation process\&. (The higher the complexity value, the more polygons will be generated, the more \fIrounded\fP the sides of the cone will look\&.) Set the \fBSoComplexity::value\fP field to what you believe would be a good trade-off between correctness and speed for your particular application\&. .PP \fBFILE FORMAT/DEFAULTS:\fP .PP .nf Cone { bottomRadius 1 height 2 parts (SIDES | BOTTOM) } .fi .PP .PP \fBSee also:\fP .RS 4 \fBSoCylinder\fP, \fBSoSphere\fP, \fBSoCube\fP .RE .PP .SH "Member Enumeration Documentation" .PP .SS "enum \fBSoCone::Part\fP" Enumerates the various parts of the cone, for setting inclusion or exclusion from the shape\&. .SH "Constructor & Destructor Documentation" .PP .SS "SoCone::SoCone (void)" Constructor\&. .SS "SoCone::~SoCone ()\fC [protected]\fP, \fC [virtual]\fP" Destructor\&. .SH "Member Function Documentation" .PP .SS "\fBSoType\fP SoCone::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 * SoCone::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 SoCone::addPart (\fBSoCone::Part\fPpart)" Add a \fIpart\fP to the cone\&. .PP \fBSee also:\fP .RS 4 \fBremovePart()\fP, \fBhasPart()\fP .RE .PP .SS "void SoCone::removePart (\fBSoCone::Part\fPpart)" Remove a \fIpart\fP from the cone\&. .PP \fBSee also:\fP .RS 4 \fBaddPart()\fP, \fBhasPart()\fP .RE .PP .SS "SbBool SoCone::hasPart (\fBSoCone::Part\fPpart) const" Returns \fCTRUE\fP if rendering of the given \fIpart\fP is currently turned on\&. .PP \fBSee also:\fP .RS 4 \fBaddPart()\fP, \fBremovePart()\fP .RE .PP .SS "void SoCone::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 SoCone::rayPick (\fBSoRayPickAction\fP *action)\fC [virtual]\fP" Calculates picked point based on primitives generated by subclasses\&. .PP Reimplemented from \fBSoShape\fP\&. .SS "void SoCone::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 SoCone::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 SoCone::computeBBox (\fBSoAction\fP *action, \fBSbBox3f\fP &box, \fBSbVec3f\fP ¢er)\fC [protected]\fP, \fC [virtual]\fP" Implemented by \fBSoShape\fP subclasses to let the \fBSoShape\fP superclass know the exact size and weighted center point of the shape's bounding box\&. .PP The bounding box and center point should be calculated and returned in the local coordinate system\&. .PP The method implements action behavior for shape nodes for \fBSoGetBoundingBoxAction\fP\&. It is invoked from \fBSoShape::getBoundingBox()\fP\&. (Subclasses should \fInot\fP override \fBSoNode::getBoundingBox()\fP\&.) .PP The \fIbox\fP parameter sent in is guaranteed to be an empty box, while \fIcenter\fP is undefined upon function entry\&. .PP Implements \fBSoShape\fP\&. .SH "Member Data Documentation" .PP .SS "\fBSoSFBitMask\fP SoCone::parts" The parts to use for the cone shape\&. Defaults to SoCone::ALL\&. .SS "\fBSoSFFloat\fP SoCone::bottomRadius" Radius of the cone's bottom disc\&. Default value is 1\&.0\&. .SS "\fBSoSFFloat\fP SoCone::height" Height of cone\&. Default value is 2\&.0\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.