Public Member Functions | Friends

NURBSRuledSurface 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 ruled surface. A ruled surface is generated from two curve sub-objects. It lets you use curves to design the two opposite borders of a surface. Methods are available to get/set the indices of the parent surface in the NURBSSet and the parent Ids and to set the surface normal matching state of the surfaces.

All methods of this class are implemented by the system.

#include <surf_api.h>

Inheritance diagram for NURBSRuledSurface:
Inheritance graph
[legend]

List of all members.

Public Member Functions

DllExport  NURBSRuledSurface (void)
virtual DllExport  ~NURBSRuledSurface (void)
DllExport NURBSRuledSurface operator= (const NURBSRuledSurface &surf)
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)

Friends

class  NURBSSet

Constructor & Destructor Documentation

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

    mType = kNRuledSurface;
    mpObject = NULL;
    mpNSet = NULL;
    for (int i = 0; i < 2; i++)
    {
        mParentId[i] = 0;
        mParentIndex[i] = -1;
        mFlip[i] = FALSE;
        mCurveStartParam[i] = 0.0;
    }
virtual DllExport ~NURBSRuledSurface ( void  ) [virtual]
Remarks:
Destructor.

Member Function Documentation

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

The surface to assign.
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 or 1.

int index

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

The parent number: 0 or 1.

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 or 1.
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 or 1.
DllExport void SetFlip ( int  pnum,
BOOL  flip 
)
Remarks:
This allows one to control the matching of parent surface normals when creating the ruled surface. For example, normally when you create a ruled surface between two parent curves you don't want a 'bow tie' surface (one with the ends rotated 180 degrees so it crosses on itself in the middle). If you simply match the parent normals you'll get a 'bow tie' surface. To prevent this you use this method to set a state indicating that one or the other should be flipped before it's used. In this way, when the ruled surface is created, a 'bow tie' won't occur.
Parameters:
int pnum

The number of the parent curve: 0 or 1.

BOOL flip

TRUE to match the parent surface normal; FALSE to not match it.
DllExport BOOL GetFlip ( int  pnum )
Remarks:
Returns the flip state of the specified parent curve.
Parameters:
int pnum

The number of the parent curve: 0 or 1.
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 number of the parent curve: 0 or 1.

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 number of the parent curve: 0 or 1.
Operators:

Friends And Related Function Documentation

friend class NURBSSet [friend]

NURBSRuledSurface NURBSRuledSurface NURBSRuledSurface NURBSRuledSurface NURBSRuledSurface NURBSRuledSurface NURBSRuledSurface NURBSRuledSurface NURBSRuledSurface NURBSRuledSurface
NURBSRuledSurface NURBSRuledSurface NURBSRuledSurface NURBSRuledSurface NURBSRuledSurface NURBSRuledSurface NURBSRuledSurface NURBSRuledSurface NURBSRuledSurface NURBSRuledSurface