| PathEngine home | previous: | next: |
A helper method for drawing lines that hug the surface of the 3D ground mesh.
void renderLineOnGround(const cPosition& start, tSigned32 endX, tSigned32 endY, tSigned32 originX, tSigned32 originY, iRender3DLinesCallBack& callBack) const; |
| start | The start point of the line to draw. | ||
| endX | X coordinate for the end of the line. | ||
| endY | Y coordinate for the end of the line. | ||
| originX | X coordinate for the rendering origin. | ||
| originY | Y coordinate for the rendering origin. | ||
| callBack |
An instance of
|
This helper method is provided to enable you to implement visualisation of primitives similar to the visualisation provided in the testbed, but within your own 3D engine.
Vertices are passed back to the callback object
for start and end points of the line,
and for points at which the line crosses changes in mesh slope.
A floating point representation is used by the callback and
points may be approximated.
Setting originX and originY to points close to the line can reduce the amount
of approximation.
(These could be set, for example, to the current camera X and Y.)
If your engine works purely in terms of floating point world coordinates then
simply set this origin to [0, 0].
Note that lines are always rendered on the surface of the 3D base mesh, even if terrain callbacks are supplied.
| Documentation for PathEngine release 5.16 - Copyright © 2002-2008 PathEngine | next: |