GREM 3.12.0
Game/Rendering Engine Modules for C++
Loading...
Searching...
No Matches
objects.hpp File Reference

Go to the source code of this file.

Classes

struct  grem::physics::FluidDensity
 Effective fluid density of an object's surroundings. More...
struct  grem::physics::CenterOfBuoyancy< N >
 World-space offset of the center of buoyancy of an object. More...
struct  grem::physics::Material
 Properties regarding the dynamics of an object. More...
struct  grem::physics::ObjectFlags
 Set of boolean properties of an object. More...
struct  grem::physics::ObjectContacts< N >
 Potential contacts of an object. More...
struct  grem::physics::ObjectActivity
 Activity information of an object. More...
struct  grem::physics::ObjectActiveTag
 Tag component that is added to entities with a non-zero-energy ObjectActivity. More...
struct  grem::physics::ObjectBounds< N >
 Bounds of an object. More...
struct  grem::physics::ObjectOptions< N >
 Configuration options for an object. More...

Namespaces

namespace  grem
namespace  grem::physics

Typedefs

using grem::physics::CenterOfBuoyancy2D = CenterOfBuoyancy<2>
 World-space offset of the center of buoyancy of an object in a 2-dimensional world.
using grem::physics::CenterOfBuoyancy3D = CenterOfBuoyancy<3>
 World-space offset of the center of buoyancy of an object in a 3-dimensional world.
using grem::physics::ObjectContacts2D = ObjectContacts<2>
 Potential contacts of a 2-dimensional object.
using grem::physics::ObjectContacts3D = ObjectContacts<3>
 Potential contacts of a 3-dimensional object.
using grem::physics::ObjectBounds2D = ObjectBounds<2>
 Bounds of a 2-dimensional object.
using grem::physics::ObjectBounds3D = ObjectBounds<3>
 Bounds of a 3-dimensional object.
using grem::physics::ObjectOptions2D = ObjectOptions<2>
 Configuration options for an object in a 2-dimensional world.
using grem::physics::ObjectOptions3D = ObjectOptions<3>
 Configuration options for an object in a 3-dimensional world.

Functions

Coefficient grem::physics::calculateCombinedStaticFriction (Coefficient staticFrictionA, Coefficient staticFrictionB, Material::FrictionCombine frictionCombineA, Material::FrictionCombine frictionCombineB)
 Combine the static friction of two objects based on their friction combination modes.
Coefficient grem::physics::calculateCombinedKineticFriction (Coefficient kineticFrictionA, Coefficient kineticFrictionB, Material::FrictionCombine frictionCombineA, Material::FrictionCombine frictionCombineB)
 Combine the kinetic friction of two objects based on their friction combination modes.
Coefficient grem::physics::calculateCombinedRollingResistance (Coefficient rollingResistanceA, Coefficient rollingResistanceB, Material::FrictionCombine frictionCombineA, Material::FrictionCombine frictionCombineB)
 Combine the rolling resistance of two objects based on their friction combination modes.
Coefficient grem::physics::calculateCombinedRestitution (Coefficient restitutionA, Coefficient restitutionB, Material::RestitutionCombine restitutionCombineA, Material::RestitutionCombine restitutionCombineB)
 Combine the restitution of two objects based on their restitution combination modes.
InverseMass grem::physics::calculateInverseMass (Mass mass)
 Calculate the inverse mass of a given mass, while accounting for 0 and infinity.
Mass grem::physics::calculateMass (InverseMass inverseMass)
 Calculate the mass of a given inverse mass, while accounting for 0 and infinity.
InverseMomentOfInertia2D grem::physics::calculateInverseMomentOfInertia (MomentOfInertia2D momentOfInertia)
 Calculate the inverse moment of inertia of a given moment of inertia, while accounting for 0 and infinity.
InverseMomentOfInertia3D grem::physics::calculateInverseMomentOfInertia (MomentOfInertia3D momentOfInertia)
 Calculate the inverse moment of inertia of a given moment of inertia, while accounting for 0 and infinity.
MomentOfInertia2D grem::physics::calculateMomentOfInertia (InverseMomentOfInertia2D inverseMomentOfInertia)
 Calculate the moment of inertia of a given inverse moment of inertia, while accounting for 0 and infinity.
MomentOfInertia3D grem::physics::calculateMomentOfInertia (InverseMomentOfInertia3D inverseMomentOfInertia)
 Calculate the moment of inertia of a given inverse moment of inertia, while accounting for 0 and infinity.
template<size_t N>
PrincipalMomentsOfInertia< N > grem::physics::calculatePrincipalMomentsOfInertia (const Shape< N > &shape, Mass mass)
 Calculate the principal moments of inertia of an object given its shape and mass.
MomentOfInertiaTensor2D grem::physics::calculateMomentOfInertiaTensor (PrincipalMomentsOfInertia2D principalMomentsOfInertia, LocalInertiaOrientation2D localInertiaOrientation, Orientation2D orientation)
 Calculate the world-space moment of inertia tensor of an object given its principal moments of inertia, the local orientation of the inertia frame, and the world-space orientation of the object.
MomentOfInertiaTensor3D grem::physics::calculateMomentOfInertiaTensor (PrincipalMomentsOfInertia3D principalMomentsOfInertia, LocalInertiaOrientation3D localInertiaOrientation, Orientation3D orientation)
 Calculate the world-space moment of inertia tensor of an object given its principal moments of inertia, the local orientation of the inertia frame, and the world-space orientation of the object.
InverseMomentOfInertiaTensor2D grem::physics::calculateInverseMomentOfInertiaTensor (InversePrincipalMomentsOfInertia2D inversePrincipalMomentsOfInertia, LocalInertiaOrientation2D localInertiaOrientation, Orientation2D orientation)
 Calculate the world-space inverse moment of inertia tensor of an object given its inverse principal moments of inertia, the local orientation of the inertia frame, and the world-space orientation of the object.
InverseMomentOfInertiaTensor3D grem::physics::calculateInverseMomentOfInertiaTensor (InversePrincipalMomentsOfInertia3D inversePrincipalMomentsOfInertia, LocalInertiaOrientation3D localInertiaOrientation, Orientation3D orientation)
 Calculate the world-space inverse moment of inertia tensor of an object given its inverse principal moments of inertia, the local orientation of the inertia frame, and the world-space orientation of the object.
template<size_t N>
Mass grem::physics::calculateCombinedEffectiveMassAlongAxis (InverseMass inverseMassA, InverseMass inverseMassB, const InverseMomentOfInertiaTensor< N > &inverseMomentOfInertiaTensorA, const InverseMomentOfInertiaTensor< N > &inverseMomentOfInertiaTensorB, Length< N > offsetA, Length< N > offsetB, Direction< N > axis)
 Calculate the combined effective mass of two points on two different objects along a given axis.
template<size_t N>
Quantity< N, Mass::Unit > grem::physics::calculateCombinedEffectiveMassesAlongAxes (InverseMass inverseMassA, InverseMass inverseMassB, const InverseMomentOfInertiaTensor< N > &inverseMomentOfInertiaTensorA, const InverseMomentOfInertiaTensor< N > &inverseMomentOfInertiaTensorB, Length< N > offsetA, Length< N > offsetB, OrthonormalBasis< N > axes)
 Calculate the combined effective mass of two points on two different objects along each axis of a given orthonormal basis.
MomentOfInertia2D grem::physics::calculateCombinedEffectiveMomentOfInertiaAroundAxis (const InverseMomentOfInertiaTensor3D &inverseMomentOfInertiaTensorA, const InverseMomentOfInertiaTensor3D &inverseMomentOfInertiaTensorB, Direction3D axis)
 Calculate the combined effective moment of inertia of two objects around a given axis.
template<size_t N>
MomentOfInertiaTensor< N > grem::physics::calculateCombinedEffectiveMomentOfInertiaTensor (const InverseMomentOfInertiaTensor< N > &inverseMomentOfInertiaTensorA, const InverseMomentOfInertiaTensor< N > &inverseMomentOfInertiaTensorB)
 Calculate the combined effective moment of inertia tensor of two objects.
template<size_t N>
LinearVelocity< N > grem::physics::calculatePointVelocity (LinearVelocity< N > linearVelocity, AngularVelocity< N > angularVelocity, Length< N > offset)
 Calculate the linear velocity of a point on an object with linear and angular velocity.
template<size_t N>
void grem::physics::applyImpulse (LinearVelocity< N > &linearVelocity, AngularVelocity< N > &angularVelocity, InverseMass inverseMass, const InverseMomentOfInertiaTensor< N > &inverseMomentOfInertiaTensor, LinearImpulse< N > impulse, Length< N > offset)
 Apply a world-space impulse to an object's velocity.
template<size_t N>
void grem::physics::applyCorrectionImpulse (ObjectActivity &activity, LinearVelocity< N > &linearVelocity, AngularVelocity< N > &angularVelocity, InverseMass inverseMass, const InverseMomentOfInertiaTensor< N > &inverseMomentOfInertiaTensor, LinearImpulse< N > impulse, Length< N > offset)
 Apply a world-space impulse to an object's velocity, making it active and marking it as corrected, unless the object is not correctable.
template<size_t N>
void grem::physics::applyLinearImpulse (LinearVelocity< N > &linearVelocity, InverseMass inverseMass, LinearImpulse< N > linearImpulse)
 Apply a world-space linear impulse to an object's velocity at its center of mass.
template<size_t N>
void grem::physics::applyLinearCorrectionImpulse (ObjectActivity &activity, LinearVelocity< N > &linearVelocity, InverseMass inverseMass, LinearImpulse< N > linearImpulse)
 Apply a world-space linear impulse to an object's velocity at its center of mass, making it active and marking it as corrected, unless the object is not correctable.
template<size_t N>
void grem::physics::applyAngularImpulse (AngularVelocity< N > &angularVelocity, const InverseMomentOfInertiaTensor< N > &inverseMomentOfInertiaTensor, AngularImpulse< N > angularImpulse)
 Apply a world-space angular impulse to an object's velocity at its center of mass.
template<size_t N>
void grem::physics::applyAngularCorrectionImpulse (ObjectActivity &activity, AngularVelocity< N > &angularVelocity, const InverseMomentOfInertiaTensor< N > &inverseMomentOfInertiaTensor, AngularImpulse< N > angularImpulse)
 Apply a world-space angular impulse to an object's velocity at its center of mass, making it active and marking it as corrected, unless the object is not correctable.