SoCylinder — cylinder shape node
Contents
Action Behavior
SoGLRenderAction
Draws cylinder based on the current coordinates, materials, drawing style, and so on.
SoRayPickAction
Intersects the ray with the cylinder. The part of the cylinder that was picked is available from the
SoCylinderDetail.
SoGetBoundingBoxAction
Computes the bounding box that encloses the cylinder.
SoCallbackAction
If any triangle callbacks are registered with the action, they will be invoked for each successive
triangle that approximates the cylinder.
Description
This node represents a simple capped cylinder centered around the y-axis. By default, the cylinder is
centered at (0,0,0) and has a default size of -1 to +1 in all three dimensions. You can use the radius
and height fields to create a cylinder with a different size.
The cylinder 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 cylinder, the second is used for the top, and the third is used for the bottom.
Otherwise, the first material is used for the entire cylinder.
When a texture is applied to a cylinder, it is applied differently to the sides, top, and bottom. On the
sides, the texture wraps counterclockwise (from above) starting at the back of the cylinder. The texture
has a vertical seam at the back, intersecting the yz-plane. For the top and bottom, a circle is cut out
of the texture square and applied to the top or bottom circle. The top texture appears right side up when
the top of the cylinder is tilted toward the camera, and the bottom texture appears right side up when
the top of the cylinder is tilted away from the camera.
Fields
SoSFBitMaskparts
Visible parts of cylinder.
SoSFFloatradiusSoSFFloatheight
Define the cylinder's height and radius; values must be greater than 0.0.
File Format/Defaults
Cylinder{partsALLradius1height2}Inherits From
SoBase > SoFieldContainer > SoNode > SoShape > SoCylinder
Methods
SoCylinder()
Creates a cylinder node with default settings.
voidaddPart(SoCylinder::Partpart)voidremovePart(SoCylinder::Partpart)
These are convenience functions that make it easy to turn on or off a part of the cylinder.
SbBoolhasPart(SoCylinder::Partpart)const
This convenience function returns whether a given part is on or off.
staticSoTypegetClassTypeId()
Returns type identifier for this class.
Name
SoCylinder — cylinder shape node
See Also
SoCone,SoCube,SoCylinderDetail,SoSphereSoCylinder(3IV)()
Synopsis
#include<Inventor/nodes/SoCylinder.h>enumPart{SoCylinder::SIDES The cylindrical part
SoCylinder::TOP The top circular face
SoCylinder::BOTTOM The bottom circular face
SoCylinder::ALL All parts
}
Fields from class SoCylinder:
SoSFBitMaskpartsSoSFFloatradiusSoSFFloatheight
Methods from class SoCylinder:
SoCylinder()voidaddPart(SoCylinder::Partpart)voidremovePart(SoCylinder::Partpart)SbBoolhasPart(SoCylinder::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