Torque2D Reference
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Classes | Functions
SplineUtil Namespace Reference

Classes

struct  SplineBeamInfo
 

Functions

void drawSplineBeam (const Point3F &camPos, U32 numSegments, F32 width, SplinePatch &spline, F32 uvOffset, F32 numTexRep)
 
void drawSplineBeam (SplineBeamInfo &sbi)
 

Detailed Description

Spline utility namespace. This is used for generating pretty splines so you can get nice curved surfaces. However, many polygons are required, so use these only when needed.

Function Documentation

void drawSplineBeam ( const Point3F camPos,
U32  numSegments,
F32  width,
SplinePatch spline,
F32  uvOffset = 0.0,
F32  numTexRep = 1.0 
)

Function for drawing the spline.

Use this if you only have a SplinePatch object and want to specify all of the parameters

Parameters
camPosThis parameter is the point at which each polygon will face.
                Usually, you want all of the polygons of the spline to be facing the
                camera, so the camera pos is a good bet for this parameter.
numSegmentsThe SplineUtil will cut up the spline into numSegments segments.
                More segments means more smoothness, but less framerate.
widthThe width of the spline beam.
splineThe SplinePatch data structure for the given spline beam.
See Also
SplinePatch
Parameters
uvOffsetThis should be called textureOffset, since it is only an offset along the spline and not perpendicular. This parameter can be used for "sliding" the spline texture down the spline shaft to make it a little more dynamic.
numTexRepThis is the scale of the texture so you can squish or stretch it.
void drawSplineBeam ( SplineBeamInfo &  sbi)

Function for drawing a spline. Only needs SplineBeamInfo.

See Also
SplineBeamInfo