147 const glm::vec3 &pointB = glm::vec3(0.0f),
151 constraint.
bodyA = a;
152 constraint.
bodyB = b;
155 constraint.
settings = constraintSettings;
156 constraint.
broken =
false;
176 constraint.
bodyA = body;
180 constraint.
settings = constraintSettings;
181 constraint.
broken =
false;
201 constraint.
bodyA = body;
205 constraint.
settings = constraintSettings;
206 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 PointConstraint.hpp:76
static PointConstraint CreateToWorld(Engine::EntityId body, const glm::vec3 &worldPoint, const ConstraintSettings &constraintSettings=ConstraintSettings::Rigid())
Create a point constraint from body to world (pendulum, anchor).
Definition PointConstraint.hpp:172
ConstraintSettings settings
Constraint settings (stiffness, damping, breaking thresholds).
Definition PointConstraint.hpp:120
Engine::EntityId bodyB
Second body entity (the entity to connect to).
Definition PointConstraint.hpp:91
glm::vec3 localPointB
Attachment point on bodyB in local body space (or world space if world constraint).
Definition PointConstraint.hpp:111
static PointConstraint CreateToWorldWithOffset(Engine::EntityId body, const glm::vec3 &worldPoint, const glm::vec3 &localPoint, const ConstraintSettings &constraintSettings=ConstraintSettings::Rigid())
Create a point constraint from body to world with local attachment.
Definition PointConstraint.hpp:197
glm::vec3 localPointA
Attachment point on bodyA in local body space.
Definition PointConstraint.hpp:103
bool IsWorldConstraint() const
Check if this is a world constraint.
Definition PointConstraint.hpp:214
Engine::EntityId bodyA
First body entity (the entity this component is attached to).
Definition PointConstraint.hpp:84
static PointConstraint 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 point constraint between two bodies.
Definition PointConstraint.hpp:146
bool broken
Whether this constraint has been broken.
Definition PointConstraint.hpp:129