Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
SoCircularExtrusion Class Reference

VSG extension Geometric shape formed by extruding a circle along a 3D spine. More...

#include <Inventor/nodes/SoCircularExtrusion.h>

+ Inheritance diagram for SoCircularExtrusion:

Public Types

enum  SpineSimplificationMode {
  DEFAULT ,
  RESPECT_MATERIALS
}
 
- Public Types inherited from SoBaseExtrusion
enum  ScaleMode {
  DEFAULT ,
  SPINE_ONLY ,
  SECTION_ONLY ,
  NONE
}
 
enum  ExtrusionMode {
  SMOOTH = 0 ,
  BASIC = 1 ,
  SMOOTH_WITHOUT_SELF_INTERSECTIONS = 2
}
 
- Public Types inherited from SoShape
enum  ShapeType {
  POINTS ,
  LINES ,
  POLYGONS ,
  TEXT
}
 Basic type for antialiased rendering for this shape (Do not consider the SoDrawStyle property currently in the state). More...
 

Public Member Functions

virtual SoType getTypeId () const
 Returns the type identifier for this specific instance.
 
 SoCircularExtrusion ()
 Constructor.
 
- Public Member Functions inherited from SoShape
virtual SbBool affectsState () const
 Overrides default method on SoNode.
 
ShapeType getShapeType ()
 Gets the current shape Full Scene Antialiasing type.
 
- Public Member Functions inherited from SoNode
virtual void setOverride (const SbBool state)
 Turns the override flag on or off.
 
virtual SbBool isOverride () const
 Returns the state of the override flag.
 
virtual SoNodecopy (SbBool copyConnections=FALSE) const
 Creates and returns an exact copy of the node.
 
virtual void touch ()
 Marks an instance as modified, simulating a change to it.
 
- Public Member Functions inherited from SoFieldContainer
void setToDefaults ()
 Sets all fields in this object to their default values.
 
SbBool hasDefaultValues () const
 Returns TRUE if all of the object's fields have their default values.
 
SbBool fieldsAreEqual (const SoFieldContainer *fc) const
 Returns TRUE if this object's fields are exactly equal to fc's fields.
 
void copyFieldValues (const SoFieldContainer *fc, SbBool copyConnections=FALSE)
 Copies the contents of fc's fields into this object's fields.
 
SoNONUNICODE SbBool set (const char *fieldDataString)
 Sets one or more fields in this object to the values specified in the given string, which should be a string in the Open Inventor file format.
 
SbBool set (const SbString &fieldDataString)
 Sets one or more fields in this object to the values specified in the given string, which should be a string in the Open Inventor file format.
 
void get (SbString &fieldDataString)
 Returns the values of the fields of this object in the Open Inventor ASCII file format in the given string.
 
virtual int getFields (SoFieldList &list) const
 Appends references to all of this object's fields to resultList, and returns the number of fields appended.
 
virtual int getAllFields (SoFieldList &list) const
 Returns a list of fields, including the eventIn's and eventOut's.
 
virtual SoFieldgetField (const SbName &fieldName) const
 Returns a the field of this object whose name is fieldName.
 
virtual SoFieldgetEventIn (const SbName &fieldName) const
 Returns a the eventIn with the given name.
 
virtual SoFieldgetEventOut (const SbName &fieldName) const
 Returns the eventOut with the given name.
 
SbBool getFieldName (const SoField *field, SbName &fieldName) const
 Returns the name of the given field in the fieldName argument.
 
SbBool enableNotify (SbBool flag)
 Notification at this Field Container is enabled (if flag == TRUE) or disabled (if flag == FALSE).
 
SbBool isNotifyEnabled () const
 Notification is the process of telling interested objects that this object has changed.
 
virtual void setUserData (void *data)
 Sets application data.
 
void * getUserData (void) const
 Gets user application data.
 
- Public Member Functions inherited from SoBase
virtual SbName getName () const
 Returns the name of an instance.
 
virtual void setName (const SbName &name)
 Sets the name of an instance.
 
void setSynchronizable (const bool b)
 Sets this to be a ScaleViz synchronizable object.
 
bool isSynchronizable () const
 Gets the ScaleViz synchronizable state of this object.
 
- Public Member Functions inherited from SoRefCounter
void ref () const
 Adds a reference to an instance.
 
void unref () const
 Removes a reference from an instance.
 
void unrefNoDelete () const
 unrefNoDelete() should be called when it is desired to decrement the reference count, but not delete the instance if this brings the reference count to zero.
 
int getRefCount () const
 Returns current reference count.
 
void lock () const
 lock this instance.
 
void unlock () const
 unlock this instance.
 
- Public Member Functions inherited from SoTypedObject
SbBool isOfType (const SoType &type) const
 Returns TRUE if this object is of the type specified in type or is derived from that type.
 
template<typename TypedObjectClass >
SbBool isOfType () const
 Returns TRUE if this object is of the type of class TypedObjectClass or is derived from that class.
 

Static Public Member Functions

static SoType getClassTypeId ()
 Returns the type identifier for this class.
 
- Static Public Member Functions inherited from SoBaseExtrusion
static SoType getClassTypeId ()
 Returns the type identifier for this class.
 
- Static Public Member Functions inherited from SoShape
static SoType getClassTypeId ()
 Returns the type identifier for this class.
 
static SbBool isPrimitiveRestartAvailable (SoState *state=NULL)
 Returns TRUE if the primitive restart feature is available.
 
- Static Public Member Functions inherited from SoNode
static SoType getClassTypeId ()
 Returns the type identifier for this class.
 
static SoNodegetByName (const SbName &name)
 A node's name can be set using SoBase::setName().
 
static int getByName (const SbName &name, SoNodeList &list)
 A node's name can be set using SoBase::setName().
 
- Static Public Member Functions inherited from SoFieldContainer
static SoType getClassTypeId ()
 Returns the type of this class.
 
- Static Public Member Functions inherited from SoBase
static SoType getClassTypeId ()
 Returns type identifier for this class.
 
- Static Public Member Functions inherited from SoTypedObject
static SoType getClassTypeId ()
 Returns the type identifier for this class.
 

Public Attributes

SoSFFloat radius
 Radius of the circular cross-section.
 
SoSFVec2f activeSection
 Defines the visible section of the spine in normalized coordinates.
 
SoSFEnum spineSimplificationMode
 Defines the spine simplification behavior of the extrusion.
 
- Public Attributes inherited from SoBaseExtrusion
SoSFBool beginCap
 If TRUE, begin planar cap surfaces generated.
 
SoSFBool endCap
 If TRUE, end planar cap surfaces generated.
 
SoMFVec3f spine
 Spine points.
 
SoSFEnum scaleMode
 Scaling behavior of the extrusion.
 
SoSFEnum extrusionMode
 Construction behavior of the extrusion.
 
- Public Attributes inherited from SoShape
SoSFBool boundingBoxIgnoring
 Whether to ignore this node during bounding box traversal.
 

Detailed Description

VSG extension Geometric shape formed by extruding a circle along a 3D spine.

The SoCircularExtrusion node is a geometric shape based on a constant radius 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 an SoExtrusion with a circle cross-section, which is convenient for many applications, but this node has additional advantages because it responds to the SoComplexity value.

The application can specify which caps are created using the fields beginCap and endCap. 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 on SoComplexity::value. The shape is always simplified when the SoComplexity 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 a SoComplexity 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 the SoComplexity value. Likewise the clipping behavior could be obtained using two SoClipPlane nodes, but SoCircularExtrusion uses less memory when the activeSection is a subset of the full spine. These two features make SoCircularExtrusion valuable when a large number of cylindrical objects must be displayed.

The scaleMode field (inherited from SoBaseExtrusion) is used to select the points that will be scaled by the current transformation (for example SoTransform), 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 from SoBaseExtrusion) 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 SMOOTH extrusionMode modes. This is especially noticeable when the angles between segments are very small with respect to the radius. 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

NOTE: node available 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

Definition at line 123 of file SoCircularExtrusion.h.

Member Enumeration Documentation

◆ SpineSimplificationMode

Enumerator
DEFAULT 

The spine simplification is done based only on geometric data.

This is sufficient if there is a single material applied to the entire extrusion, but may produce incorrect results if multiple materials are applied.

RESPECT_MATERIALS 

The spine simplification is done preserving the materials applied to the spine.


Definition at line 130 of file SoCircularExtrusion.h.

Constructor & Destructor Documentation

◆ SoCircularExtrusion()

SoCircularExtrusion::SoCircularExtrusion ( )

Constructor.

Member Function Documentation

◆ getClassTypeId()

static SoType SoCircularExtrusion::getClassTypeId ( )
static

Returns the type identifier for this class.


◆ getTypeId()

virtual SoType SoCircularExtrusion::getTypeId ( ) const
virtual

Returns the type identifier for this specific instance.

Reimplemented from SoBaseExtrusion.

Member Data Documentation

◆ activeSection

SoSFVec2f SoCircularExtrusion::activeSection

Defines the visible section of the spine in normalized coordinates.

The default is (0,1) meaning that the entire spine is rendered.

Definition at line 149 of file SoCircularExtrusion.h.

◆ radius

SoSFFloat SoCircularExtrusion::radius

Radius of the circular cross-section.

The default value is 1.

Definition at line 144 of file SoCircularExtrusion.h.

◆ spineSimplificationMode

SoSFEnum SoCircularExtrusion::spineSimplificationMode

Defines the spine simplification behavior of the extrusion.

Use enum SpineSimplificationMode. 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.

Definition at line 159 of file SoCircularExtrusion.h.


The documentation for this class was generated from the following file: