public class SoCylinder extends SoShape
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.
Picking: SoPickedPoint
getDetail() returns an SoCylinderDetail
.
OpenGL vertex arrays are used if they are available and if the environment variable IV_NO_VERTEX_ARRAY is not set.
Consider using the SoAlgebraicCylinder
node instead of this one. Algebraic shapes are computed and rendered on the GPU and can be used with SoMultipleInstance
.
File format/default:
Cylinder {
parts | ALL |
radius | 1 |
height | 2 |
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.
See also:
SoAlgebraicCylinder
, SoCone
, SoCube
, SoCylinderDetail
, SoFullSceneAntialiasing
, SoSphere
Modifier and Type | Class and Description |
---|---|
static class |
SoCylinder.PartType
Cylinder parts.
|
SoShape.ShapeTypes
Inventor.ConstructorCommand
Modifier and Type | Field and Description |
---|---|
static int |
ALL
Deprecated.
Use
SoCylinder.PartType.ALL instead. |
static int |
BOTTOM
Deprecated.
Use
SoCylinder.PartType.BOTTOM instead. |
SoSFFloat |
height
Specifies the cylinder's height.
|
SoSFBitMask<SoCylinder.PartType> |
parts
Visible parts of cylinder.
|
SoSFFloat |
radius
Specifies the cylinder's radius.
|
static int |
SIDES
Deprecated.
Use
SoCylinder.PartType.SIDES instead. |
static int |
TOP
Deprecated.
Use
SoCylinder.PartType.TOP instead. |
boundingBoxIgnoring, LINES, POINTS, POLYGONS, TEXT
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SoCylinder()
Creates a cylinder node with default settings.
|
Modifier and Type | Method and Description |
---|---|
void |
addPart(SoCylinder.PartType part)
Convenience function to turn on a part of the cylinder.
|
boolean |
hasPart(SoCylinder.PartType part)
Convenience function that returns whether a given part is on or off.
|
void |
removePart(SoCylinder.PartType part)
Convenience function to turn off a part of the cylinder.
|
getShapeType, isPrimitiveRestartAvailable, isPrimitiveRestartAvailable
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
dispose, getEXTERNPROTO, getName, getPROTO, isDisposable, isSynchronizable, setName, setSynchronizable
getAddress, getNativeResourceHandle, startInternalThreads, stopInternalThreads
@Deprecated public static final int SIDES
SoCylinder.PartType.SIDES
instead.@Deprecated public static final int TOP
SoCylinder.PartType.TOP
instead.@Deprecated public static final int BOTTOM
SoCylinder.PartType.BOTTOM
instead.@Deprecated public static final int ALL
SoCylinder.PartType.ALL
instead.public final SoSFBitMask<SoCylinder.PartType> parts
public final SoSFFloat radius
public final SoSFFloat height
public boolean hasPart(SoCylinder.PartType part)
public void removePart(SoCylinder.PartType part)
public void addPart(SoCylinder.PartType part)
Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com