|
Torque2D Reference
|
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 | dglDrawTriangleFill (const Point2I &pt1, const Point2I &pt2, const Point2I &pt3, const ColorI &color) |
| draws an UNTEXTURED filled triangle with the three points which should be given in counterclockwise order | |
| void | dglDrawRect (const Point2I &upperL, const Point2I &lowerR, const ColorI &color, const float &lineWidth=1.0f) |
| draws a wireframe rectangle from upperL to lowerR in specified color and optional line width | |
| void | dglDrawRect (const RectI &rect, const ColorI &color, const float &lineWidth=1.0f) |
| draws a wireframe rectangle in "rect" in specified color and optional line width | |
| 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 | dglDrawQuadFill (const Point2I &point1, const Point2I &point2, const Point2I &point3, const Point2I &point4, const ColorI &color) |
| draws an UNTEXTURED filled quad in specified color | |
| void | dglDrawDot (const Point2F &screenPoint, const ColorI &color) |
| draws a dot. | |
| 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 ¢er) |
| 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". | |
| void | dglDrawCircle (const Point2I ¢er, const F32 radius, const ColorI &color, const F32 &lineWidth=1.0f) |
| Draws an unfilled circle using line segments. | |
| void | dglDrawCircleFill (const Point2I ¢er, const F32 radius, const ColorI &color) |
| Draws a filled circle. | |
Easy functions for drawing lines and (un)textured rectangles in 2d or 3d space
| 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 dglDrawCircle | ( | const Point2I & | center, |
| const F32 | radius, | ||
| const ColorI & | color, | ||
| const F32 & | lineWidth = 1.0f ) |
Draws an unfilled circle using line segments.
Draws a filled circle.
draws a line from startPt to endPt in specified color
| 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 dglDrawQuadFill | ( | const Point2I & | point1, |
| const Point2I & | point2, | ||
| const Point2I & | point3, | ||
| const Point2I & | point4, | ||
| const ColorI & | color ) |
draws an UNTEXTURED filled quad in specified color
| void dglDrawRect | ( | const Point2I & | upperL, |
| const Point2I & | lowerR, | ||
| const ColorI & | color, | ||
| const float & | lineWidth = 1.0f ) |
draws a wireframe rectangle from upperL to lowerR in specified color and optional line width
draws a wireframe rectangle in "rect" in specified color and optional line width
draws an UNTEXTURED filled rectangle from upperL to lowerR in specified color
draws an UNTEXTURED filled rectangle in "rect" in specified color
| void dglDrawTriangleFill | ( | const Point2I & | pt1, |
| const Point2I & | pt2, | ||
| const Point2I & | pt3, | ||
| const ColorI & | color ) |
draws an UNTEXTURED filled triangle with the three points which should be given in counterclockwise order
Draws a solid cube around "center" with size "extent".