CControlPointRefArray Class Reference
CControlPointRefArray Class Reference

#include <xsi_controlpoint.h>

Class Description

An array of ControlPoint object references representing the NurbsCurve or NurbsSurface control points.

This specialized array is returned by NurbsCurve::GetControlPoints and NurbsSurface::GetControlPoints, 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:
NurbsCurve::GetControlPoints, NurbsSurface::GetControlPoints, ControlPoint, CNurbsCurveData, CNurbsSurfaceData
                using namespace XSI;
                using namespace MATH;
                Application app;
                Model root = app.GetActiveSceneRoot();

                X3DObject circle;

                NurbsCurveList curveList = circle.GetActivePrimitive().GetGeometry();

                NurbsCurve curve = curveList.GetCurves().GetItem(0);

                CControlPointRefArray cpArray = curve.GetControlPoints();

                CNurbsCurveData curveData;

                curveData.m_bClosed = true;

                X3DObject circleCopyWithoutKnots;
Inheritance diagram for CControlPointRefArray:
CPointRefArray CRefArray

List of all members.

Public Member Functions

  CControlPointRefArray ()
  ~CControlPointRefArray ()
  CControlPointRefArray (const CControlPointRefArray &in_array)
CRef  GetItem (LONG in_index) const
CRef  GetItem (const CString &in_name) const
LONG  GetCount () const
bool  IsValid () const
CStatus  GetArray (MATH::CVector4Array &out_vPositions) const
CStatus  PutArray (MATH::CVector4Array &in_vPositions)
CStatus  Dimension (siNurbsDirection in_siDirection, LONG &out_lDimension) const

Constructor & Destructor Documentation

Default constructor.

Default destructor.

Copy constructor.

in_array constant CControlPointRefArray reference object.

Member Function Documentation

CRef GetItem ( LONG  in_index ) const [virtual]

Returns the NurbsCurve object at a specified index in the array.

in_index The index of the NurbsCurve.
A reference to the NurbsCurve object.

Reimplemented from CPointRefArray.

CRef GetItem ( const CString in_name ) const [virtual]

Returns the NurbsCurve object in the array matching the specified name.

in_name The name of the NurbsCurve.
A reference to the NurbsCurve object.

Reimplemented from CPointRefArray.

LONG GetCount ( ) const [virtual]

Returns the number of NurbsSurface objects in the array.

The number of NurbsSurface objects.

Reimplemented from CPointRefArray.

bool IsValid ( ) const [virtual]

Returns whether this array is a valid object.

true if valid, false otherwise.

Reimplemented from CPointRefArray.

CStatus GetArray ( MATH::CVector4Array out_vPositions ) const

Returns an array of control points for this nurbs component.

Return values:
out_vPositions An array of positions for the control points.
CStatus::OK success.
CStatus::Fail other failure.
CStatus PutArray ( MATH::CVector4Array in_vPositions )

Sets an array of control points for this nurbs component. This function can only be used within a compiled operator or if no operators are attach to this geometry.

in_vPositions The new positions for the control points.
CStatus::OK success.
CStatus::CStatus::AccessDenied function used outside of a plug-in operator context.
CStatus Dimension ( siNurbsDirection  in_siDirection,
LONG &  out_lDimension 
) const

Returns the size of the ControlPoint reference array in a particular direction. For NurbsCurves use siUDirection.

in_siDirection Direction of dimension required (one of the siNurbsDirection values).
Return values:
out_lDimension The actual dimension.
CStatus::OK success.
CStatus::InvalidArgument if the direction is invalid for this type of component (for example, siVDirection for a NurbsCurve).

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