#include <xsi_nurbscurve.h>
The NurbsCurve object gives access to the geometry curves of an X3DObject's primitive.
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);
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 |
NurbsCurve | ( | ) |
Default constructor.
~NurbsCurve | ( | ) |
Default destructor.
NurbsCurve | ( | const CRef & | in_ref | ) |
Constructor.
in_ref | constant reference object. |
NurbsCurve | ( | const NurbsCurve & | in_obj | ) |
Copy constructor.
in_obj | constant class object. |
bool IsA | ( | siClassID | in_ClassID | ) | const [virtual] |
Returns true if a given class type is compatible with this API class.
in_ClassID | class type. |
Reimplemented from SIObject.
siClassID GetClassID | ( | ) | const [virtual] |
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.
in_obj | constant class 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.
in_ref | constant class object. |
Reimplemented from SIObject.
CKnotArray GetKnots | ( | ) | const |
Returns an array of all Knot values on this NurbsCurve object.
CControlPointRefArray GetControlPoints | ( | ) | const |
Returns an array of all ControlPoint objects on this NurbsCurve object.
CStatus Get | ( | siNurbsFormat | in_siNurbsFormat, |
CNurbsCurveData & | out_curve | ||
) | const |
Returns a complete data description of a nurbs curve.
in_siNurbsFormat | Specifies how the data is formatted. |
out_curve | The entire curve data description. |
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.
in_curve | The new data description for this NurbsCurve. |
in_siNurbsFormat | Specifies how the data is formatted. |
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.
in_dUValue | The U Value at which we want to evaluate the curve. |
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. |
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.
in_dUNormalizedValue | The normalized UValue(0.0 to 1.0) at which we want to evaluate the curve. |
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. |
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.
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. |
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. |
CStatus GetDegree | ( | LONG & | out_lDegree | ) | const |
Returns the degree of the curve.
out_lDegree | The degree of the curve. |
CStatus GetLength | ( | double & | out_dLength | ) | const |
Returns the length of the curve.
out_dLength | The length of the curve. |
CStatus GetNormalizedUFromU | ( | double | in_dUValue, |
double & | out_dNormalizedUValue | ||
) | const |
Returns the Normalized equivalent of U value.
in_dUValue | The UValue from which we want the Normalized equivalent. |
out_dNormalizedUValue | The normalized U value equivalent. |
CStatus GetUFromNormalizedU | ( | double | in_dNormalizedUValue, |
double & | out_dUValue | ||
) | const |
Returns the U actual value equivalent to the specified normalized U value.
in_dNormalizedUValue | The normalized UValue(0.0 to 1.0) from which we want the actual value equivalent. |
out_dUValue | The actual U value equivalent. |
CStatus GetUFromPercentage | ( | double | in_dPercentage, |
double & | out_dUValue | ||
) | const |
Returns the U value at a certain percentage along the curve.
in_dPercentage | A percentage (with values between 0.0 and 100.0 inclusive) of the length of the curve. |
out_dUValue | The actual U value equivalent. |
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.
in_dUValue | The U value at which we want to evaluate the curve. |
out_dPercentage | The actual U value equivalent. |
LONG GetIndex | ( | ) | const |
Returns the index of the NurbsCurve in the geometry's NurbsCurveList.
SubComponent GetSubComponent | ( | ) | const |
Creates a SubComponent object from this NurbsCurve 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.
in_siNavigate | Type of direction for navigating the Facet objects. |