An array of Segment objects that represents all the segment sub-components in the Geometry.
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() ); CLongArray indexArray = segments.GetIndexArray(); for (LONG i=0; i< indexArray.GetCount(); ++i ) { app.LogMessage( L"Segment.Index " + CValue(indexArray[i]).GetAsText() ); }
#include <xsi_segment.h>
Public Member Functions | |
CSegmentRefArray (const CSegmentRefArray &in_array) | |
CRef | GetItem (LONG in_index) const |
CRef | GetItem (const CString &in_name) const |
LONG | GetCount () const |
bool | IsValid () const |
MATH::CVector3Array | GetNormalArray () const |
CLongArray | GetIndexArray () const |
SubComponent | GetSubComponent () const |
CSegmentRefArray | Navigate (siNavigateComponentType in_siNavigate) const |
CSegmentRefArray | ( | const CSegmentRefArray & | in_array | ) |
Copy constructor.
in_array | constant CSegmentRefArray reference object. |
CRef GetItem | ( | LONG | in_index | ) | const [virtual] |
Returns a reference to the Segment object at the specified index in the array.
in_index | The index of the Segment to get. |
Reimplemented from CRefArray.
Reimplemented in CEdgeRefArray.
Returns a reference to the Segment object specified by name.
in_name | The name of the Segment to get. |
Reimplemented from CRefArray.
Reimplemented in CEdgeRefArray.
LONG GetCount | ( | ) | const [virtual] |
Returns the number of Segment objects in the array.
Reimplemented from CRefArray.
Reimplemented in CEdgeRefArray.
bool IsValid | ( | ) | const [virtual] |
Returns true if this array is a valid object or false otherwise.
Reimplemented from CRefArray.
Reimplemented in CEdgeRefArray.
MATH::CVector3Array GetNormalArray | ( | ) | const |
Returns an array of normals expressed as CVector3 objects.
CLongArray GetIndexArray | ( | ) | const |
Returns an array of indices in the geometry's Segment array.
SubComponent GetSubComponent | ( | ) | const |
Creates a SubComponent object from this Segment array.
CSegmentRefArray Navigate | ( | siNavigateComponentType | in_siNavigate | ) | const |
Navigates the Segment objects of the underlying geometry as specifed by the navigation component type. An array of Segment objects corresponding to each Sample object visited is returned. 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. |