3ds Max C++ API Reference
NURBS1RailSweepSurface Class Reference

#include <surf_api.h>

+ Inheritance diagram for NURBS1RailSweepSurface:

Public Member Functions

DllExport NURBS1RailSweepSurface (void)
 
virtual DllExport ~NURBS1RailSweepSurface (void)
 
DllExport NURBS1RailSweepSurfaceoperator= (const NURBS1RailSweepSurface &surf)
 
DllExport void SetParentRail (int index)
 
DllExport void SetParentRailId (NURBSId id)
 
DllExport int GetParentRail ()
 
DllExport NURBSId GetParentRailId ()
 
DllExport void SetNumCurves (int num)
 
DllExport int GetNumCurves (void)
 
DllExport int AppendCurve (int index, BOOL flip, double startpoint=0.0)
 
DllExport int AppendCurve (NURBSId id, BOOL flip, double startpoint=0.0)
 
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 SetParallel (BOOL para)
 
DllExport BOOL GetParallel ()
 
DllExport void SetCurveStartPoint (TimeValue t, int pnum, double startpoint)
 
DllExport double GetCurveStartPoint (TimeValue t, int pnum)
 
DllExport void SetSnapCS (BOOL snapCS)
 
DllExport BOOL GetSnapCS ()
 
DllExport void SetRoadlike (BOOL roadlike)
 
DllExport BOOL GetRoadlike ()
 
DllExport void SetAxis (TimeValue t, Matrix3 &ray)
 
DllExport Matrix3GetAxis (TimeValue t)
 
- Public Member Functions inherited from NURBSSurface
voidGetSurfCache ()
 
const voidGetSurfCache () const
 
void SetSurfCache (void *pCache)
 
DllExport NURBSSurface (void)
 
virtual DllExport ~NURBSSurface (void)
 
DllExport NURBSSurfaceoperator= (const NURBSSurface &surf)
 
DllExport BOOL Renderable ()
 
DllExport void Renderable (BOOL state)
 
DllExport BOOL FlipNormals ()
 
DllExport void FlipNormals (BOOL state)
 
DllExport BOOL GenerateUVs (int channel=0)
 
DllExport void SetGenerateUVs (BOOL state, int channel=0)
 
DllExport int MatID ()
 
DllExport void MatID (int id)
 
DllExport Point2 GetTextureUVs (TimeValue t, int i, int channel=0)
 
DllExport void SetTextureUVs (TimeValue t, int i, Point2 pt, int channel=0)
 
DllExport void GetTileOffset (TimeValue t, float &ut, float &vt, float &uo, float &vo, float &a, int channel=0)
 
DllExport void SetTileOffset (TimeValue t, float ut, float vt, float uo, float vo, float a, int channel=0)
 
DllExport NURBSTextureSurfaceGetTextureSurface (int channel)
 
DllExport void SetTextureSurface (int channel, NURBSTextureSurface &texSurf)
 
DllExport int NumChannels ()
 
DllExport int GetChannelFromIndex (int index)
 
DllExport BOOL IsClosedInU (void)
 
DllExport BOOL IsClosedInV (void)
 
DllExport BOOL Evaluate (TimeValue t, double u, double v, Point3 &pt, Point3 &dPdU, Point3 &dPdV) const
 
DllExport BOOL Evaluate (TimeValue t, double u, double v, Point3 &pt, Point3 &dPdU, Point3 &dPdV, Point3 &d2PdU2, Point3 &d2PdV2, Point3 &d2PdUdV) const
 
DllExport void GetParameterRange (TimeValue t, double &uMin, double &uMax, double &vMin, double &vMax) const
 
DllExport BOOL GetNURBSData (TimeValue t, int &degreeInU, int &degreeInV, int &numInU, int &numInV, NURBSCVTab &cvs, int &numKnotsInU, int &numKnotsInV, NURBSKnotTab &uKnots, NURBSKnotTab &vKnots)
 
DllExport BOOL GetCLPTextureSurfaceData (TimeValue t, int channel, int &degreeInU, int &degreeInV, int &numInU, int &numInV, NURBSCVTab &cvs, int &numKnotsInU, int &numKnotsInV, NURBSKnotTab &uKnots, NURBSKnotTab &vKnots)
 
DllExport int NumTrimLoops (TimeValue t)
 
DllExport int NumCurvesInLoop (TimeValue t, int loop)
 
DllExport BOOL Get2dTrimCurveData (TimeValue t, int loop, int curve, int &degree, int &numCVs, NURBSCVTab &cvs, int &numKnots, NURBSKnotTab &knots)
 
DllExport BOOL Get3dTrimCurveData (TimeValue t, int loop, int curve, int &degree, int &numCVs, NURBSCVTab &cvs, int &numKnots, NURBSKnotTab &knots)
 
DllExport TessApproxGetProdTess (NURBSTessType type=kNTessSurface)
 
DllExport TessApproxGetViewTess (NURBSTessType type=kNTessSurface)
 
DllExport void SetProdTess (TessApprox &tess, NURBSTessType type=kNTessSurface)
 
DllExport void SetViewTess (TessApprox &tess, NURBSTessType type=kNTessSurface)
 
DllExport void ClearViewTess (NURBSTessType type=kNTessSurface)
 
DllExport void ClearProdTess (NURBSTessType type=kNTessSurface)
 
- 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)
 

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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 
- Protected Member Functions inherited from NURBSObject
DllExport void Clean (NURBSIdTab ids)
 
- Protected Attributes inherited from NURBSSurface
NURBSTextureChannelSet mTextureChannelSet
 
BOOL mFlipNormals
 
BOOL mRenderable
 
int mMatID
 
BOOL mClosedInU
 
BOOL mClosedInV
 
TessApproxmpVTess
 
TessApproxmpRTess
 
TessApproxmpRTessDisp
 
TessApproxmpVTessCurve
 
TessApproxmpRTessCurve
 
voidmpSurfCache
 
- Protected Attributes inherited from NURBSObject
MCHAR mName [NURBS_NAME_SIZE]
 
NURBSType mType
 
NURBSKind mKind
 
NURBSId mId
 
ObjectmpObject
 
NURBSSetmpNSet
 
BOOL mSelected
 

Detailed Description

See also
Class NURBSSurface.

Description:
This class provides access to the 1-Rail Sweep Surface. A 1-Rail Sweep Surface uses at least two curves. One curve, the "rail," defines one edge of the surface. The other curves define the surface's cross sections. The cross-section curves should intersect the rail curve. If the cross sections don't intersect the rail, the resulting surface is unpredicable.

Constructor & Destructor Documentation

◆ NURBS1RailSweepSurface()

Remarks
Constructor. The data members are initialized as follows:

mType = kN1RailSweepSurface;

mpObject = NULL;

mpNSet = NULL;

mRailId = NULL;

mRailIndex = -1;

mParentId.SetCount(0);

mParentIndex.SetCount(0);

mFlip.SetCount(0);

mCurveStartParam.SetCount(0);

mSnapCrossSections = FALSE;

mRoadlike = FALSE;

mXForm.IdentityMatrix();

◆ ~NURBS1RailSweepSurface()

virtual DllExport ~NURBS1RailSweepSurface ( void  )
virtual
Remarks
Destructor.

Member Function Documentation

◆ operator=()

Remarks
Assignment operator.
Parameters:
const NURBS1RailSweepSurface& surf

The surface to assign.

◆ SetParentRail()

DllExport void SetParentRail ( int  index)
Remarks
Establishes the curve to use as the rail by specifying its index in the NURBSSet.
Parameters:
int index

The index in the NURBSSet.

◆ SetParentRailId()

DllExport void SetParentRailId ( NURBSId  id)
Remarks
Establishes the curve to use as the rail by specifying its NURBSId.
Parameters:
NURBSId id

The id of the rail curve to use.

◆ GetParentRail()

DllExport int GetParentRail ( )
Remarks
Returns the index in the NURBSSet of the rail curve.

◆ GetParentRailId()

DllExport NURBSId GetParentRailId ( )
Remarks
Returns the NURBSId of the rail curve.

◆ SetNumCurves()

DllExport void SetNumCurves ( int  num)
Remarks
Sets the number of cross-section curves.
Parameters:
int num

The number of cross-section curves to use.

◆ GetNumCurves()

DllExport int GetNumCurves ( void  )
Remarks
Returns the number of cross-section curves used.

◆ AppendCurve() [1/2]

DllExport int AppendCurve ( int  index,
BOOL  flip,
double  startpoint = 0.0 
)
Remarks
Adds a curve to the end of the list of cross-section curves by specifying the index in the NURBSSet.
Parameters:
int index

The index in the NURBSSet of the cross-section curve to append.

BOOL flip

TRUE to reverse (or flip) the direction of the curve; FALSE to use the non-reversed orientation.
Returns
The number of cross-section curves prior to appending.

◆ AppendCurve() [2/2]

DllExport int AppendCurve ( NURBSId  id,
BOOL  flip,
double  startpoint = 0.0 
)
Remarks
Adds a curve to the end of the list of cross-section curves by specifying a NURBSId.
Parameters:
NURBSId id

Specifies the cross-section curve to append.

BOOL flip

TRUE to reverse (or flip) the direction of the curve; FALSE to use the non-reversed orientation.
Returns
The number of cross-section curves prior to appending.

◆ SetParent()

DllExport void SetParent ( int  pnum,
int  index 
)
Remarks
Specifies the curve to use as a cross-section via its index in the NURBSSet.
Parameters:
int pnum

The zero based index of the curve to set.

int index

The index in the NURBSSet of the curve.

◆ SetParentId()

DllExport void SetParentId ( int  pnum,
NURBSId  id 
)
Remarks
Specifies the curve to use as a cross-section via its NURBSId.
Parameters:
int pnum

The zero based index of the curve to set.

NURBSId id

The id of the curve.

◆ GetParent()

DllExport int GetParent ( int  pnum)
Remarks
Returns the index in the NURBSSet of the specified cross-section curve.
Parameters:
int pnum

The zero based index of the curve to get.

◆ GetParentId()

DllExport NURBSId GetParentId ( int  pnum)
Remarks
Returns the NURBSId of the specified cross-section curve.
Parameters:
int pnum

The zero based index of the curve to get.

◆ SetFlip()

DllExport void SetFlip ( int  pnum,
BOOL  flip 
)
Remarks
Sets the reversed (or flipped) state of the specified cross-section curve.
Parameters:
int pnum

The zero based index of the curve.

BOOL flip

TRUE to reverse the direction; FALSE for the normal direction.

◆ GetFlip()

DllExport BOOL GetFlip ( int  pnum)
Remarks
Returns the reversed (or flipped) state of the specified cross-section curve. TRUE is reversed; FALSE is not.
Parameters:
int pnum

The zero based index of the curve.

◆ SetParallel()

DllExport void SetParallel ( BOOL  para)
Remarks
Sets the state of the parallel flag. When on, it ensures that the sweep surface's normal is parallel to the rail.
Parameters:
BOOL para

TRUE for on; FALSE for off.

◆ GetParallel()

DllExport BOOL GetParallel ( )
Remarks
Returns the state of the parallel flag. When TRUE, 3ds Max ensures that the sweep surface's normal is parallel to the rail.

◆ SetCurveStartPoint()

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 zero based index of the curve in the set of cross sections.

double startpoint

The start point in the range 0.0 to 1.0.

◆ GetCurveStartPoint()

DllExport double GetCurveStartPoint ( TimeValue  t,
int  pnum 
)
Remarks
Returns the start point of the specified parent curve.
Parameters:
TimeValue t

The time at which to get the start point.

int pnum

The zero based index of the curve in the set of cross sections.

◆ SetSnapCS()

DllExport void SetSnapCS ( BOOL  snapCS)
Remarks
Sets the snap cross sections setting. When on, cross-section curves are translated so they intersect the rail.
Parameters:
BOOL snapCS

TRUE for on; FALSE for off.

◆ GetSnapCS()

DllExport BOOL GetSnapCS ( )
Remarks
Returns TRUE if snap to Cross Section is on; otherwise FALSE.

◆ SetRoadlike()

DllExport void SetRoadlike ( BOOL  roadlike)
Remarks
Sets the roadlike setting to on or off. When on, the sweep uses a constant up-vector so the cross sections twist uniformly as they travel along the rail. In other words, the cross sections bank like a car following a road, or a camera following a path controller in 3ds Max.
Parameters:
BOOL roadlike

TRUE for on; FALSE for off.

◆ GetRoadlike()

DllExport BOOL GetRoadlike ( )
Remarks
Returns TRUE if the roadlike setting is on; otherwise FALSE.

◆ SetAxis()

DllExport void SetAxis ( TimeValue  t,
Matrix3 ray 
)
Remarks
Sets the axis of the sweep.
Parameters:
TimeValue t

The time at which to set the axis.

Matrix3& ray

The axis system to set.

◆ GetAxis()

DllExport Matrix3& GetAxis ( TimeValue  t)
Remarks
Returns the axis of the sweep.
Parameters:
TimeValue t

The time at which to get the axis.
Operators:

Friends And Related Function Documentation

◆ NURBSSet

friend class NURBSSet
friend