Public Member Functions
NurbsCurve Class Reference

Detailed Description

The NurbsCurve object gives access to the geometry curves of an X3DObject's primitive.

See also:
NurbsCurveList.GetCurves(), CNurbsCurveRefArray
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_nurbscurve.h>

Inheritance diagram for NurbsCurve:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  NurbsCurve ()
  ~NurbsCurve ()
  NurbsCurve (const CRef &in_ref)
  NurbsCurve (const NurbsCurve &in_obj)
bool  IsA (siClassID in_ClassID) const
siClassID  GetClassID () const
NurbsCurve operator= (const NurbsCurve &in_obj)
NurbsCurve operator= (const CRef &in_ref)
CKnotArray  GetKnots () const
CControlPointRefArray  GetControlPoints () const
CStatus  Get (siNurbsFormat in_siNurbsFormat, CNurbsCurveData &out_curve) const
CStatus  Set (const CNurbsCurveData &in_curve, siNurbsFormat in_siNurbsFormat=siSINurbs)
CStatus  EvaluatePosition (double in_dUValue, MATH::CVector3 &out_vPosition, MATH::CVector3 &out_vTangent, MATH::CVector3 &out_vNormal, MATH::CVector3 &out_vBiNormal) const
CStatus  EvaluateNormalizedPosition (double in_dUNormalizedValue, MATH::CVector3 &out_vPosition, MATH::CVector3 &out_vTangent, MATH::CVector3 &out_vNormal, MATH::CVector3 &out_vBiNormal) const
CStatus  EvaluatePositionFromPercentage (double in_dPercentage, MATH::CVector3 &out_vPosition, MATH::CVector3 &out_vTangent, MATH::CVector3 &out_vNormal, MATH::CVector3 &out_vBiNormal) const
CStatus  GetDegree (LONG &out_lDegree) const
CStatus  GetLength (double &out_dLength) const
CStatus  GetNormalizedUFromU (double in_dUValue, double &out_dNormalizedUValue) const
CStatus  GetUFromNormalizedU (double in_dNormalizedUValue, double &out_dUValue) const
CStatus  GetUFromPercentage (double in_dPercentage, double &out_dUValue) const
CStatus  GetPercentageFromU (double in_dUValue, double &out_dPercentage) const
LONG  GetIndex () const
SubComponent  GetSubComponent () const
NurbsCurve  Navigate (siNavigateComponentType in_siNavigate) const

Constructor & Destructor Documentation

Default constructor.

~NurbsCurve ( )

Default destructor.

NurbsCurve ( const CRef in_ref )

Constructor.

Parameters:
in_ref constant reference object.
NurbsCurve ( const NurbsCurve in_obj )

Copy constructor.

Parameters:
in_obj constant class object.

Member Function Documentation

bool IsA ( siClassID  in_ClassID ) const [virtual]

Returns true if a given class type is compatible with this API class.

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

Reimplemented from SIObject.

siClassID GetClassID ( ) const [virtual]

Returns the type of the API class.

Returns:
The class type.

Reimplemented from SIObject.

NurbsCurve& operator= ( const NurbsCurve 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 NurbsCurve object.
NurbsCurve& 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 NurbsCurve object.

Reimplemented from SIObject.

CKnotArray GetKnots ( ) const

Returns an array of all Knot values on this NurbsCurve object.

Returns:
Array of knots.
CControlPointRefArray GetControlPoints ( ) const

Returns an array of all ControlPoint objects on this NurbsCurve object.

Returns:
Array of ControlPoint objects.
CStatus Get ( siNurbsFormat  in_siNurbsFormat,
CNurbsCurveData out_curve 
) const

Returns a complete data description of a nurbs curve.

Parameters:
in_siNurbsFormat Specifies how the data is formatted.
Return values:
out_curve The entire curve data description.
Returns:
CStatus::OK success
CStatus::Fail other failure
CStatus Set ( const CNurbsCurveData in_curve,
siNurbsFormat  in_siNurbsFormat = siSINurbs 
)

Sets the current description from a complete data description of nurbs curve. This is only available from compiled operators; if you use it on an object with some clusters and you change the topology the burden of updating the clusters is on the user.

Parameters:
in_curve The new data description for this NurbsCurve.
in_siNurbsFormat Specifies how the data is formatted.
Returns:
CStatus::OK success
CStatus::AccessDenied function used outside of a plug-in operator context.
CStatus EvaluatePosition ( double  in_dUValue,
MATH::CVector3 out_vPosition,
MATH::CVector3 out_vTangent,
MATH::CVector3 out_vNormal,
MATH::CVector3 out_vBiNormal 
) const

Returns the Position, Tangent, Normal and BiNormal at a given U value.

Parameters:
in_dUValue The U Value at which we want to evaluate the curve.
Return values:
out_vPosition Position at the given U.
out_vTangent Tangent at the given U.
out_vNormal Normal at the given U.
out_vBiNormal Bi-Normal at the given U.
Returns:
CStatus::OK success
CStatus::Fail other failure
CStatus EvaluateNormalizedPosition ( double  in_dUNormalizedValue,
MATH::CVector3 out_vPosition,
MATH::CVector3 out_vTangent,
MATH::CVector3 out_vNormal,
MATH::CVector3 out_vBiNormal 
) const

Returns the Position, Tangent, Normal and BiNormal at a given normalized U value.

Parameters:
in_dUNormalizedValue The normalized UValue(0.0 to 1.0) at which we want to evaluate the curve.
Return values:
out_vPosition Position at the given U.
out_vTangent Tangent at the given U.
out_vNormal Normal at the given U.
out_vBiNormal Bi-Normal at the given U.
Returns:
CStatus::OK success
CStatus::Fail other failure
CStatus EvaluatePositionFromPercentage ( double  in_dPercentage,
MATH::CVector3 out_vPosition,
MATH::CVector3 out_vTangent,
MATH::CVector3 out_vNormal,
MATH::CVector3 out_vBiNormal 
) const

Returns a 3D vector giving the position, tangent in U direction, normal and bi-normal at a given percentage along the curve.

Parameters:
in_dPercentage The percentange(with values between 0.0 and 100.0 inclusive) of the length of the curve at which we want to evaluate the curve.
Return values:
out_vPosition Position at the given percentage.
out_vTangent Tangent at the given percentage.
out_vNormal Normal at the given percentage.
out_vBiNormal Bi-Normal at the given percentage.
Returns:
CStatus::OK success
CStatus::Fail other failure
CStatus GetDegree ( LONG &  out_lDegree ) const

Returns the degree of the curve.

Return values:
out_lDegree The degree of the curve.
Returns:
CStatus::OK success
CStatus::Fail other failure
CStatus GetLength ( double &  out_dLength ) const

Returns the length of the curve.

Return values:
out_dLength The length of the curve.
Returns:
CStatus::OK success
CStatus::Fail other failure
CStatus GetNormalizedUFromU ( double  in_dUValue,
double &  out_dNormalizedUValue 
) const

Returns the Normalized equivalent of U value.

Parameters:
in_dUValue The UValue from which we want the Normalized equivalent.
Return values:
out_dNormalizedUValue The normalized U value equivalent.
Returns:
CStatus::OK success
CStatus::Fail other failure
CStatus GetUFromNormalizedU ( double  in_dNormalizedUValue,
double &  out_dUValue 
) const

Returns the U actual value equivalent to the specified normalized U value.

Parameters:
in_dNormalizedUValue The normalized UValue(0.0 to 1.0) from which we want the actual value equivalent.
Return values:
out_dUValue The actual U value equivalent.
Returns:
CStatus::OK success
CStatus::Fail other failure
CStatus GetUFromPercentage ( double  in_dPercentage,
double &  out_dUValue 
) const

Returns the U value at a certain percentage along the curve.

Parameters:
in_dPercentage A percentage (with values between 0.0 and 100.0 inclusive) of the length of the curve.
Return values:
out_dUValue The actual U value equivalent.
Returns:
CStatus::OK success
CStatus::Fail other failure
CStatus GetPercentageFromU ( double  in_dUValue,
double &  out_dPercentage 
) const

Returns the percentage (with values between 0.0 and 100.0 inclusive) along the curve at the given U value.

Parameters:
in_dUValue The U value at which we want to evaluate the curve.
Return values:
out_dPercentage The actual U value equivalent.
Returns:
CStatus::OK success
CStatus::Fail other failure
LONG GetIndex ( ) const

Returns the index of the NurbsCurve in the geometry's NurbsCurveList.

Returns:
The NurbsCurve index
-1 if the NurbsCurve object is not initialized.
SubComponent GetSubComponent ( ) const

Creates a SubComponent object from this NurbsCurve object.

Returns:
A SubComponent object.
NurbsCurve Navigate ( siNavigateComponentType  in_siNavigate ) const

Navigates the NurbsCurve objects of the underlying geometry as specifed by the navigation component type. The navigation is circular, therefore if you ask for siNextComponent on the last NurbsCurve it returns the first NurbsCurve.

Parameters:
in_siNavigate Type of direction for navigating the Facet objects.
Returns:
The Point object being visited.

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