Public Member Functions
CKnotArray Class Reference

## Detailed Description

An array of knot values representing the NURBS curve or surface knots.

Warning:
  This specialized array is returned by NurbsCurve::GetKnots and NurbsSurface::GetKnots, 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::GetKnots, NurbsSurface::GetKnots, CNurbsCurveData, CNurbsSurfaceData

Example:

            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();
            CKnotArray knotArray = curve.GetKnots();

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

            knotArray.GetClosed(curveData.m_bClosed);

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

`#include <xsi_knot.h>`

Inheritance diagram for CKnotArray:
[legend]

List of all members.

## Public Member Functions
| CKnotArray ()
| ~CKnotArray ()
| CKnotArray (const CKnotArray &in_array)
| CKnotArray (const CRef &in_ref)
CKnotArray & | operator= (const CKnotArray &in_obj)
CKnotArray & | operator= (const CRef &in_ref)
bool | IsA (siClassID in_classID) const
siClassID | GetClassID () const
double | GetItem (LONG in_index) const
CDoubleArray & | GetArray () const
LONG | GetCount () const
CStatus | GetClosed (bool &out_bClosed) const
CStatus | GetDegree (LONG &out_lDegree) const
CStatus | GetParameterization (siKnotParameterization &out_siParameterization) const
CStatus | GetMultiplicity (double in_dKnotValue, LONG &out_lMultiplicity) const

## Constructor & Destructor Documentation

CKnotArray | ( |  | ) |

Default constructor.

~CKnotArray | ( |  | ) |

Default destructor.

CKnotArray | ( | const CKnotArray & | in_array | ) |

Copy constructor.

Parameters:

  in_array | constant CKnotArray reference object.

CKnotArray | ( | const CRef & | in_ref | ) |

Copy constructor.

Parameters:

  in_ref | constant CKnotArray reference object.

## Member Function Documentation

CKnotArray& operator= | ( | const CKnotArray & | in_obj | ) |

Creates an object from another object. The newly created object is set to empty if the input object is not compatible.

Parameters:

  in_obj | constant class object.

Returns:
  The new CKnotArray object.

CKnotArray& operator= | ( | const CRef & | in_ref | ) |

Creates an object from a reference object. The newly created object is set to empty if the input reference object is not compatible.

Parameters:

  in_ref | constant class object.

Returns:
  The new CKnotArray object.

Reimplemented from SIObject.

bool IsA | ( | siClassID | in_classID | ) | const `[virtual]`

Returns true if a given class type is compatible with the underlying reference object.

Parameters:

  in_classID | Class type.

Returns:
  true if the class is compatible, false otherwise.

Reimplemented from SIObject.

siClassID GetClassID | ( |  | ) | const `[virtual]`

Returns the class type of this array

Returns:
  siClassID Class type of this array.

Reimplemented from SIObject.

double GetItem | ( | LONG | in_index | ) | const

Returns the value of a knot at a given index, if the index is invalid or the CKnotArray is invalid it will return DBL_MAX instead.

Parameters:

  in_index | The index of the Knot.

Returns:
  The Knot value.
  DBL_MAX if the index is invalid or the CKnotArray is invalid

CDoubleArray& GetArray | ( |  | ) | const

Returns an array object containing the knot values.

Returns:
  Array of knot values.

LONG GetCount | ( |  | ) | const

Returns the number of Knot objects in the array.

Returns:
  The number of knot objects.

CStatus GetClosed | ( | bool & | out_bClosed | ) | const

Returns true if the parametric domain is closed.

Return values:

  out_bClosed | Return value.

Returns:
  CStatus::OK success
  CStatus::Fail other failure

CStatus GetDegree | ( | LONG & | out_lDegree | ) | const

Returns the degree.

Return values:

  out_lDegree | returns the degree.

Returns:
  CStatus::OK success
  CStatus::Fail other failure

CStatus GetParameterization | ( | siKnotParameterization & | out_siParameterization | ) | const

Returns the parameterization.

Return values:

  out_siParameterization | The parameterization.

Returns:
  CStatus::OK success
  CStatus::Fail other failure

CStatus GetMultiplicity | ( | double | in_dKnotValue,
|  | LONG & | out_lMultiplicity
| ) |  | const

Returns the multiplicity at a certain knot value.

Parameters:

  in_dKnotValue | The knot value for which we want to know the multiplicity.

Return values:

  out_lMultiplicity | The multiplicity for the given knot value.

Returns:
  CStatus::OK success
  CStatus::Fail other failure

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

- xsi_knot.h