Class SoCone
- java.lang.Object
-
- All Implemented Interfaces:
SafeDisposable
public class SoCone extends SoShape
Cone shape node. 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.
Picking:
SoPickedPoint
getDetail() returns anSoConeDetail
.OpenGL vertex arrays are used if they are available and if the environment variable IV_NO_VERTEX_ARRAY is not set.
Consider using the
SoAlgebraicCone
node instead of this one. Algebraic shapes are computed and rendered on the GPU and can be used withSoMultipleInstance
.File format/default:
Cone {
parts ALL bottomRadius 1 height 2 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 theSoConeDetail
.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.- See Also:
SoAlgebraicCone
,SoConeDetail
,SoCube
,SoCylinder
,SoFullSceneAntialiasing
,SoSphere
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SoCone.PartType
Cone parts.-
Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoShape
SoShape.ShapeTypes
-
Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoNode
SoNode.RenderModes
-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
Fields Modifier and Type Field Description SoSFFloat
bottomRadius
Specifies the radius of the base circle.SoSFFloat
height
Specifies the cone's height.SoSFBitMask<SoCone.PartType>
parts
Visible parts of cone.-
Fields inherited from class com.openinventor.inventor.nodes.SoShape
boundingBoxIgnoring
-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Constructor Summary
Constructors Constructor Description SoCone()
Creates a cone node with default settings.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPart(SoCone.PartType part)
Convenience function to turn on a part of the cone.boolean
hasPart(SoCone.PartType part)
Convenience function that returns whether a given part is on or off.void
removePart(SoCone.PartType part)
Convenience function to turn off a part of the cone.-
Methods inherited from class com.openinventor.inventor.nodes.SoShape
getShapeType, isPrimitiveRestartAvailable, isPrimitiveRestartAvailable
-
Methods inherited from class com.openinventor.inventor.nodes.SoNode
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderEngineMode, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
-
Methods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
-
Methods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable
-
Methods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
-
-
-
Field Detail
-
parts
public final SoSFBitMask<SoCone.PartType> parts
Visible parts of cone.
-
bottomRadius
public final SoSFFloat bottomRadius
Specifies the radius of the base circle. Value must be greater than 0.0.
-
height
public final SoSFFloat height
Specifies the cone's height. Value must be greater than 0.0.
-
-
Method Detail
-
addPart
public void addPart(SoCone.PartType part)
Convenience function to turn on a part of the cone.
-
removePart
public void removePart(SoCone.PartType part)
Convenience function to turn off a part of the cone.
-
hasPart
public boolean hasPart(SoCone.PartType part)
Convenience function that returns whether a given part is on or off.
-
-