3ds Max C++ API Reference
NURBSCurve Class Reference

#include <surf_api.h>

+ 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 () const
 
DllExport NURBSKind GetKind () const
 
DllExport NURBSId GetId () const
 
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)
 

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

Constructor & Destructor Documentation

◆ NURBSCurve()

Remarks
Constructor. The data members are initialized as follows:

mKind = kNURBSCurve;

mMatID = 1;

◆ ~NURBSCurve()

virtual DllExport ~NURBSCurve ( void  )
virtual
Remarks
Destructor.

Member Function Documentation

◆ operator=()

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

The curve to assign.

◆ IsClosed()

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

◆ NumTrimPoints()

DllExport int NumTrimPoints ( )
Remarks
Returns the number of trim points in the curve.

◆ GetTrimPoint()

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.

◆ Evaluate()

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.

◆ GetParameterRange()

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.

◆ GetNURBSData()

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.

◆ MatID() [1/2]

DllExport int MatID ( )
Remarks
Returns the material ID for the curve.

◆ MatID() [2/2]

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

◆ NURBSCVCurve

friend class NURBSCVCurve ( void  )
friend

◆ NURBSPointCurve

friend class NURBSPointCurve ( void  )
friend

◆ NURBSBlendCurve

friend class NURBSBlendCurve ( void  )
friend

◆ NURBSOffsetCurve

friend class NURBSOffsetCurve ( void  )
friend

◆ NURBSXFormCurve

friend class NURBSXFormCurve ( void  )
friend

◆ NURBSMirrorCurve

friend class NURBSMirrorCurve ( void  )
friend

◆ NURBSFilletCurve

friend class NURBSFilletCurve ( void  )
friend

◆ NURBSChamferCurve

friend class NURBSChamferCurve ( void  )
friend

◆ NURBSIsoCurve

friend class NURBSIsoCurve ( void  )
friend

◆ NURBSSurfaceEdgeCurve

friend class NURBSSurfaceEdgeCurve ( void  )
friend

◆ NURBSProjectVectorCurve

friend class NURBSProjectVectorCurve ( void  )
friend

◆ NURBSProjectNormalCurve

friend class NURBSProjectNormalCurve ( void  )
friend

◆ NURBSSurfaceNormalCurve

friend class NURBSSurfaceNormalCurve ( void  )
friend

◆ NURBSNBlendSurface

friend class NURBSNBlendSurface
friend

◆ NURBSRuledSurface

friend class NURBSRuledSurface
friend

◆ NURBSULoftSurface

friend class NURBSULoftSurface
friend

◆ NURBSUVLoftSurface

friend class NURBSUVLoftSurface
friend

◆ NURBSExtrudeSurface

friend class NURBSExtrudeSurface
friend

◆ NURBSLatheSurface

friend class NURBSLatheSurface
friend

◆ NURBSCapSurface

friend class NURBSCapSurface
friend

◆ NURBS1RailSweepSurface

friend class NURBS1RailSweepSurface
friend

◆ NURBS2RailSweepSurface

friend class NURBS2RailSweepSurface
friend

◆ NURBSMultiCurveTrimSurface

friend class NURBSMultiCurveTrimSurface
friend

Member Data Documentation

◆ mMatID

int mMatID
protected