Public Member Functions
CControlPointRefArray Class Reference

Detailed Description

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

Warning:
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;
        root.AddGeometry(L"Circle",L"NurbsCurve",L"",circle);

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

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

        CControlPointRefArray cpArray = curve.GetControlPoints();

        CNurbsCurveData curveData;
        cpArray.GetArray(curveData.m_aControlPoints);

        curveData.m_bClosed = true;

        X3DObject circleCopyWithoutKnots;
        root.AddNurbsCurve(curveData,siSINurbs,L"",circleCopyWithoutKnots);

#include <xsi_controlpoint.h>

Inheritance diagram for CControlPointRefArray:
Inheritance graph
[legend]

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.

Parameters:
in_arrayconstant CControlPointRefArray reference object.

Member Function Documentation

CRef GetItem ( LONG  in_index) const [virtual]

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

Parameters:
in_indexThe index of the NurbsCurve.
Returns:
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.

Parameters:
in_nameThe name of the NurbsCurve.
Returns:
A reference to the NurbsCurve object.

Reimplemented from CPointRefArray.

LONG GetCount ( ) const [virtual]

Returns the number of NurbsSurface objects in the array.

Returns:
The number of NurbsSurface objects.

Reimplemented from CPointRefArray.

bool IsValid ( ) const [virtual]

Returns whether this array is a valid object.

Returns:
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_vPositionsAn array of positions for the control points.
Returns:
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.

Parameters:
in_vPositionsThe new positions for the control points.
Returns:
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.

Parameters:
in_siDirectionDirection of dimension required (one of the siNurbsDirection values).
Return values:
out_lDimensionThe actual dimension.
Returns:
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: