Torque2D Reference
|
Classes | |
struct | SplineBeamInfo |
Functions | |
void | drawSplineBeam (const Point3F &camPos, U32 numSegments, F32 width, SplinePatch &spline, F32 uvOffset, F32 numTexRep) |
void | drawSplineBeam (SplineBeamInfo &sbi) |
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.
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
camPos | This 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. |
numSegments | The SplineUtil will cut up the spline into numSegments segments. More segments means more smoothness, but less framerate. |
width | The width of the spline beam. |
spline | The SplinePatch data structure for the given spline beam. |
uvOffset | This 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. |
numTexRep | This 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.