torque Torque Game Engine Documentation
TGE Version 1.5.2

Primitive Drawing


Detailed Description

Easy functions for drawing lines and (un)textured rectangles in 2d or 3d space.


Functions

void dglDrawLine (S32 x1, S32 y1, S32 x2, S32 y2, const ColorI &color)
 draws a line from x1,y1 to x2,y2 in the specified color
void dglDrawLine (const Point2I &startPt, const Point2I &endPt, const ColorI &color)
 draws a line from startPt to endPt in specified color
void dglDrawRect (const Point2I &upperL, const Point2I &lowerR, const ColorI &color)
 draws a wireframe rectangle from upperL to lowerR in specified color
void dglDrawRect (const RectI &rect, const ColorI &color)
 draws a wireframe rectangle in "rect" in specified color
void dglDrawRectFill (const Point2I &upperL, const Point2I &lowerR, const ColorI &color)
 draws an UNTEXTURED filled rectangle from upperL to lowerR in specified color
void dglDrawRectFill (const RectI &rect, const ColorI &color)
 draws an UNTEXTURED filled rectangle in "rect" in specified color
void dglDraw2DSquare (const Point2F &screenPoint, F32 width, F32 spinAngle)
 draws a square, with center point "screenPoint", width of "width" on an angle of "spinAngle" in 2d
void dglDrawBillboard (const Point3F &position, F32 width, F32 spinAngle)
 draws a square, with center point "position", width of "width" on an angle of "spinAngle" in 3d
void dglWireCube (const Point3F &extent, const Point3F &center)
 Draws a wireframe cube around "center" with size "extent".
void dglSolidCube (const Point3F &extent, const Point3F &enter)
 Draws a solid cube around "center" with size "extent".


Function Documentation

void dglDrawLine ( S32  x1,
S32  y1,
S32  x2,
S32  y2,
const ColorI color 
)

draws a line from x1,y1 to x2,y2 in the specified color

void dglDrawLine ( const Point2I startPt,
const Point2I endPt,
const ColorI color 
)

draws a line from startPt to endPt in specified color

void dglDrawRect ( const Point2I upperL,
const Point2I lowerR,
const ColorI color 
)

draws a wireframe rectangle from upperL to lowerR in specified color

void dglDrawRect ( const RectI rect,
const ColorI color 
)

draws a wireframe rectangle in "rect" in specified color

void dglDrawRectFill ( const Point2I upperL,
const Point2I lowerR,
const ColorI color 
)

draws an UNTEXTURED filled rectangle from upperL to lowerR in specified color

void dglDrawRectFill ( const RectI rect,
const ColorI color 
)

draws an UNTEXTURED filled rectangle in "rect" in specified color

void dglDraw2DSquare ( const Point2F screenPoint,
F32  width,
F32  spinAngle 
)

draws a square, with center point "screenPoint", width of "width" on an angle of "spinAngle" in 2d

void dglDrawBillboard ( const Point3F position,
F32  width,
F32  spinAngle 
)

draws a square, with center point "position", width of "width" on an angle of "spinAngle" in 3d

void dglWireCube ( const Point3F extent,
const Point3F center 
)

Draws a wireframe cube around "center" with size "extent".

void dglSolidCube ( const Point3F extent,
const Point3F enter 
)

Draws a solid cube around "center" with size "extent".




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