GameObject
Generated from engine/core/game_object.h at 0f4f503. The text under each declaration is the header's own comment, word for word. About the reference says how these pages are made.
Audience: game code.
#include "engine/core/game_object.h" · namespace labrador
class GameObject
Section titled “class GameObject”Anything a scene can update and draw.
Several views may draw the same object concurrently. Drawing is a pure read of shared state, with output recorded into the supplied DrawList. Per-view tint, flip and offset values stay in locals and are passed to draw_with() overloads instead of stored members. Per-frame choices, such as animation and facing, belong in update().
~GameObject
Section titled “~GameObject”update
Section titled “update”virtual void update(float dt) = 0;Steps the object by dt seconds, once per tick on one thread. Changes to object state belong here rather than in draw().
One draw, into one view's recording.
The caller sets the view's camera and viewport on draw_list (engine/render/renderer.h). Read camera() and viewport() for view- dependent drawing and do not store either. The list is valid until the next Renderer::submit(). Calls for other views may run concurrently.
bounds
Section titled “bounds”The object's geometry in world space, before view-pixel quantization.
Reports an extent for spatial queries; CollisionObject::shape() supplies detailed collision geometry. This is not a visibility flag: draw() decides whether to emit anything.
cull_bounds
Section titled “cull_bounds”Conservative drawn extent for culling at this view's world units per pixel (nonnegative). Ordinary geometry needs no adjustment. Drawables that snap in view pixels override this: quantization follows the camera, so its world-space allowance depends on zoom. bounds() remains the unsnapped geometry used by layout and collision.
Related types
Section titled “Related types”Named in the public declarations above: DrawList, RectangleF.
In the samples and tests
Section titled “In the samples and tests”The files that include this header directly. A file can also reach it through another header.
samples/linesweeper/presentation/board_view.h,particles.h,top_out_banner.h,touch_controls.hsamples/local_multiplayer/arena.htests/render/label_tests.cpp,view_pixel_tests.cpp,visual_tests.cpptests/scene/fanout_tests.cpp
Explained in
Section titled “Explained in”Documentation for Labrador v0.3.0. Built from Labrador 0f4f503 of 2026-11-03.