4#include "flint/graphics/shape.h"
5#include "flint/graphics/types/color.h"
6#include "flint/math/types.h"
49 m_position.x += delta.x;
50 m_position.y += delta.y;
82 return FloatRect(m_position - m_origin, {2.0f * m_radius, 2.0f * m_radius});
93 Vec2f m_origin{0.f, 0.f};
float getAngle() const
Return the current rotation angle in radians.
void setOrigin(Vec2f newOrigin)
Set the local pivot point used as the rotation and positioning origin.
FloatRect getGlobalBounds() const override
Get the axis-aligned bounding box of the circle in world space.
void emit(RenderQueue &queue) const override
Emit this drawable's rendering work for the current frame.
float getRadius() const
Get the current radius in world-space units.
void move(Vec2f delta)
Translate the circle by delta.
CircleShape(float radius, Color fill={255, 255, 255, 255})
Construct a circle with the given radius and fill color.
void setRadius(float radius)
Set the circle radius.
void setAngle(float newAngle)
Set the rotation angle.
const Vec2f & getOrigin() const
Get the local origin pivot point.
A 2D circle rendered as a textured quad with a circle SDF shader.
Batches drawables into sorted geometry, primitive, and custom execution passes for GPURenderer.
Abstract base class for 2-D geometric shapes.
RGBA color with 8-bit unsigned components.