149 const glm::vec3 &pointB = glm::vec3(0.0f),
153 constraint.
bodyA = a;
154 constraint.
bodyB = b;
157 constraint.
settings = constraintSettings;
158 constraint.
broken =
false;
177 constraint.
bodyA = body;
181 constraint.
settings = constraintSettings;
182 constraint.
broken =
false;
Definition BoxCollider.hpp:27
Represents a unique identifier for an entity in the Engine's entity-component system....
Definition EntityId.hpp:14
static constexpr EntityId Null()
Returns a null EntityId. A null EntityId is an EntityId that does not correspond to any valid entity ...
Definition EntityId.hpp:40
Definition ConstraintSettings.hpp:52
static ConstraintSettings Rigid()
Create settings for a perfectly rigid constraint.
Definition ConstraintSettings.hpp:136
Definition FixedConstraint.hpp:71
ConstraintSettings settings
Constraint settings (stiffness, damping, breaking thresholds).
Definition FixedConstraint.hpp:118
bool IsWorldConstraint() const
Check if this is a world constraint (body to world, not body to body).
Definition FixedConstraint.hpp:190
bool broken
Whether this constraint has been broken.
Definition FixedConstraint.hpp:131
Engine::EntityId bodyB
Second body entity (the entity to connect to).
Definition FixedConstraint.hpp:89
glm::vec3 localPointA
Attachment point on bodyA in local body space.
Definition FixedConstraint.hpp:101
glm::vec3 localPointB
Attachment point on bodyB in local body space.
Definition FixedConstraint.hpp:109
static FixedConstraint CreateToWorld(Engine::EntityId body, const glm::vec3 &worldPoint, const ConstraintSettings &constraintSettings=ConstraintSettings::Rigid())
Create a fixed constraint from one body to the world.
Definition FixedConstraint.hpp:173
static FixedConstraint Create(Engine::EntityId a, Engine::EntityId b, const glm::vec3 &pointA=glm::vec3(0.0f), const glm::vec3 &pointB=glm::vec3(0.0f), const ConstraintSettings &constraintSettings=ConstraintSettings::Rigid())
Create a fixed constraint between two bodies.
Definition FixedConstraint.hpp:148
Engine::EntityId bodyA
First body entity (the entity this component is attached to).
Definition FixedConstraint.hpp:82