Public Member Functions | Protected Attributes | Friends

NURBSCurve Class Reference

This reference page is linked to from the following overview topics: Modeling, NURBS Curve Classes, Parameter Ranges for Curves and Surfaces, Materials Assignment and Texture Coordinates, Creating Primitive NURBS Objects.


Search for all occurrences

Detailed Description

See also:
Class NURBSObject, Class NURBSTrimPoint.

Description:
This class is available in release 2.0 and later only.

This class describes the properties of a NURBS curve. This includes its number of trim points and its open/closed state. The Evaluate() method is used to compute points on the curve.

All methods of this class are implemented by the system.
Data Members:
protected:

int mMatID;

This data member is available in release 3.0 and later only.

The material ID for the curve.

#include <surf_api.h>

Inheritance diagram for NURBSCurve:
Inheritance graph
[legend]

List of all members.

Public Member Functions

DllExport  NURBSCurve (void)
virtual DllExport  ~NURBSCurve (void)
DllExport NURBSCurve operator= (const NURBSCurve &curve)
DllExport BOOL  IsClosed (void)
DllExport int  NumTrimPoints ()
DllExport NURBSTrimPoint  GetTrimPoint (TimeValue t, int i)
DllExport BOOL  Evaluate (TimeValue t, double u, Point3 &pt, Point3 &tangent)
DllExport void  GetParameterRange (TimeValue t, double &uMin, double &uMax)
DllExport BOOL  GetNURBSData (TimeValue t, int &degree, int &numCVs, NURBSCVTab &cvs, int &numKnots, NURBSKnotTab &knots)
DllExport int  MatID ()
DllExport void  MatID (int id)

Protected Attributes

int  mMatID

Friends

class  NURBSCVCurve
class  NURBSPointCurve
class  NURBSBlendCurve
class  NURBSOffsetCurve
class  NURBSXFormCurve
class  NURBSMirrorCurve
class  NURBSFilletCurve
class  NURBSChamferCurve
class  NURBSIsoCurve
class  NURBSSurfaceEdgeCurve
class  NURBSProjectVectorCurve
class  NURBSProjectNormalCurve
class  NURBSSurfaceNormalCurve
class  NURBSNBlendSurface
class  NURBSRuledSurface
class  NURBSULoftSurface
class  NURBSUVLoftSurface
class  NURBSExtrudeSurface
class  NURBSLatheSurface
class  NURBSCapSurface
class  NURBS1RailSweepSurface
class  NURBS2RailSweepSurface
class  NURBSMultiCurveTrimSurface

Constructor & Destructor Documentation

DllExport NURBSCurve ( void  )
Remarks:
Constructor. The data members are initialized as follows:

mKind = kNURBSCurve;

mMatID = 1;
virtual DllExport ~NURBSCurve ( void  ) [virtual]
Remarks:
Destructor.

Member Function Documentation

DllExport NURBSCurve& operator= ( const NURBSCurve curve )
Remarks:
Assignment operator.
Parameters:
const NURBSCurve& curve

The curve to assign.
DllExport BOOL IsClosed ( void  )
Remarks:
Returns TRUE if the curve is closed; otherwise FALSE.

Reimplemented in NURBSCVCurve, and NURBSPointCurve.

DllExport int NumTrimPoints ( )
Remarks:
Returns the number of trim points in the curve.
DllExport NURBSTrimPoint GetTrimPoint ( TimeValue  t,
int  i 
)
Remarks:
Returns the 'i-th' trim point.
Parameters:
TimeValue t

The time to retrieve the trim point.

int i

The zero based index of the trim point to return.
DllExport BOOL Evaluate ( TimeValue  t,
double  u,
Point3 pt,
Point3 tangent 
)
Remarks:
Retrieves the point along the curve at the specified point and the tangent at that point.
Parameters:
TimeValue t

The time to evaluate the curve.

double u

Specifies the point along the curve to evaluate. This value must be between the uMin and uMax as returned from GetParameterRange().

Point3& pt

The point along the curve is returned here.

Point3& tangent

The tangent at the specified point is returned here.
Returns:
TRUE if the method was able to evaluate the curve; otherwise FALSE.
DllExport void GetParameterRange ( TimeValue  t,
double &  uMin,
double &  uMax 
)
Remarks:
Retrieves the minimum and maximum valid values for u as passed to Evaluate().
Parameters:
TimeValue t

The time to get the parameter range of the curve.

double& uMin

The minimum value is returned here.

double& uMax

The maximum value is returned here.
DllExport BOOL GetNURBSData ( TimeValue  t,
int &  degree,
int &  numCVs,
NURBSCVTab cvs,
int &  numKnots,
NURBSKnotTab knots 
)
Remarks:
Retrieves data about the NURBSCurve at the specified time.
Parameters:
TimeValue t

The time at which to get the NURBS information.

int& degree

The degree of the curve.

int& numCVs

The number of CVs.

NURBSCVTab& cvs

The table of CVs. Note: typedef Tab<NURBSControlVertex> NURBSCVTab;

int& numKnots

The number of knots.

NURBSKnotTab knots

A table of knots in U. Note: typedef Tab<double> NURBSKnotTab;
Returns:
TRUE if the data was retrieved; otherwise FALSE.
DllExport int MatID ( )
Remarks:
Returns the material ID for the curve.
DllExport void MatID ( int  id )
Remarks:
Sets the material ID for the curve.
Parameters:
int id

The ID to set.
Operators:

Friends And Related Function Documentation

friend class NURBSCVCurve [friend]
friend class NURBSPointCurve [friend]
friend class NURBSBlendCurve [friend]
friend class NURBSOffsetCurve [friend]
friend class NURBSXFormCurve [friend]
friend class NURBSMirrorCurve [friend]
friend class NURBSFilletCurve [friend]
friend class NURBSChamferCurve [friend]
friend class NURBSIsoCurve [friend]
friend class NURBSSurfaceEdgeCurve [friend]
friend class NURBSProjectVectorCurve [friend]
friend class NURBSProjectNormalCurve [friend]
friend class NURBSSurfaceNormalCurve [friend]
friend class NURBSNBlendSurface [friend]
friend class NURBSRuledSurface [friend]
friend class NURBSULoftSurface [friend]
friend class NURBSUVLoftSurface [friend]
friend class NURBSExtrudeSurface [friend]
friend class NURBSLatheSurface [friend]
friend class NURBSCapSurface [friend]
friend class NURBS1RailSweepSurface [friend]
friend class NURBS2RailSweepSurface [friend]
friend class NURBSMultiCurveTrimSurface [friend]

Member Data Documentation

int mMatID [protected]

NURBSCurve NURBSCurve NURBSCurve NURBSCurve NURBSCurve NURBSCurve NURBSCurve NURBSCurve NURBSCurve NURBSCurve
NURBSCurve NURBSCurve NURBSCurve NURBSCurve NURBSCurve NURBSCurve NURBSCurve NURBSCurve NURBSCurve NURBSCurve