Torque2D Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | List of all members
SplinePatch Class Referenceabstract

`#include <mSplinePatch.h>`

Inheritance diagram for SplinePatch:

## Public Member Functions
| SplinePatch ()
U32 | getNumReqControlPoints ()
const SplCtrlPts * | getControlPoints ()
const Point3F * | getControlPoint (U32 index)
virtual void | setControlPoint (Point3F &point, int index)
virtual void | submitControlPoints (SplCtrlPts &points)
virtual void | calc (F32 t, Point3F &result)=0
virtual void | calc (Point3F *points, F32 t, Point3F &result)=0

## Protected Member Functions
void | setNumReqControlPoints (U32 numPts)

## 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

## Constructor & Destructor Documentation

SplinePatch | ( |  | ) |

## Member Function Documentation

void calc | ( | F32 | t,
|  | Point3F & | result
| ) |  |
| pure virtual

Recalc function. Do not call this ever - only SplineUtil needs this.

See also
  SplineUtil

Implemented in QuadPatch.

void 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.

const Point3F* getControlPoint | ( | U32 | index | ) |
| inline

const SplCtrlPts* getControlPoints | ( |  | ) |
| inline

U32 getNumReqControlPoints | ( |  | ) |
| inline

void setControlPoint | ( | Point3F & | point,
|  | int | index
| ) |  |
| virtual

Reimplemented in QuadPatch.

void setNumReqControlPoints | ( | U32 | numPts | ) |
| inline protected

virtual void submitControlPoints | ( | SplCtrlPts & | points | ) |
| inline virtual

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

See also
  SplCtrlPts

Reimplemented in QuadPatch.

The documentation for this class was generated from the following files:

- math/mSplinePatch.h
- math/mSplinePatch.cc