|
GREM 3.12.0
Game/Rendering Engine Modules for C++
|
Configuration options for an object. More...
#include <GREM/physics/objects.hpp>
Public Member Functions | |
| bool | operator== (const ObjectOptions &other) const =default |
| Compare this set of options to another set for equality. | |
Public Attributes | |
| Position< N > | position {} |
| Initial position of the object's center of mass in the world. | |
| Orientation< N > | orientation {} |
| Initial orientation of the object in the world. | |
| Scale< N > | scale {Scalar{1}} |
| Initial scale of the object in shape-local space. | |
| LinearVelocity< N > | linearVelocity {} |
| Initial linear velocity of the object's center of mass. | |
| AngularVelocity< N > | angularVelocity {} |
| Initial angular velocity of the object. | |
| LinearAcceleration< N > | gravityAcceleration = -Y_AXIS<N> * static_cast<Scalar>(9.82) * METERS_PER_SECOND_SQUARED |
| Gravity acceleration that will be applied to the object on every simulation step. | |
| Density | surroundingFluidDensity = static_cast<Scalar>(1.2041) * KILOGRAMS_PER_CUBIC_METER |
| Effective fluid density of the object's surroundings, which will be used to calculate the drag to apply to the object at every simulation step. | |
| Length< N > | centerOfBuoyancy {} |
| World-space offset of the center of buoyancy of the object relative to its center of mass. | |
| Mass | mass {} |
| Mass of the object. | |
| PrincipalMomentsOfInertia< N > | principalMomentsOfInertia {} |
| Principal moments of inertia of the object. | |
| LocalInertiaOrientation< N > | localInertiaOrientation {} |
| Rotation from inertia major axis space to local space. | |
| Collider< N > | collider {.shape = PointShape<N>{}} |
| Collider of the object. | |
| Material | material {} |
| Dynamics-related properties of the object. | |
| bool | emitsCollisionEvents = false |
| Whether the object should emit collision events or not. | |
| bool | emitsSeparationEvents = false |
| Whether the object should emit separation events or not. | |
| bool | enableResting = true |
| Whether the object should enter a resting state on inactivity or not. | |
Configuration options for an object.
| N | number of dimensions of the world space (must be 2 or 3). |
|
nodiscarddefault |
Compare this set of options to another set for equality.
| other | the options to compare these to. |
| Position<N> grem::physics::ObjectOptions< N >::position {} |
Initial position of the object's center of mass in the world.
| Orientation<N> grem::physics::ObjectOptions< N >::orientation {} |
Initial orientation of the object in the world.
| Scale<N> grem::physics::ObjectOptions< N >::scale {Scalar{1}} |
Initial scale of the object in shape-local space.
| LinearVelocity<N> grem::physics::ObjectOptions< N >::linearVelocity {} |
Initial linear velocity of the object's center of mass.
| AngularVelocity<N> grem::physics::ObjectOptions< N >::angularVelocity {} |
Initial angular velocity of the object.
| LinearAcceleration<N> grem::physics::ObjectOptions< N >::gravityAcceleration = -Y_AXIS<N> * static_cast<Scalar>(9.82) * METERS_PER_SECOND_SQUARED |
Gravity acceleration that will be applied to the object on every simulation step.
| Density grem::physics::ObjectOptions< N >::surroundingFluidDensity = static_cast<Scalar>(1.2041) * KILOGRAMS_PER_CUBIC_METER |
Effective fluid density of the object's surroundings, which will be used to calculate the drag to apply to the object at every simulation step.
| Length<N> grem::physics::ObjectOptions< N >::centerOfBuoyancy {} |
World-space offset of the center of buoyancy of the object relative to its center of mass.
| Mass grem::physics::ObjectOptions< N >::mass {} |
Mass of the object.
Must be positive or 0. If set to 0, an estimate of the mass will be calculated automatically based on the shape's volume and an assumed density of 0.5 g/cm^3. If set to infinity, the object's linear velocity will be constant (except for gravity, if gravityAcceleration is non-zero).
| PrincipalMomentsOfInertia<N> grem::physics::ObjectOptions< N >::principalMomentsOfInertia {} |
Principal moments of inertia of the object.
Each component must be positive or 0. If set to 0, an estimate of the moment of inertia will be calculated automatically based on the object's shape and mass. The estimate will assume that localInertiaOrientation is the identity orientation. If set to infinity, the object's angular velocity will be constant.
| LocalInertiaOrientation<N> grem::physics::ObjectOptions< N >::localInertiaOrientation {} |
Rotation from inertia major axis space to local space.
| Collider<N> grem::physics::ObjectOptions< N >::collider {.shape = PointShape<N>{}} |
Collider of the object.
| Material grem::physics::ObjectOptions< N >::material {} |
Dynamics-related properties of the object.
| bool grem::physics::ObjectOptions< N >::emitsCollisionEvents = false |
Whether the object should emit collision events or not.
| bool grem::physics::ObjectOptions< N >::emitsSeparationEvents = false |
Whether the object should emit separation events or not.
| bool grem::physics::ObjectOptions< N >::enableResting = true |
Whether the object should enter a resting state on inactivity or not.
Set to false to make sure the object is always simulated regardless of its speed.