NURBSCurve Class Reference

#include <surf_api.h>

Class Description

See also
Class NURBSObject, Class NURBSTrimPoint.

Description:
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.
+ Inheritance diagram for NURBSCurve:

Public Member Functions

DllExport NURBSCurve (void)
 
virtual DllExport ~NURBSCurve (void)
 
DllExport NURBSCurveoperator= (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)
 
- Public Member Functions inherited from NURBSObject
DllExport NURBSObject (void)
 
virtual DllExport ~NURBSObject (void)
 
DllExport NURBSObjectoperator= (const NURBSObject &pt)
 
DllExport void SetName (const MCHAR *name)
 
DllExport const MCHARGetName (void)
 
DllExport NURBSType GetType ()
 
DllExport NURBSKind GetKind ()
 
DllExport NURBSId GetId ()
 
DllExport void SetId (NURBSId id)
 
DllExport void SetNSet (NURBSSet *nset)
 
DllExport void SetObject (Object *object)
 
DllExport ObjectGetMAXObject ()
 
DllExport NURBSSetGetNSet ()
 
DllExport int GetIndex ()
 
DllExport BOOL IsSelected ()
 
DllExport void SetSelected (BOOL set)
 

Protected Attributes

int mMatID
 
- Protected Attributes inherited from NURBSObject
MCHAR mName [NURBS_NAME_SIZE]
 
NURBSType mType
 
NURBSKind mKind
 
NURBSId mId
 
ObjectmpObject
 
NURBSSetmpNSet
 
BOOL mSelected
 

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
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 
- Protected Member Functions inherited from NURBSObject
DllExport void Clean (NURBSIdTab ids)
 

Constructor & Destructor Documentation

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.
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