39 glm::vec2(-0.5, -0.5),
47 glm::mat2 rot(ct, -st, st, ct);
52 for (uint8_t i = 0; i < wbb.
vertices.size(); i++)
71 for (uint8_t i = 0; i < wbb.
vertices.size(); i++)
An orthographic camera for 2D.
Definition orthoCam.h:21
glm::vec2 worldToScreen(float x, float y) const
Convert world position to screen coordinate.
Definition orthoCam.h:76
A drawable shape.
Definition shape.h:14
const Transform * transform
Definition shape.h:26
WorldBoundingBox getWorldBoundingBox() const
Get the WorldBoundingBox of the Shape.
Definition shape.h:34
ScreenBoundingBox getScreenBoundingBox(const OrthoCam &camera)
Get the ScreenBoundingBox of the Shape.
Definition shape.h:66
Shape()
Definition shape.h:18
Shape(const Transform *tra, const glm::vec4 *c)
Definition shape.h:22
const glm::vec4 * colour
Definition shape.h:27
A world space bounding box.
Definition primitive.h:173
A drawable graphic.
Definition id.h:10
A bounding box template.
Definition primitive.h:128
std::array< glm::tvec2< T >, 4 > vertices
Vertices of bounding box.
Definition primitive.h:141