torque Torque Game Engine Documentation
TGE Version 1.5.2

SplinePatch Class Reference

#include <mSplinePatch.h>

Inheritance diagram for SplinePatch:

Inheritance graph
[legend]

Detailed Description

Base class for spline patches.

The only child of this class is QuadPatch.

Spline utility class for drawing nice pretty splines. In order to draw a spline, you need to create a SplCtrlPts data structure, which contains all control points on the spline. See SplCtrlPts for more information on how to submit points to the spline utility. Next, submit the SplCtrlPts structure to the spline utility.

 SplinePatch patch;
 patch.submitControlPoints(ctrlPts);
Next, use the SplineUtil namespace to draw your spline.
 SplineUtil::drawSplineBeam(camPos, numSegments, width, patch[, uvOffset, numTexRep]);

You can also create a SplineBeamInfo structure (SplineUtil::SplineBeamInfo) and just pass the SplineBeamInfo structure to the SplineUtil::drawSplineBeam function.

See also:
SplCtrlPts

SplineUtil


Public Member Functions

 SplinePatch ()
U32 getNumReqControlPoints ()
const SplCtrlPtsgetControlPoints ()
const Point3FgetControlPoint (U32 index)
virtual void setControlPoint (Point3F &point, int index)
virtual void submitControlPoints (SplCtrlPts &points)
 If you have a preconstructed "SplCtrlPts" class, submit it with this function.
virtual void calc (F32 t, Point3F &result)=0
 Recalc function.
virtual void calc (Point3F *points, F32 t, Point3F &result)=0
 Recalc function.

Protected Member Functions

void setNumReqControlPoints (U32 numPts)

Private Attributes

U32 mNumReqControlPoints
SplCtrlPts mControlPoints


Constructor & Destructor Documentation

SplinePatch::SplinePatch (  ) 


Member Function Documentation

void SplinePatch::setNumReqControlPoints ( U32  numPts  )  [inline, protected]

U32 SplinePatch::getNumReqControlPoints (  )  [inline]

const SplCtrlPts* SplinePatch::getControlPoints (  )  [inline]

const Point3F* SplinePatch::getControlPoint ( U32  index  )  [inline]

virtual void SplinePatch::setControlPoint ( Point3F point,
int  index 
) [virtual]

Reimplemented in QuadPatch.

virtual void SplinePatch::submitControlPoints ( SplCtrlPts points  )  [inline, virtual]

If you have a preconstructed "SplCtrlPts" class, submit it with this function.

See also:
SplCtrlPts

Reimplemented in QuadPatch.

virtual void SplinePatch::calc ( F32  t,
Point3F result 
) [pure virtual]

Recalc function.

Do not call this ever - only SplineUtil needs this.

See also:
SplineUtil

Implemented in QuadPatch.

virtual void SplinePatch::calc ( Point3F points,
F32  t,
Point3F result 
) [pure virtual]

Recalc function.

Do not call this ever - only SplineUtil needs this.

See also:
SplineUtil

Implemented in QuadPatch.


Field Documentation




All Rights Reserved GarageGames.com, Inc. 1999-2005
Auto-magically Generated with Doxygen