rigComponent 0.1.1
RigKit pack API - rigComponent
Loading...
Searching...
No Matches
PrimitiveBounds.h File Reference

Axis-aligned bounds for whichever 2D primitive an entity carries. More...

#include <entt/entt.hpp>
#include <glm/glm.hpp>
#include "ecs/MEcs.h"
#include "CArc.h"
#include "CEllipse.h"
#include "CLine.h"
#include "CPolygon.h"
#include "CRectangle.h"
#include "CRegularPolygon.h"
#include "CRing.h"
#include "CSpline.h"
#include "CStar.h"
#include "CText.h"
Include dependency graph for PrimitiveBounds.h:

Classes

struct  rigkit::ecs::Bounds2D
 Axis-aligned extent of a primitive in its own local space. More...

Functions

Bounds2D rigkit::ecs::shapeBounds2D (MEcs &ecs, entt::entity entity)
 Local bounds of whichever geometry primitive the entity carries.
bool rigkit::ecs::hasShape2D (MEcs &ecs, entt::entity entity)
 True when the entity carries any geometry primitive.

Detailed Description

Axis-aligned bounds for whichever 2D primitive an entity carries.

Local space only - apply the entity's CTransform yourself for world bounds.

Function Documentation

◆ shapeBounds2D()

Bounds2D rigkit::ecs::shapeBounds2D ( MEcs & ecs,
entt::entity entity )

Local bounds of whichever geometry primitive the entity carries.

Returns
Invalid bounds when the entity carries none.