Class SoCircularExtrusion
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.inventor.misc.SoBase
-
- com.openinventor.inventor.fields.SoFieldContainer
-
- com.openinventor.inventor.nodes.SoNode
-
- com.openinventor.inventor.nodes.SoShape
-
- com.openinventor.inventor.nodes.SoBaseExtrusion
-
- com.openinventor.inventor.nodes.SoCircularExtrusion
-
- All Implemented Interfaces:
SafeDisposable
public class SoCircularExtrusion extends SoBaseExtrusion
Geometric shape formed by extruding a circle along a 3D spine. TheSoCircularExtrusion
node is a geometric shape based on a constantradius
circle cross section extruded along a three-dimensional polyline (spine). The circle center lies on the spine and the circle lies on the plane normal to the spine at each point. This is similar to specifying anSoExtrusion
with a circle cross-section, which is convenient for many applications, but this node has additional advantages because it responds to theSoComplexity
value.The application can specify which caps are created using the fields
beginCap
andendCap
. By default both caps are visible.The application can specify the visible portion of the shape along the spine using normalized curvilinear coordinates (activeSection). By default the entire spine is visible.
The
SoCircularExtrusion
representation is dependent onSoComplexity.value
. The shape is always simplified when theSoComplexity
value is less than 1. Both the cross section (number of segments used for the circle) and the spine (number of points used for the spine) are affected by the simplification. The simplification algorithm approximates the spine by taking into account its curvature. The cross section circle is approximated by at least 10 points. With aSoComplexity
value of 0 the extruded shape has the roughest representation.Approximately the same geometry could be defined using an
SoExtrusion
node, but that node does not currently respond theSoComplexity
value. Likewise the clipping behavior could be obtained using twoSoClipPlane
nodes, butSoCircularExtrusion
uses less memory when the activeSection is a subset of the full spine. These two features makeSoCircularExtrusion
valuable when a large number of cylindrical objects must be displayed.The
scaleMode
field (inherited fromSoBaseExtrusion
) is used to select the points that will be scaled by the current transformation (for exampleSoTransform
), if any. Translation and rotation are applied in all cases. The options are:- DEFAULT : Every point in the generated geometry is scaled.
- SPINE_ONLY : Only the spine points are scaled. The cross section points are not scaled, so the cross section shape is undistorted even is scaling is non-uniform.
- SECTION_ONLY : Only the cross section points are scaled. Not currently implemented.
- NONE :
SoExtrusion
ignores the scaling state. Not currently implemented.
The
extrusionMode
field (inherited fromSoBaseExtrusion
) is used to select the extrusion algorithm.Limitations:
The spine polyline segments must be C0 continous, that is, the spine must be connected at joints. The following segments may be C1 discontinous but be aware that very narrow angles between consecutive polyline semgments can produce odd results with SMOOTHextrusionMode
modes. This is especially noticeable when the angles between segments are very small with respect to theradius
. In the following images the consecutive points A, B, C in the spine show one of these cases. The problem is at point B whose cross sections are abnormally large.Spine Wireframe Shaded - Since:
- Open Inventor 8.6
File format/default:
CircularExtrusion {
beginCap true endCap true spine [ 0 0 0, 0 1 0 ] scaleMode DEFAULT extrusionMode SMOOTH radius [ 1 ] activeSection [ 0, 1 ] - See Also:
SoExtrusion
,SoComplexity
,SoBaseExtrusion
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SoCircularExtrusion.SpineSimplificationModes
-
Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoBaseExtrusion
SoBaseExtrusion.ExtrusionModes, SoBaseExtrusion.ScaleModes
-
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 SoSFVec2f
activeSection
Defines the visible section of the spine in normalized coordinates.SoSFFloat
radius
Radius of the circular cross-section.SoSFEnum<SoCircularExtrusion.SpineSimplificationModes>
spineSimplificationMode
Defines the spine simplification behavior of the extrusion.-
Fields inherited from class com.openinventor.inventor.nodes.SoBaseExtrusion
beginCap, endCap, extrusionMode, scaleMode, spine
-
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 SoCircularExtrusion()
Constructor.
-
Method Summary
-
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
-
radius
public final SoSFFloat radius
Radius of the circular cross-section. The default value is 1.
-
activeSection
public final SoSFVec2f activeSection
Defines the visible section of the spine in normalized coordinates. The default is (0,1) meaning that the entire spine is rendered.
-
spineSimplificationMode
public final SoSFEnum<SoCircularExtrusion.SpineSimplificationModes> spineSimplificationMode
Defines the spine simplification behavior of the extrusion. . Default is DEFAULT. DEFAULT means spine simplification depends only on geometry. This is appropriate in the typical case where a single material is applied to the entire extrusion. RESPECT_MATERIALS means spine simplification preserves multiple materials (if any) applied to the extrusion. This could reduce rendering performance.
-
-