Public Member Functions | Friends

NURBSULoftSurface Class Reference

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 dependent U Loft surface. A U Loft surface interpolates a surface across multiple curve sub-objects. The curves become U-axis contours of the surface. Methods are available to get/set the number of curves used to make the loft, append curves to the list, get/set the parent ids, and get/set the flipped state for each of the curves.

All methods of this class are implemented by the system.

#include <surf_api.h>

Inheritance diagram for NURBSULoftSurface:
Inheritance graph
[legend]

List of all members.

Public Member Functions

DllExport  NURBSULoftSurface (void)
virtual DllExport  ~NURBSULoftSurface (void)
DllExport NURBSULoftSurface operator= (const NURBSULoftSurface &surf)
DllExport void  SetNumCurves (int num)
DllExport int  GetNumCurves (void)
DllExport int  AppendCurve (int index, BOOL flip, double startpoint=0.0, double tension=0.0, BOOL useTangent=FALSE, BOOL flipTangent=FALSE)
DllExport int  AppendCurve (NURBSId id, BOOL flip, double startpoint=0.0, double tension=0.0, BOOL useTangent=FALSE, BOOL flipTangent=FALSE)
DllExport void  SetParent (int pnum, int index)
DllExport void  SetParentId (int pnum, NURBSId id)
DllExport int  GetParent (int pnum)
DllExport NURBSId  GetParentId (int pnum)
DllExport void  SetFlip (int pnum, BOOL flip)
DllExport BOOL  GetFlip (int pnum)
DllExport void  SetCurveStartPoint (TimeValue t, int pnum, double startpoint)
DllExport double  GetCurveStartPoint (TimeValue t, int pnum)
DllExport void  SetCurveTension (TimeValue t, int pnum, double tension)
DllExport double  GetCurveTension (TimeValue t, int pnum)
DllExport void  SetCurveUseSurfaceTangent (int pnum, BOOL useTangent)
DllExport BOOL  GetCurveUseSurfaceTangent (int pnum)
DllExport void  SetFlipTangent (int pnum, BOOL flipTangent)
DllExport BOOL  GetFlipTangent (int pnum)
DllExport void  SetAutoAlign (BOOL autoalign)
DllExport BOOL  GetAutoAlign ()
DllExport void  SetCloseLoft (BOOL closeLoft)
DllExport BOOL  GetCloseLoft ()

Friends

class  NURBSSet

Constructor & Destructor Documentation

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

mType = kNULoftSurface;

mpObject = NULL;

mpNSet = NULL;

mParentId.SetCount(0);

mParentIndex.SetCount(0);

mFlip.SetCount(0);

mCurveStartParam.SetCount(0);

mTension.SetCount(0);

mUseTangents.SetCount(0);

mFlipTangents.SetCount(0);

mAutoAlign = FALSE;

mCloseLoft = FALSE;
virtual DllExport ~NURBSULoftSurface ( void  ) [virtual]
Remarks:
Destructor.

Member Function Documentation

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

The surface to assign.
DllExport void SetNumCurves ( int  num )
Remarks:
Sets the number of curves used by the U loft.
Parameters:
int num

The number of curves to set.
DllExport int GetNumCurves ( void  )
Remarks:
Returns the number of curves used by the surface.
DllExport int AppendCurve ( int  index,
BOOL  flip,
double  startpoint = 0.0,
double  tension = 0.0,
BOOL  useTangent = FALSE,
BOOL  flipTangent = FALSE 
)
Remarks:
Adds a curve to the end of the list of curves used to make the U loft surface.
Parameters:
int index

The index of the curve to add in the NURBSSet.

BOOL flip

TRUE to flip the orientation of this curve's normal used to build the loft; otherwise FALSE.
Returns:
The number of curves in the list prior to this one being added.
DllExport int AppendCurve ( NURBSId  id,
BOOL  flip,
double  startpoint = 0.0,
double  tension = 0.0,
BOOL  useTangent = FALSE,
BOOL  flipTangent = FALSE 
)
Remarks:
Adds a curve to the end of the list of curves used to make the U loft surface.
Parameters:
NURBSId id

The NURBS id of the curve to add.

BOOL flip

TRUE to flip the orientation of this curve's normal used to build the loft; otherwise FALSE.
DllExport void SetParent ( int  pnum,
int  index 
)
Remarks:
Sets the index in the NURBSSet of the specified parent object.
Parameters:
int pnum

The parent number, 0, 1, 2, etc.

int index

The index into the NURBSSet of the parent surface.
DllExport void SetParentId ( int  pnum,
NURBSId  id 
)
Remarks:
Sets the NURBSId of the specified parent.
Parameters:
int pnum

The parent number, 0, 1, 2, etc.

NURBSId id

The id to set.
DllExport int GetParent ( int  pnum )
Remarks:
Returns the index in the NURBSSet of the specified parent object.
Parameters:
int pnum

The parent number, 0, 1, 2, etc.
DllExport NURBSId GetParentId ( int  pnum )
Remarks:
Returns the NURBSId of the specified parent. Note that a NURBSId won't be valid until the object has been instantiated in the scene
Parameters:
int pnum

The parent number, 0, 1, 2, etc.
DllExport void SetFlip ( int  pnum,
BOOL  flip 
)
Remarks:
This method allows one to control the matching of parent normals when creating the U loft surface.
Parameters:
int pnum

The parent number, 0, 1, 2, etc.

BOOL flip

TRUE to flip the orientation of the normal when building the surface at this curve; otherwise FALSE.
DllExport BOOL GetFlip ( int  pnum )
Remarks:
Returns the flip state of the specified parent normal.
Parameters:
int pnum

The parent number, 0, 1, 2, etc.
DllExport void SetCurveStartPoint ( TimeValue  t,
int  pnum,
double  startpoint 
)
Remarks:
Sets the start point for the specified parent curve. Note: This is only applicable if the parent is a closed curve.
Parameters:
TimeValue t

The time at which to set the start point.

int pnum

The parent number, 0, 1, 2, etc.

double startpoint

The start point in the range 0.0 to 1.0.
DllExport double GetCurveStartPoint ( TimeValue  t,
int  pnum 
)
Remarks:
Returns the start point for the specified parent curve. Note: This is only applicable if the parent is a closed curve.
Parameters:
TimeValue t

The time at which to get the start point.

int pnum

The parent number, 0, 1, 2, etc.
DllExport void SetCurveTension ( TimeValue  t,
int  pnum,
double  tension 
)
Remarks:
Sets the curve tension for the specified parent curve.
Parameters:
TimeValue t

The time at which to set the tension.

int pnum

The parent number, 0, 1, 2, etc.

double tension

The tension value to set.
DllExport double GetCurveTension ( TimeValue  t,
int  pnum 
)
Remarks:
Returns the tension setting of the specified parent curve at the specified time.
Parameters:
TimeValue t

The time at which to get the tension.

int pnum

The parent number, 0, 1, 2, etc.
DllExport void SetCurveUseSurfaceTangent ( int  pnum,
BOOL  useTangent 
)
Remarks:
Sets the curve use surface tangent setting. If the curve is a curve on surface, turning this on causes the U loft to use the tangency of the surface. This can help blend a loft smoothly onto a surface.
Parameters:
int pnum

The parent number, 0, 1, 2, etc.

BOOL useTangent

TRUE to use the tangent; otherwise FALSE.
DllExport BOOL GetCurveUseSurfaceTangent ( int  pnum )
Remarks:
Returns TRUE if the curve use surface tangent setting is on; FALSE if off.
Parameters:
int pnum

The parent number, 0, 1, 2, etc.
DllExport void SetFlipTangent ( int  pnum,
BOOL  flipTangent 
)
Remarks:
Sets the flip tangent setting for the specified parent curve.
Parameters:
int pnum

The parent number, 0, 1, 2, etc.

BOOL flipTangent

TRUE to flip the tangent; otherwise FALSE.
DllExport BOOL GetFlipTangent ( int  pnum )
Remarks:
Returns TRUE if the tangent is flipped for the specified parent curve; otherwise FALSE.
Parameters:
int pnum

The parent number, 0, 1, 2, etc.
DllExport void SetAutoAlign ( BOOL  autoalign )
Remarks:
Sets if auto align is on or off.
Parameters:
BOOL autoalign

TRUE for on; FALSE for off.
DllExport BOOL GetAutoAlign ( )
Remarks:
Returns TRUE if auto align is on; otherwise FALSE.
DllExport void SetCloseLoft ( BOOL  closeLoft )
Remarks:
Sets if the loft is closed or not.
Parameters:
BOOL closeLoft

TRUE for closed; FALSE for open.
DllExport BOOL GetCloseLoft ( )
Remarks:
Returns TRUE if loft is closed; otherwise FALSE.
Operators:

Friends And Related Function Documentation

friend class NURBSSet [friend]

NURBSULoftSurface NURBSULoftSurface NURBSULoftSurface NURBSULoftSurface NURBSULoftSurface NURBSULoftSurface NURBSULoftSurface NURBSULoftSurface NURBSULoftSurface NURBSULoftSurface
NURBSULoftSurface NURBSULoftSurface NURBSULoftSurface NURBSULoftSurface NURBSULoftSurface NURBSULoftSurface NURBSULoftSurface NURBSULoftSurface NURBSULoftSurface NURBSULoftSurface