Skip to content

Visual

Generated from engine/render/visual.h at 862e08b. The text under each declaration is the header's own comment, word for word. About the reference says how these pages are made.

Browse the render module

#include "engine/render/visual.h" · namespace labrador

class Visual : public GameObject, public TextureObject
Visual() = default;
Visual(const std::string& sheet_name,
const std::string& frame_name,
const mattmath::RectangleF& rectangle,
RenderResources* render_resources,
const Colour& color = Colour::white,
float rotation = 0.0f,
SpriteFlip flip = SpriteFlip::none,
float layer_depth = 0.0f);
Visual(const std::string& sheet_name,
const std::string& frame_name,
const mattmath::RectangleRotated& rect_rotated,
RenderResources* render_resources,
const Colour& color = Colour::white,
float rotation = 0.0f,
SpriteFlip flip = SpriteFlip::none,
float layer_depth = 0.0f);

The shape's angle plus rotation, about its center. Frame/caller origins are additional local source-texel offsets from that center.

void update(float dt) override;
void draw(DrawList& draw_list) const override;
mattmath::RectangleF bounds() const override;
mattmath::RectangleF cull_bounds(float units_per_pixel) const override;

Unsnapped world geometry, including both authored and caller origin. cull_bounds additionally covers view-pixel quantization at this zoom. Both the geometry and per-pixel padding are cached at construction; this final class exposes no geometry/frame setters. Adding one must refresh both, keeping lookups and trigonometry off the cull path.

Named in the public declarations above: Colour, DrawList, GameObject, RectangleF, RectangleRotated, RenderResources, SpriteFlip, TextureObject, Vector2F.

The files that include this header directly. A file can also reach it through another header.

Development documentation (unreleased). Built from Labrador 862e08b of 2026-10-08.