#include <xsi_controlpoint.h>
An array of ControlPoint object references representing the NurbsCurve or NurbsSurface control points.
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);
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 |
Default constructor.
Default destructor.
| CControlPointRefArray | ( | const CControlPointRefArray & | in_array | ) |
Copy constructor.
| in_array | constant CControlPointRefArray reference object. |
| 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. |
Reimplemented from CPointRefArray.
Returns the NurbsCurve object in the array matching the specified name.
| in_name | The name of the NurbsCurve. |
Reimplemented from CPointRefArray.
| LONG GetCount | ( | ) | const [virtual] |
Returns the number of NurbsSurface objects in the array.
Reimplemented from CPointRefArray.
| bool IsValid | ( | ) | const [virtual] |
Returns whether this array is a valid object.
Reimplemented from CPointRefArray.
| CStatus GetArray | ( | MATH::CVector4Array & | out_vPositions | ) | const |
Returns an array of control points for this nurbs component.
| out_vPositions | An array of positions for the control points. |
| 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 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). |
| out_lDimension | The actual dimension. |