Defines functions for drawing common math objects. More...
#include <vector>#include "Graphics/Color.h"#include "Math/MathCommon.h"Functions | |
| void | DrawLine (const Line &l, const Color4f &color=Color::Gray, float width=2.0f) |
| Draws a Line. | |
| void | DrawLineStrip (const std::vector< Point2f > &points, const Color4f &color=Color::Gray, float width=2.0f) |
| Draws a sequence of connected Lines. | |
| void | DrawLineStrip (const Point2f *points, uint n, const Color4f &color=Color::Gray, float width=2.0f) |
| Draws a sequence of connected Lines. | |
| void | DrawPoint (const Point2f &p, const Color4f &color=Color::Red, float size=5.0f) |
| Draws a Point. | |
| void | DrawVector (const Vector2f &v, const Point2f &origin=Point2f(0.0f, 0.0f), const Color4f &color=Color::CornFlowerBlue, float width=2.0f) |
| Draws a Vector. | |
| void | DrawCircle (const Circle &c, const Color4f &color=Color::Yellow, float width=2.0f) |
| Draws a Circle. | |
| void | DrawRay (const Ray &r, float len=10.0f, const Color4f &color=Color::Blue, float width=2.0f) |
| Draws a Ray. | |
| void | DrawAABB (const AABB &aabb, const Color4f &color=Color::Green, float width=2.0f) |
| Draws an AABB. | |
| void | DrawAABB (const AABB &aabb, const Matrixf &m, const Color4f &color=Color::Green, float width=2.0f) |
| Draws an AABB. | |
| void | DrawRect (const Rectf &r, bool fill=true, const Color4f &color=Color::Green, float width=2.0f) |
| Draws a Rect. | |
| void | DrawQuad (const Point2f ¢er, float w, float h, bool fill=true, const Color4f &color=Color::Green, float width=2.0f) |
| Draws a Quad. | |
| void | DrawQuad (const Point2f ¢er, float w, float h, const Matrixf &m, bool fill=true, const Color4f &color=Color::Green, float width=2.0f) |
| Draws a Quad. | |
| void | DrawTriangle (const Point2f &a, const Point2f &b, const Point2f &c, const Color4f &color) |
| Draws a solid Triangle. | |
| void | DrawPoly (const std::vector< Point2f > &verts, const Point2f &p=Point2f(0.0f, 0.0f), const Color4f c=Color::Green, float width=2.0f) |
| Draws a Polygon. | |
| void | DrawPoly (const Point2f *verts, int n, const Matrixf &m, const Color4f c=Color::Green, float width=2.0f) |
| Draws a Polygon. | |
| void | DrawPoly (const Point2f *verts, int n, const Point2f &p=Point2f(0.0f, 0.0f), const Color4f c=Color::Green, float width=2.0f) |
| Draws a Polygon. | |
| void | DrawFullscreenQuad (const Color4f &color) |
| Draws a Quad that fills the whole screen. | |
Defines functions for drawing common math objects.
| void DrawCircle | ( | const Circle & | c, | |
| const Color4f & | color = Color::Yellow, |
|||
| float | width = 2.0f | |||
| ) |
Draws a Circle.
| [in] | c | the Circle to draw. |
| [in] | color | the color to draw the Circle. Defaults to Yellow. |
| [in] | width | the width of the Circle should be drawn. Defaults to 2. |
| void DrawFullscreenQuad | ( | const Color4f & | color | ) |
Draws a Quad that fills the whole screen.
| [in] | color | the color to draw the fullscreen Quad. |
| void DrawLineStrip | ( | const Point2f * | points, | |
| uint | n, | |||
| const Color4f & | color = Color::Gray, |
|||
| float | width = 2.0f | |||
| ) |
Draws a sequence of connected Lines.
| [in] | points | the points that define the sequence of lines. |
| [in] | n | the number of points. |
| [in] | color | the color to draw the line. Defaults to Gray. |
| [in] | width | the width of the line should be drawn. Defaults to 2. |
| void DrawLineStrip | ( | const std::vector< Point2f > & | points, | |
| const Color4f & | color = Color::Gray, |
|||
| float | width = 2.0f | |||
| ) |
Draws a sequence of connected Lines.
| [in] | points | the points that define the sequence of lines. |
| [in] | color | the color to draw the line. Defaults to Gray. |
| [in] | width | the width of the line should be drawn. Defaults to 2. |
Draws a Point.
| [in] | p | the Point to draw. |
| [in] | color | the color to draw the Point. Defaults to Red. |
| [in] | size | the size of the Point should be drawn. Defaults to 5. |
| void DrawPoly | ( | const Point2f * | verts, | |
| int | n, | |||
| const Point2f & | p = Point2f(0.0f, 0.0f), |
|||
| const Color4f | c = Color::Green, |
|||
| float | width = 2.0f | |||
| ) |
Draws a Polygon.
| [in] | verts | the vertices for the polygon where the first and the last vertices are connected. |
| [in] | n | the number of vertices. |
| [in] | p | the position to draw the polygon. Defaults to the origin. |
| [in] | c | the color to draw the polygon. |
| [in] | width | the width of the lines used to draw the polygon. |
| void DrawPoly | ( | const Point2f * | verts, | |
| int | n, | |||
| const Matrixf & | m, | |||
| const Color4f | c = Color::Green, |
|||
| float | width = 2.0f | |||
| ) |
Draws a Polygon.
| [in] | verts | the vertices for the polygon where the first and the last vertices are connected. |
| [in] | n | the number of vertices. |
| [in] | m | the transformation Matrix to apply to the poly. |
| [in] | c | the color to draw the polygon. |
| [in] | width | the width of the lines used to draw the polygon. |
| void DrawPoly | ( | const std::vector< Point2f > & | verts, | |
| const Point2f & | p = Point2f(0.0f, 0.0f), |
|||
| const Color4f | c = Color::Green, |
|||
| float | width = 2.0f | |||
| ) |
Draws a Polygon.
| [in] | verts | the vertices for the polygon where the first and the last vertices are connected. |
| [in] | p | the position to draw the polygon. Defaults to the origin. |
| [in] | c | the color to draw the polygon. |
| [in] | width | the width of the lines used to draw the polygon. |
| void DrawQuad | ( | const Point2f & | center, | |
| float | w, | |||
| float | h, | |||
| const Matrixf & | m, | |||
| bool | fill = true, |
|||
| const Color4f & | color = Color::Green, |
|||
| float | width = 2.0f | |||
| ) |
Draws a Quad.
| [in] | center | the center position of the Quad to draw. |
| [in] | w | the width of the Quad to Draw. |
| [in] | h | the height of the Quad to Draw. |
| [in] | m | the transformation to apply to the quad. |
| [in] | fill | set to true to fill the Quad with the given color. Set to false to only draw the outline of the Quad. |
| [in] | color | the color to draw the Quad. Defaults to Green. |
| [in] | width | the width of the Rect should be drawn. Defaults to 2. Ignored if fill equals true. |
| void DrawQuad | ( | const Point2f & | center, | |
| float | w, | |||
| float | h, | |||
| bool | fill = true, |
|||
| const Color4f & | color = Color::Green, |
|||
| float | width = 2.0f | |||
| ) |
Draws a Quad.
| [in] | center | the center position of the Quad to draw. |
| [in] | w | the width of the Quad to Draw. |
| [in] | h | the height of the Quad to Draw. |
| [in] | fill | set to true to fill the Quad with the given color. Set to false to only draw the outline of the Quad. |
| [in] | color | the color to draw the Quad. Defaults to Green. |
| [in] | width | the width of the Rect should be drawn. Defaults to 2. Ignored if fill equals true. |
| void DrawRect | ( | const Rectf & | r, | |
| bool | fill = true, |
|||
| const Color4f & | color = Color::Green, |
|||
| float | width = 2.0f | |||
| ) |
Draws a Rect.
| [in] | r | the Rect to draw. |
| [in] | fill | set to true to fill the Rect with the given color. Set to false to only draw the outline of the Rect. |
| [in] | color | the color to draw the Rect. Defaults to Green. |
| [in] | width | the width of the Rect should be drawn. Defaults to 2. Ignored if fill equals true. |
| void DrawTriangle | ( | const Point2f & | a, | |
| const Point2f & | b, | |||
| const Point2f & | c, | |||
| const Color4f & | color | |||
| ) |
Draws a solid Triangle.
| [in] | a | the first point. |
| [in] | b | the second point. |
| [in] | c | the third point. |
| [in] | color | the color to draw the Triangle. |
| void DrawVector | ( | const Vector2f & | v, | |
| const Point2f & | origin = Point2f(0.0f, 0.0f), |
|||
| const Color4f & | color = Color::CornFlowerBlue, |
|||
| float | width = 2.0f | |||
| ) |
Draws a Vector.
| [in] | v | the Vector to draw. |
| [in] | origin | the origin of the coordinate system the vector is in. Defaults to (0,0). |
| [in] | color | the color to draw the vector. Defaults to CornFlowerBlue. |
| [in] | width | the width of the Vector should be drawn. Defaults to 2. |
1.6.3