This class allows the drawing of 2d objects - mainly based on quads and rectangles. More...
Public Member Functions | |
MeshDrawer2D () | |
Creates the MeshDrawer2D low level system. | |
begin () | |
Opens up the geom for drawing, don't forget to call MeshDrawer2D::end() | |
end () | |
Finish the drawing and clearing off the remaining vertexes. | |
int | getBudget () |
Gets the total triangle budget of the drawer. | |
NodePath | getRoot () |
Returns the root NodePath. | |
quadRaw (Vec3 const v1, Vec4 const c1, Vec2 const uv1, Vec3 const v2, Vec4 const c2, Vec2 const uv2, Vec3 const v3, Vec4 const c3, Vec2 const uv3, Vec3 const v4, Vec4 const c4, Vec2 const uv4) | |
Draws a 2d rectangle. | |
rectangle (float x, float y, float w, float h, float u, float v, float us, float vs, Vec4 const color) | |
Draws a 2d rectangle, that can be cliped. | |
rectangleBorder (float x, float y, float w, float h, float r, float t, float l, float b, float tr, float tt, float tl, float tb, float u, float v, float us, float vs, Vec4 const color) | |
Draws a 2d rectangle, with borders and corders, taken from the surrounding texture. | |
rectangleBorderTiled (float x, float y, float w, float h, float r, float t, float l, float b, float tr, float tt, float tl, float tb, float u, float v, float us, float vs, Vec4 const color) | |
Draws a 2d rectangle, with borders and corders, taken from the surrounding texture. | |
rectangleRaw (float x, float y, float w, float h, float u, float v, float us, float vs, Vec4 const color) | |
rectangleTiled (float x, float y, float w, float h, float u, float v, float us, float vs, Vec4 const color) | |
Draws a tiled rectangle, size of tiles is in us and vs. | |
setBudget (int budget) | |
Sets the total triangle budget of the drawer. | |
setClip (float x, float y, float w, float h) | |
Sets clipping rectangle. | |
Static Public Member Functions | |
static TypeHandle | getClassType () |
This class allows the drawing of 2d objects - mainly based on quads and rectangles.
Allows clipping and serverl high level UI theme functions.
MeshDrawer2D | ( | ) |
Creates the MeshDrawer2D low level system.
begin | ( | ) |
Opens up the geom for drawing, don't forget to call MeshDrawer2D::end()
end | ( | ) |
Finish the drawing and clearing off the remaining vertexes.
static TypeHandle getClassType | ( | ) | [static] |
Reimplemented from TypedObject.
quadRaw | ( | Vec3 const | v1, |
Vec4 const | c1, | ||
Vec2 const | uv1, | ||
Vec3 const | v2, | ||
Vec4 const | c2, | ||
Vec2 const | uv2, | ||
Vec3 const | v3, | ||
Vec4 const | c3, | ||
Vec2 const | uv3, | ||
Vec3 const | v4, | ||
Vec4 const | c4, | ||
Vec2 const | uv4 | ||
) |
Draws a 2d rectangle.
Ignores the cliping rectangle
rectangle | ( | float | x, |
float | y, | ||
float | w, | ||
float | h, | ||
float | u, | ||
float | v, | ||
float | us, | ||
float | vs, | ||
Vec4 const | color | ||
) |
Draws a 2d rectangle, that can be cliped.
rectangleBorder | ( | float | x, |
float | y, | ||
float | w, | ||
float | h, | ||
float | r, | ||
float | t, | ||
float | l, | ||
float | b, | ||
float | tr, | ||
float | tt, | ||
float | tl, | ||
float | tb, | ||
float | u, | ||
float | v, | ||
float | us, | ||
float | vs, | ||
Vec4 const | color | ||
) |
Draws a 2d rectangle, with borders and corders, taken from the surrounding texture.
rectangleBorderTiled | ( | float | x, |
float | y, | ||
float | w, | ||
float | h, | ||
float | r, | ||
float | t, | ||
float | l, | ||
float | b, | ||
float | tr, | ||
float | tt, | ||
float | tl, | ||
float | tb, | ||
float | u, | ||
float | v, | ||
float | us, | ||
float | vs, | ||
Vec4 const | color | ||
) |
Draws a 2d rectangle, with borders and corders, taken from the surrounding texture.
rectangleRaw | ( | float | x, |
float | y, | ||
float | w, | ||
float | h, | ||
float | u, | ||
float | v, | ||
float | us, | ||
float | vs, | ||
Vec4 const | color | ||
) |
rectangleTiled | ( | float | x, |
float | y, | ||
float | w, | ||
float | h, | ||
float | u, | ||
float | v, | ||
float | us, | ||
float | vs, | ||
Vec4 const | color | ||
) |
Draws a tiled rectangle, size of tiles is in us and vs.
setClip | ( | float | x, |
float | y, | ||
float | w, | ||
float | h | ||
) |
Sets clipping rectangle.