Public Member Functions | Friends

NURBSCVSurface Class Reference

This reference page is linked to from the following overview topics: Accessing Details of NURBS Objects, Creating and Retrieving 3ds Max NURBS Objects.


Search for all occurrences

Detailed Description

See also:
Class NURBSSurface.

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

This class defines a surface that uses control vertices (CVs) to describe its shape. The CVs define a control lattice which surrounds the surface. This class has methods to close the surface in U and V, set its order in U and V, set the number of knots and CVs in U and V, and get/set the knots and CVs in U and V. There is also a method to add additional CVs to the surface. The CV surface has a transformation matrix used to position the surface within a NURBSSet.

All methods of this class are implemented by the system.

#include <surf_api.h>

Inheritance diagram for NURBSCVSurface:
Inheritance graph
[legend]

List of all members.

Public Member Functions

DllExport  NURBSCVSurface (void)
virtual DllExport  ~NURBSCVSurface (void)
DllExport NURBSCVSurface operator= (const NURBSCVSurface &surf)
DllExport BOOL  IsRigid ()
DllExport void  SetRigid (BOOL isRigid)
DllExport NURBSAutoParam  AutoParam ()
DllExport void  AutoParam (TimeValue t, NURBSAutoParam param)
DllExport void  Reparameterize (TimeValue t, NURBSParamaterization param)
DllExport void  CloseInU (void)
DllExport void  CloseInV (void)
DllExport void  SetUOrder (int order)
DllExport int  GetUOrder (void)
DllExport int  GetVOrder (void)
DllExport void  SetVOrder (int order)
DllExport void  SetNumUKnots (int num)
DllExport void  SetNumVKnots (int num)
DllExport int  GetNumUKnots (void)
DllExport int  GetNumVKnots (void)
DllExport void  SetNumCVs (int u, int v)
DllExport int  GetNumUCVs (void)
DllExport int  GetNumVCVs (void)
DllExport void  GetNumCVs (int &u, int &v)
DllExport double  GetUKnot (int index)
DllExport double  GetVKnot (int index)
DllExport void  SetUKnot (int index, double value)
DllExport void  SetVKnot (int index, double value)
DllExport NURBSControlVertex GetCV (int u, int v)
DllExport void  SetCV (int u, int v, NURBSControlVertex &cv)
DllExport void  SetTransformMatrix (TimeValue t, SetXFormPacket &mat)
DllExport Matrix3  GetTransformMatrix (TimeValue t)
DllExport void  EdgesOverlap (BOOL &uOverlap, BOOL &vOverlap)
DllExport void  Refine (TimeValue t, double u, double v, int U_V_Both)
DllExport void  Insert (TimeValue t, double u, double v, int U_V_Both)

Friends

class  NURBSSet

Constructor & Destructor Documentation

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

mType = kNCVSurface;

mRigid = FALSE;

mClosedInU = FALSE;

mClosedInV = FALSE;

mpCVs = NULL;

mpUKnots = NULL;

mpVKnots = NULL;

mNumUCVs = 0;

mNumVCVs = 0;

mNumUKnots = 0;

mNumVKnots = 0;

mUOrder = 0;

mVOrder = 0;

mAutoParam = kNotAutomatic;
virtual DllExport ~NURBSCVSurface ( void  ) [virtual]
Remarks:
Destructor.

Member Function Documentation

DllExport NURBSCVSurface& operator= ( const NURBSCVSurface surf )
Remarks:
Assignment operator.
Parameters:
const NURBSCVSurface& surf

The CV surface to assign.
DllExport BOOL IsRigid ( )
Remarks:
Returns TRUE if the surface is 'rigid'; otherwise FALSE.
DllExport void SetRigid ( BOOL  isRigid )
Remarks:
Sets the 'rigid' state of the surface.
Parameters:
BOOL isRigid

TRUE for on; FALSE for off.
DllExport NURBSAutoParam AutoParam ( )
Remarks:
Returns the automatic parameterization setting. See NURBSAutoParam Types.
DllExport void AutoParam ( TimeValue  t,
NURBSAutoParam  param 
)
Remarks:
Sets the automatic parameterization setting at the specified time.
Parameters:
TimeValue t

The time at which to set the parameterization.

NURBSAutoParam param

See NURBSAutoParam Types.
DllExport void Reparameterize ( TimeValue  t,
NURBSParamaterization  param 
)
Remarks:
Sets the reparameterization type at the specified time.
Parameters:
TimeValue t

The time at which to sets the reparameterization type.

NURBSParamaterization param

See nurbParameterizationTypes.
DllExport void CloseInU ( void  )
Remarks:
This method closes the surface in the U direction. The aligns the surface edge to edge in U and sets the tangents to match.
DllExport void CloseInV ( void  )
Remarks:
This method closes the surface in the V direction. The aligns the surface edge to edge in V and sets the tangents to match.
DllExport void SetUOrder ( int  order )
Remarks:
Sets the order of the surface in the U direction.
Parameters:
int order

Specifies the order of the surface in the U direction.
DllExport int GetUOrder ( void  )
Remarks:
Returns the order of the surface in the U direction.
DllExport int GetVOrder ( void  )
Remarks:
Returns the order of the surface in the V direction.
DllExport void SetVOrder ( int  order )
Remarks:
Sets the order of the surface in the V direction.
Parameters:
int order

Specifies the order of the surface in the V direction.
DllExport void SetNumUKnots ( int  num )
Remarks:
Sets the number of knots in the U direction. Note that the knot data is not maintained.
Parameters:
int num

Specifies the number of knots in the U direction.
DllExport void SetNumVKnots ( int  num )
Remarks:
Sets the number of knots in the V direction. Note that the knot data is not maintained.
Parameters:
int num

Specifies the number of knots in the V direction.
DllExport int GetNumUKnots ( void  )
Remarks:
Returns the number of knots in the U direction.
DllExport int GetNumVKnots ( void  )
Remarks:
Returns the number of knots in the V direction.
DllExport void SetNumCVs ( int  u,
int  v 
)
Remarks:
Sets the number of control vertices in both the U and V directions. Note that the CV data is not maintained.
Parameters:
int u

Specifies the number of control vertices in the U direction.

int v

Specifies the number of control vertices in the V direction.
DllExport int GetNumUCVs ( void  )
Remarks:
Returns the number of control vertices in the U direction.
DllExport int GetNumVCVs ( void  )
Remarks:
Returns the number of control vertices in the V direction.
DllExport void GetNumCVs ( int &  u,
int &  v 
)
Remarks:
Returns the number of control vertices in both the U and V directions.
Parameters:
int &u

The number of CVs in the U direction is returned here.

int &v

The number of CVs in the V direction is returned here.
DllExport double GetUKnot ( int  index )
Remarks:
Returns the specified knot value in the U direction.
Parameters:
int index

The 0 based index of the knot value to return.
DllExport double GetVKnot ( int  index )
Remarks:
Returns the specified knot value in the V direction.
Parameters:
int index

The 0 based index of the knot value to return.
DllExport void SetUKnot ( int  index,
double  value 
)
Remarks:
Sets the specified knot in the U direction to the specified value.
Parameters:
int index

The 0 based index of the knot value to set.

double value

The value to set.
DllExport void SetVKnot ( int  index,
double  value 
)
Remarks:
Sets the specified knot in the U direction to the specified value.
Parameters:
int index

The 0 based index of the knot value to set.

double value

The value to set.
DllExport NURBSControlVertex* GetCV ( int  u,
int  v 
)
Remarks:
Returns the specified control vertex of this surface.
Parameters:
int u

The 0 based index in the U direction.

int v

The 0 based index in the V direction.
DllExport void SetCV ( int  u,
int  v,
NURBSControlVertex cv 
)
Remarks:
Sets the specified control vertex.
Parameters:
int u

The 0 based index in the U direction.

int v

The 0 based index in the V direction.

NURBSControlVertex &cv

The control vertex to set.
DllExport void SetTransformMatrix ( TimeValue  t,
SetXFormPacket mat 
)
Remarks:
Sets the transformation matrix for the NURBSCVSurface. This matrix controls the relative position of the surface 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 (specifically if it's being moved, rotated, or scaled). See Class SetXFormPacket.
DllExport Matrix3 GetTransformMatrix ( TimeValue  t )
Remarks:
Returns the transformation matrix of the NURBSCVSurface at the specified time.
Parameters:
TimeValue t

The time at which to retrieve the matrix.
DllExport void EdgesOverlap ( BOOL &  uOverlap,
BOOL &  vOverlap 
)
Remarks:
This method determines if the edges of the surface overlap in U and/or V even though the surface may not be closed (that is, the tangents match at the edges).
Parameters:
BOOL& uOverlap

The U result is returned here: TRUE if the edges overlap in U; otherwise FALSE.

BOOL& vOverlap

The V result is returned here: TRUE if the edges overlap in V; otherwise FALSE.
DllExport void Refine ( TimeValue  t,
double  u,
double  v,
int  U_V_Both 
)
Remarks:
This method adds a control vertex at the specified point on the surface without changing the shape of the surface. The other CV points will move to maintain the current shape. The point may be specified as a U value or a V value, or both.

If you refine in U (U_V_Both = 0) you must specify v

If you refine in V (U_V_Both = 1) you must specify u

If you refine in U and V (U_V_Both = -1) you must specify u and v
Parameters:
TimeValue t

The time at which to refine the surface.

double u

The position for the point in U space.

double v

The position for the point in V space.

int U_V_Both

This value must be 0, 1 or -1.

If 0 the refinement is done in u (and v is specified).

If 1 the refinement is done in v (and u is specified).

If -1 the refinement is done in both u and v (and both u and v must be specified).
DllExport void Insert ( TimeValue  t,
double  u,
double  v,
int  U_V_Both 
)
Remarks:
This method adds a new CV to the surface and changes its shape. The other CVs will not move as they do in Refine(). This method preserves any existing animation of the surface.
Parameters:
TimeValue t

The time at which to refine the surface.

double u

The position for the point in U space.

double v

The position for the point in V space.

int U_V_Both

This value must be 0, 1 or -1.

If 0 the refinement is done in u (and v is specified).

If 1 the refinement is done in v (and u is specified).

If -1 the refinement is done in both u and v (and both u and v must be specified).
Operators:

Friends And Related Function Documentation

friend class NURBSSet [friend]

NURBSCVSurface NURBSCVSurface NURBSCVSurface NURBSCVSurface NURBSCVSurface NURBSCVSurface NURBSCVSurface NURBSCVSurface NURBSCVSurface NURBSCVSurface
NURBSCVSurface NURBSCVSurface NURBSCVSurface NURBSCVSurface NURBSCVSurface NURBSCVSurface NURBSCVSurface NURBSCVSurface NURBSCVSurface NURBSCVSurface