3ds Max C++ API Reference
Loading...
Searching...
No Matches
NURBSPointCurve Class Reference

#include <surf_api.h>

+ Inheritance diagram for NURBSPointCurve:

Public Member Functions

DllExport NURBSPointCurve (void)
 
virtual DllExport ~NURBSPointCurve (void)
 
DllExport NURBSPointCurveoperator= (const NURBSPointCurve &curve)
 
DllExport void Close (void)
 
DllExport BOOL IsClosed (void)
 
DllExport void SetNumPts (int num)
 
DllExport int GetNumPts (void)
 
DllExport void GetNumPts (int &num)
 
DllExport NURBSIndependentPointGetPoint (int index)
 
DllExport void SetPoint (int index, NURBSIndependentPoint &pt)
 
DllExport void SetTransformMatrix (TimeValue t, const SetXFormPacket &xPack)
 
DllExport Matrix3 GetTransformMatrix (TimeValue t)
 
DllExport void Refine (TimeValue t, double u)
 
- Public Member Functions inherited from NURBSCurve
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

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

Friends

class NURBSSet
 

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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator.
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator.
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary.
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary.
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc.
 
- Protected Member Functions inherited from NURBSObject
DllExport void Clean (NURBSIdTab ids)
 

Detailed Description

See also
Class NURBSCurve, Class NURBSIndependentPoint.

Description:
This class defines a curve that uses points to describe its shape. All the points lie on the curve itself. There are methods to get/set the number of points in the curve, get/set the points themselves, refine the curve (add points without changing its shape), and to get/set the transformation matrix used by the curve. This matrix is used to set the postion of the curve in the NURBSSet.

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

NURBSIndependentPoint *mpPts;

Array of independent points.

BOOL mClosed;

TRUE if the curve is closed; otherwise FALSE.

int mNumPts;

The number of independent points.

Constructor & Destructor Documentation

◆ NURBSPointCurve()

Remarks
Constructor. The data members are initialized as follows:

mType = kNPointCurve;

mClosed = FALSE;

mpPts = NULL;

◆ ~NURBSPointCurve()

virtual DllExport ~NURBSPointCurve ( void  )
virtual
Remarks
Destructor. If any points were allocated they are freed and the cache is cleared.

Member Function Documentation

◆ operator=()

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

The curve to assign.

◆ Close()

DllExport void Close ( void  )
Remarks
Closes the point curve.

◆ IsClosed()

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

◆ SetNumPts()

DllExport void SetNumPts ( int  num)
Remarks
Sets the number of points in the point curve. Note that any previous point data is not maintained when the new number is set.
Parameters:
int num

The number of points in the curve.

◆ GetNumPts() [1/2]

DllExport int GetNumPts ( void  )
Remarks
Returns the number of points in the curve.

◆ GetNumPts() [2/2]

DllExport void GetNumPts ( int num)
Remarks
Retrieves the number of points in the curve.
Parameters:
int &num

The result is stored here.

◆ GetPoint()

DllExport NURBSIndependentPoint * GetPoint ( int  index)
Remarks
Returns a pointer to the specified point.
Parameters:
int index

The zero based index of the point to get.

◆ SetPoint()

DllExport void SetPoint ( int  index,
NURBSIndependentPoint pt 
)
Remarks
Sets the specified point in the curve.
Parameters:
int index

The zero based index of the point to set.

NURBSIndependentPoint &pt

The point to set.

◆ SetTransformMatrix()

DllExport void SetTransformMatrix ( TimeValue  t,
const SetXFormPacket xPack 
)
Remarks
Sets the transformation matrix for the NURBSPointCurve. This controls the relative position of the item within a NURBSSet.
Parameters:
TimeValue t

The time at which to set the matrix.

SetXFormPacket& xPack

An instance of the XFormPacket class that describes the properties of the transformation. See Class SetXFormPacket.

◆ GetTransformMatrix()

DllExport Matrix3 GetTransformMatrix ( TimeValue  t)
Remarks
Returns the transformation matrix that controls the relative position of the point curve in the NURBSSet.
Parameters:
TimeValue t

The time at which to return the matrix.

◆ Refine()

DllExport void Refine ( TimeValue  t,
double  u 
)
Remarks
This method adds a new point at the specified location on the curve without changing its shape. The point is specified as a distance in U parameter space. Note that calling this method causes all animation of the curve to be removed.
Parameters:
TimeValue t

The time at which to refine the curve. The curve may be animated, and thus the underlying parameter space may be changing. So when the u value is specified it must relate to the curve at a specific time.

double u

The point at which to refine the curve. Developers should use the method NURBSCurve::GetParameterRange() to get the valid range of values that may be passed here.
Operators:

Friends And Related Function Documentation

◆ NURBSSet

friend class NURBSSet
friend

Member Data Documentation

◆ mpPts

NURBSIndependentPoint* mpPts
protected

◆ mClosed

BOOL mClosed
protected

◆ mNumPts

int mNumPts
protected