Public Member Functions | Friends

NURBSPointSurface Class Reference

Search for all occurrences

Detailed Description

See also:
Class NURBSSurface, Class NURBSIndependentPoint.

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

This class defines a surface that uses points to describe its shape. This class has methods to close the surface in U and V, set the number of points in U and V, and get/set the points in U and V. There is also a method to add additional points to the surface. The point surface has a transformation matrix used to set the relative position of the surface in a NURBSSet.

All methods of this class are implemented by the system.

#include <surf_api.h>

Inheritance diagram for NURBSPointSurface:
Inheritance graph
[legend]

List of all members.

Public Member Functions

DllExport  NURBSPointSurface (void)
virtual DllExport  ~NURBSPointSurface (void)
DllExport NURBSPointSurface operator= (const NURBSPointSurface &surf)
DllExport void  CloseInU (void)
DllExport void  CloseInV (void)
DllExport void  SetNumPts (int u, int v)
DllExport int  GetNumUPts (void)
DllExport int  GetNumVPts (void)
DllExport void  GetNumPts (int &u, int &v)
DllExport NURBSIndependentPoint GetPoint (int u, int v)
DllExport void  SetPoint (int u, int v, NURBSIndependentPoint &pt)
DllExport void  SetTransformMatrix (TimeValue t, SetXFormPacket &mat)
DllExport Matrix3  GetTransformMatrix (TimeValue t)
DllExport void  Refine (TimeValue t, double u, double v, int U_V_Both)

Friends

class  NURBSSet

Constructor & Destructor Documentation

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

mType = kNPointSurface;

mClosedInU = FALSE;

mClosedInV = FALSE;

mpPts = NULL;
virtual DllExport ~NURBSPointSurface ( void  ) [virtual]
Remarks:
Destructor. Any allocated points are deleted.

Member Function Documentation

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

The surface to assign.
DllExport void CloseInU ( void  )
Remarks:
This method closes the surface in the U direction.
DllExport void CloseInV ( void  )
Remarks:
This method closes the surface in the V direction.
DllExport void SetNumPts ( int  u,
int  v 
)
Remarks:
Sets the number of points in the surface in the U and V directions. Any previously allocated points are not maintained when the new number is set. Note, if any of the u and v parameters are 1 or less, the method will return and do nothing.
Parameters:
u The number of points in U. Valid values are 2 and higher.
v The number of points in V. Valid values are 2 and higher.
DllExport int GetNumUPts ( void  )
Remarks:
Returns the number of points in the U direction.
DllExport int GetNumVPts ( void  )
Remarks:
Returns the number of points in the V direction.
DllExport void GetNumPts ( int &  u,
int &  v 
)
Remarks:
Retrieves the number of points in both the U and V directions.
Parameters:
int &u

The number in U is stored here.

int &v

The number in V is stored here.
DllExport NURBSIndependentPoint* GetPoint ( int  u,
int  v 
)
Remarks:
Returns a pointer to the specified point in the surface.
Parameters:
int u

The zero based index of the point in the U direction.

int v

The zero based index of the point in the V direction.
DllExport void SetPoint ( int  u,
int  v,
NURBSIndependentPoint pt 
)
Remarks:
Sets the specified point in the surface to the point passed.
Parameters:
int u

The zero based index of the point in the U direction.

int v

The zero based index of the point in the V direction.

NURBSIndependentPoint& pt

The point to set.
DllExport void SetTransformMatrix ( TimeValue  t,
SetXFormPacket mat 
)
Remarks:
Sets the transformation matrix for the NURBSPointSurface. This 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. See Class SetXFormPacket.
DllExport Matrix3 GetTransformMatrix ( TimeValue  t )
Remarks:
Returns the transformation matrix of the NURBSPointSurface at the specified time.
Parameters:
TimeValue t

The time at which to retrieve the matrix.
DllExport void Refine ( TimeValue  t,
double  u,
double  v,
int  U_V_Both 
)
Remarks:
This method adds a new point at the specified location on the surface without changing the shape of the surface. The location 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 location for the point in U space (range 0.0 to 1.0).

double v

The location for the point in V space (range 0.0 to 1.0).

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]

NURBSPointSurface NURBSPointSurface NURBSPointSurface NURBSPointSurface NURBSPointSurface NURBSPointSurface NURBSPointSurface NURBSPointSurface NURBSPointSurface NURBSPointSurface
NURBSPointSurface NURBSPointSurface NURBSPointSurface NURBSPointSurface NURBSPointSurface NURBSPointSurface NURBSPointSurface NURBSPointSurface NURBSPointSurface NURBSPointSurface