Related Scripting Object: Segment
A Segment is a generic concept used to describe a PolygonMesh's Edge. More...
#include <xsi_segment.h>
Inheritance diagram for Segment:

Public Member Functions |
|
| Segment () | |
| ~Segment () | |
| Segment (const CRef &in_ref) | |
| Segment (const Segment &in_obj) | |
| bool | IsA (siClassID in_ClassID) const |
| siClassID | GetClassID () const |
| Segment & | operator= (const Segment &in_obj) |
| Segment & | operator= (const CRef &in_ref) |
| CPointRefArray | GetPoints () const |
| LONG | GetIndex () const |
| CSampleRefArray | GetSamples () const |
| SubComponent | GetSubComponent () const |
| Segment | Navigate (siNavigateComponentType in_siNavigate) const |
Having a generic term for this concept allows the user to write code to traverse an object's geometry in a generic fashion without resorting to special case handling based on a specific geometry type.
using namespace XSI; Application app; Model root = app.GetActiveSceneRoot(); X3DObject myCube; root.AddGeometry( L"Cube", L"MeshSurface", L"", myCube ); CSegmentRefArray segments( myCube.GetActivePrimitive().GetGeometry().GetSegments() ); LONG lCount = segments.GetCount(); for ( LONG i=0; i<lCount; i++ ) { Segment segment(segments[i]); app.LogMessage( L"Segment.Index " + CValue(segment.GetIndex()).GetAsText() ); }
| Segment | ( | ) |
Default constructor.
| ~Segment | ( | ) |
Default destructor.
Constructor.
| in_ref | constant reference object. |
Copy constructor.
| in_obj | constant class object. |
| bool IsA | ( | siClassID | in_ClassID | ) | const [virtual] |
| siClassID GetClassID | ( | ) | const [virtual] |
Returns the type of the API class.
Reimplemented from SIObject.
Reimplemented in Edge.
Creates an object from another object. The newly created object is set to empty if the input object is not compatible.
| in_obj | constant class object. |
Creates an object from a reference object. The newly created object is set to empty if the input reference object is not compatible.
| in_ref | constant class object. |
Reimplemented from SIObject.
Reimplemented in Edge.
| CPointRefArray GetPoints | ( | ) | const |
Returns an array of Point objects on this Segment object.
| LONG GetIndex | ( | ) | const |
Returns the index of this Segment object in the geometry's segment array.
| CSampleRefArray GetSamples | ( | ) | const |
Returns an array of Sample object on this Segment object.
| SubComponent GetSubComponent | ( | ) | const |
Creates a SubComponent object from this Segment object,
| Segment Navigate | ( | siNavigateComponentType | in_siNavigate | ) | const |
Navigates the Segment objects of the underlying geometry as specifed by the navigation component type. Navigation is circular -- for instance, navigating beyond the last component will return the first and vice versa.
| in_siNavigate | Type of direction for navigating the Segment objects. |