logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SoCone — cone shape node

Action Behavior

SoGLRenderAction
          Draws cone based on the current coordinates, materials, drawing style, and so on.

     SoRayPickAction
          Intersects  the  ray  with  the  cone.  The  part  of  the  cone that was picked is available from the
          SoConeDetail.

     SoGetBoundingBoxAction
          Computes the bounding box that encloses the cone.

     SoCallbackAction
          If any triangle callbacks are registered with the action, they will be  invoked  for  each  successive
          triangle that approximates the cone.

Description

       This node represents a simple cone whose central axis is aligned with the y-axis. By default, the cone is
       centered at (0,0,0) and has a size of -1 to +1 in all three directions. The cone has a radius of 1 at the
       bottom and a height of 2, with its apex at 1. The cone has two parts: the sides and the bottom.

       The  cone  is transformed by the current cumulative transformation and is drawn with the current lighting
       model, drawing style, material, and geometric complexity.

       If the current material binding is PER_PART or PER_PART_INDEXED, the first current material is  used  for
       the  sides  of the cone, and the second is used for the bottom. Otherwise, the first material is used for
       the entire cone.

       When a texture is applied to a cone, it is applied differently to the sides and bottom. On the sides, the
       texture wraps counterclockwise (from above) starting at the back of the cone. The texture has a  vertical
       seam  at  the  back, intersecting the yz-plane. For the bottom, a circle is cut out of the texture square
       and applied to the cone's base circle. The texture appears right side up when the  top  of  the  cone  is
       tilted away from the camera.

Fields

SoSFBitMaskparts
          Visible parts of cone.

     SoSFFloatbottomRadiusSoSFFloatheight
          These define the cone's height and the radius of the base circle; values must be greater than 0.0.

File Format/Defaults

Cone{partsALLbottomRadius1height2}

Inherits From

       SoBase > SoFieldContainer > SoNode > SoShape > SoCone

Methods

SoCone()
          Creates a cone node with default settings.

     voidaddPart(SoCone::Partpart)voidremovePart(SoCone::Partpart)
          These are convenience functions that make it easy to turn on or off a part of the cone.

     SbBoolhasPart(SoCone::Partpart)const
          This convenience function returns whether a given part is on or off.

     staticSoTypegetClassTypeId()
          Returns type identifier for this class.

Name

       SoCone — cone shape node

See Also

SoConeDetail,SoCube,SoCylinder,SoSphereSoCone(3IV)()

Synopsis

#include<Inventor/nodes/SoCone.h>enumPart{SoCone::SIDES       The conical part
          SoCone::BOTTOM      The bottom circular face
          SoCone::ALL         All parts
     }

          Fields from class SoCone:

     SoSFBitMaskpartsSoSFFloatbottomRadiusSoSFFloatheight

          Methods from class SoCone:

                         SoCone()voidaddPart(SoCone::Partpart)voidremovePart(SoCone::Partpart)SbBoolhasPart(SoCone::Partpart)conststaticSoTypegetClassTypeId()

          Methods from class SoNode:

     voidsetOverride(SbBoolstate)SbBoolisOverride()constSoNode*copy(SbBoolcopyConnections=FALSE)constvirtualSbBoolaffectsState()conststaticSoNode*getByName(constSbName&name)staticintgetByName(constSbName&name,SoNodeList&list)

          Methods from class SoFieldContainer:

     voidsetToDefaults()SbBoolhasDefaultValues()constSbBoolfieldsAreEqual(constSoFieldContainer*fc)constvoidcopyFieldValues(constSoFieldContainer*fc,SbBoolcopyConnections=FALSE)SbBoolset(constchar*fieldDataString)voidget(SbString&fieldDataString)virtualintgetFields(SoFieldList&resultList)constvirtualSoField*getField(constSbName&fieldName)constSbBoolgetFieldName(constSoField*field,SbName&fieldName)constSbBoolisNotifyEnabled()constSbBoolenableNotify(SbBoolflag)

          Methods from class SoBase:

     voidref()voidunref()constvoidunrefNoDelete()constvoidtouch()virtualSoTypegetTypeId()constSbBoolisOfType(SoTypetype)constvirtualvoidsetName(constSbName&name)virtualSbNamegetName()const

See Also