Public Member Functions
CSegmentRefArray Class Reference

Detailed Description

An array of Segment objects that represents all the segment sub-components in the Geometry.

Warning:
This specialized array is returned by Geometry::GetSegments and Facet::GetSegments, it is not meant to be created and modified in user-defined functions. If you want to add and remove arbitrary items to a collection, you must use a CRefArray instead.
See also:
Geometry::GetSegments, Facet::GetSegments, Geometry, Segment
Example:
        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>

Inheritance diagram for CSegmentRefArray:
Inheritance graph
[legend]

List of all members.

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

Constructor & Destructor Documentation

CSegmentRefArray ( const CSegmentRefArray in_array )

Copy constructor.

Parameters:
in_array constant CSegmentRefArray reference object.

Member Function Documentation

CRef GetItem ( LONG  in_index ) const [virtual]

Returns a reference to the Segment object at the specified index in the array.

Parameters:
in_index The index of the Segment to get.
Returns:
A a reference to the segment.

Reimplemented from CRefArray.

Reimplemented in CEdgeRefArray.

CRef GetItem ( const CString in_name ) const [virtual]

Returns a reference to the Segment object specified by name.

Parameters:
in_name The name of the Segment to get.
Returns:
A a reference to the segment.

Reimplemented from CRefArray.

Reimplemented in CEdgeRefArray.

LONG GetCount ( ) const [virtual]

Returns the number of Segment objects in the array.

Returns:
The number of Segment objects.

Reimplemented from CRefArray.

Reimplemented in CEdgeRefArray.

bool IsValid ( ) const [virtual]

Returns true if this array is a valid object or false otherwise.

Returns:
true if valid, false otherwise.

Reimplemented from CRefArray.

Reimplemented in CEdgeRefArray.

MATH::CVector3Array GetNormalArray ( ) const

Returns an array of normals expressed as CVector3 objects.

Returns:
Array of CVector3 objects.
CLongArray GetIndexArray ( ) const

Returns an array of indices in the geometry's Segment array.

Returns:
Array of indices.
SubComponent GetSubComponent ( ) const

Creates a SubComponent object from this Segment array.

Returns:
A SubComponent object
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.

Parameters:
in_siNavigate Type of direction for navigating the Segment objects.
Returns:
An array of Segment objects.

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