Public Member Functions
CPointRefArray Class Reference

Detailed Description

An array of Point objects that represent the points in the Geometry.

Warning:
This specialized array is returned by Geometry::GetPoints, 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.
Example:
        using namespace XSI;
        using namespace MATH;

        Application app;
        Model root = app.GetActiveSceneRoot();

        X3DObject myGrid;
        root.AddGeometry( L"Grid", L"MeshSurface", L"", myGrid );

        Geometry geom = myGrid.GetActivePrimitive().GetGeometry(0);

        CPointRefArray points( geom.GetPoints() );

        CValue val(points.GetCount());
        app.LogMessage( CString(L"Number of points: ") + val.GetAsText() );

        for(LONG i = 0; i < points.GetCount();  ++i)
        {
            Point pt(points[i]);
            CVector3 pos( pt.GetPosition() );

            app.LogMessage(
                CValue(pos.GetX()).GetAsText() + L"," +
                CValue(pos.GetY()).GetAsText() + L"," +
                CValue(pos.GetZ()).GetAsText() );
        }

#include <xsi_point.h>

Inheritance diagram for CPointRefArray:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  CPointRefArray (const CPointRefArray &in_array)
CRef  GetItem (LONG in_index) const
CRef  GetItem (const CString &in_name) const
LONG  GetCount () const
bool  IsValid () const
MATH::CVector3Array  GetPositionArray () const
CStatus  PutPositionArray (const MATH::CVector3Array &in_points)
MATH::CVector3Array  GetNormalArray () const
CLongArray  GetIndexArray () const
SubComponent  GetSubComponent () const
CPointRefArray  Navigate (siNavigateComponentType in_siNavigate) const

Constructor & Destructor Documentation

CPointRefArray ( const CPointRefArray in_array )

Copy onstructor.

Parameters:
in_array constant CPointRefArray reference object.

Member Function Documentation

CRef GetItem ( LONG  in_index ) const [virtual]

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

Parameters:
in_index The index of the Point.
Returns:
The Point reference object.

Reimplemented from CRefArray.

Reimplemented in CControlPointRefArray, and CVertexRefArray.

CRef GetItem ( const CString in_name ) const [virtual]

Returns a reference to the Point object matching the specified index.

Parameters:
in_name The name of the Point.
Returns:
The Point reference object.

Reimplemented from CRefArray.

Reimplemented in CControlPointRefArray, and CVertexRefArray.

LONG GetCount ( ) const [virtual]

Returns the number of Point objects in the array.

Returns:
The number of Point objects.

Reimplemented from CRefArray.

Reimplemented in CControlPointRefArray, and CVertexRefArray.

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 CControlPointRefArray, and CVertexRefArray.

MATH::CVector3Array GetPositionArray ( ) const

Returns an array of positions expressed with CVector3 objects.

Returns:
Array of CVector3 objects.
CStatus PutPositionArray ( const MATH::CVector3Array in_points )

Sets the positions as an array of CVector3 objects. For non-custom operators this property can only be set if the object has been frozen.

Parameters:
in_points An array of CVector3.
Returns:
CStatus::OK success
MATH::CVector3Array GetNormalArray ( ) const

Returns an array of normals expressed with CVector3 objects.

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

Return an array of indices in the geometry Point array

Returns:
An array of indices.
SubComponent GetSubComponent ( ) const

Creates a SubComponent object from this Point array,

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

Navigates the Point objects of the underlying geometry as specifed by the navigation component type. The function returns an array of Point objects corresponding to each Point object visited. Navigation is circular -- for instance, navigating beyond the last component will return the first and vis versa.

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

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