43 double angularDamping;
51 double rollingFriction;
55 double spinningFriction;
76 template<typename Processor> static constexpr
void reflect(Processor&& RTTI) {
187 template<
typename Processor>
static constexpr void reflect(Processor&& RTTI) {
229 using EntityObject::EntityObject;
235 using EntityObject::EntityObject;
241 using EntityObject::EntityObject;
#define CE_EXTERN_COMPONENT(T)
Definition Component.hpp:600
#define CE_ENTITY_OBJECT_HASH(T)
Definition Entity.hpp:784
#define CE_REFLECT_HASH(T)
Definition Hash.hpp:89
#define CE_REFLECTABLE_STRUCT
Definition IReflectable.hpp:47
#define CE_REFL_DATA_GETSET(N, G, S)
Definition Macros.hpp:549
#define CE_REFL_DATA(N)
Definition Macros.hpp:541
#define CE_SCRIPT_EXPORT(...)
The CE_SCRIPT_EXPORT macro marks a class or method as exportable and available in scripting environme...
Definition Macros.hpp:247
A type-safe entity type.
Definition Entity.hpp:538
A rigid body is a body that can be collided with and can be moved.
Definition Body.hpp:233
A soft body is a body that can have deformations.
Definition Body.hpp:239
A static body is a body that can be collided with, but cannot be moved.
Definition Body.hpp:227
Definition Application.hpp:19
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
Vector3 force
The force to be applied.
Definition Body.hpp:213
ApplyForce(Vector3 force, Vector3 relativePosition=Vector3(0.0))
Creates a new ApplyForce action.
Vector3 relativePosition
The relative position to apply the force at.
Definition Body.hpp:216
Accessor(const Entity &entity)
Definition Component.hpp:181
Components serve as the base for data storage for an entity.
Definition Component.hpp:68
A class that must be inherited by concrete action types.
Definition Action.hpp:33
void setFriction(double friction)
The body's friction factor.
void setSpinningFriction(double spinningFriction)
The body's spinning friction factor.
double getRollingFriction() const
The body's rolling friction factor.
double getSpinningFriction() const
The body's spinning friction factor.
void setLinearDamping(double linearDamping)
The body's linear damping factor.
void setRollingFriction(double rollingFriction)
The body's rolling friction factor.
void applyForce(Vector3 force, Vector3 relativePosition=Vector3(0.0)) const
Applies a force in a body.
void setMass(double mass) noexcept
The rigid body mass.
double getFriction() const
The body's friction factor.
Vector3 getLocalInertia() const
The rigid body local inertia.
double getAngularDamping() const
The body's angular damping factor.
double getLinearDamping() const
The body's linear damping factor.
void setRestitution(double restitution)
The body's restitution factor.
void setAngularDamping(double angularDamping)
The body's angular damping factor.
double getRestitution() const
The body's restitution factor.
void setFixed(bool fixed)
If set to true, if the body is non-movable and the engine might use this to optimize calculations.
void setLocalInertia(Vector3 localInertia)
The rigid body local inertia.
double getMass() const noexcept
The rigid body mass.
const HMesh & getMesh() const
bool isFixed() const
If set to true, if the body is non-movable and the engine might use this to optimize calculations.
HMesh mesh
A mesh to be used for collision computations.
Definition Body.hpp:67
double friction
The body's friction factor.
Definition Body.hpp:47
double rollingFriction
The body's rolling friction factor.
Definition Body.hpp:51
double spinningFriction
The body's spinning friction factor.
Definition Body.hpp:55
double angularDamping
The body's angular damping factor.
Definition Body.hpp:43
double restitution
The body's restitution factor.
Definition Body.hpp:59
double mass
The rigid body mass.
Definition Body.hpp:31
bool fixed
If set to true, if the body is non-movable and the engine might use this to optimize calculations.
Definition Body.hpp:64
Vector3 localInertia
The rigid body local inertia.
Definition Body.hpp:35
double linearDamping
The body's linear damping factor.
Definition Body.hpp:39
void applyForce(Vector3 force, Vector3 relativePosition=Vector3(0.0)) const
Applies a force in a body.
static constexpr void reflect(Processor &&RTTI)
Executes the given processor for every field of the struct.
Definition Body.hpp:187