Public Member Functions
CSampleRefArray Class Reference

Detailed Description

Array of Sample objects that represent the samples in the Geometry.

Warning:
This specialized array is returned by Facet::GetSamples, Segment::GetSamples and Point::GetSamples, 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:
Facet::GetSamples, Segment::GetSamples, Point::GetSamples
Example:
        using namespace XSI;
        Application app;
        Model root = app.GetActiveSceneRoot();

        X3DObject myCube;
        root.AddGeometry( L"Cube", L"MeshSurface", L"", myCube );

        CSampleRefArray samples( myCube.GetActivePrimitive().GetGeometry().GetSamples() );

        CLongArray indexArray = samples.GetIndexArray();

        for (LONG i=0; i< indexArray.GetCount(); ++i )
        {
            app.LogMessage( L"Sample.Index " +
                            CValue(indexArray[i]).GetAsText() );
        }

#include <xsi_sample.h>

Inheritance diagram for CSampleRefArray:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CSampleRefArray (const CSampleRefArray &in_array)
CRef GetItem (LONG in_index) const
CRef GetItem (const CString &in_name) const
LONG GetCount () const
bool IsValid () const
CLongArray GetIndexArray () const
SubComponent GetSubComponent () const
CSampleRefArray Navigate (siNavigateComponentType in_siNavigate) const

Constructor & Destructor Documentation

CSampleRefArray ( const CSampleRefArray in_array)

Copy constructor.

Parameters:
in_arrayconstant CSampleRefArray reference object.

Member Function Documentation

CRef GetItem ( LONG  in_index) const [virtual]

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

Parameters:
in_indexThe index of the Sample.
Returns:
The Sample object.

Reimplemented from CRefArray.

Reimplemented in CNurbsSampleRefArray, and CPolygonNodeRefArray.

CRef GetItem ( const CString in_name) const [virtual]

Returns a reference to the Sample object specified by name.

Parameters:
in_nameThe name of the Sample to get.
Returns:
The Sample object.

Reimplemented from CRefArray.

Reimplemented in CNurbsSampleRefArray, and CPolygonNodeRefArray.

LONG GetCount ( ) const [virtual]

Returns the number of Sample objects in the array.

Returns:
The number of Sample objects.

Reimplemented from CRefArray.

Reimplemented in CNurbsSampleRefArray, and CPolygonNodeRefArray.

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 CNurbsSampleRefArray, and CPolygonNodeRefArray.

CLongArray GetIndexArray ( ) const

Returns an array of indices of all Sample objects relative to the Facet object.

Returns:
Array of indices.
SubComponent GetSubComponent ( ) const

Creates a SubComponent object from this Sample array,

Returns:
A SubComponent object
CSampleRefArray Navigate ( siNavigateComponentType  in_siNavigate) const

Navigates the Sample objects of the underlying geometry as specifed by the navigation component type. An array of Sample 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_siNavigateType of direction for navigating the Sample objects.
Returns:
An array of Sample objects.

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