#include "UnitTests.hpp"
#include <chrono>
TEST(WorldBody, WorldCreated)
{
auto world = World{};
EXPECT_FALSE(
IsAwake(world, body));
EXPECT_FALSE(
Awaken(world, body));
}
TEST(WorldBody, SetVelocityDoesNothingToStatic)
{
const auto zeroVelocity = Velocity{
};
auto world = World{};
ASSERT_FALSE(
IsAwake(world, body));
};
}
TEST(WorldBody, CreateAttachShape)
{
auto world = World{};
const auto valid_shape =
CreateShape(world, DiskShapeConf(1_m));
EXPECT_NO_THROW(
Attach(world, body, valid_shape));
EXPECT_NO_THROW(
Attach(world, body, Shape{DiskShapeConf{2_m}}));
const auto maxRadius = radiusRange.GetMax();
EXPECT_THROW(
CreateShape(world, DiskShapeConf{radiusRange.GetMin() / 2}), InvalidArgument);
EXPECT_THROW(
CreateShape(world, DiskShapeConf{maxRadius + maxRadius / 10}), InvalidArgument);
}
{
auto world = World{};
EXPECT_NO_THROW(
Destroy(world, bodyID));
const auto shapeId =
CreateShape(world, Shape{DiskShapeConf(1_m)});
ASSERT_NO_THROW(
Attach(world, bodyA, shapeId));
ASSERT_TRUE(
Detach(world, bodyA, shapeId));
EXPECT_FALSE(
Detach(world, bodyA, shapeId));
}
TEST(WorldBody, SetEnabledCausesIsEnabled)
{
auto world = World{};
auto value = true;
for (auto i = 0; i < 4; ++i) {
value = !value;
}
}
{
auto world = World{};
const auto valid_shape =
CreateShape(world, DiskShapeConf(1_m));
ASSERT_NO_THROW(
Attach(world, body, valid_shape));
}
TEST(WorldBody, CreateAndDestroyFixture)
{
auto world = World{};
auto conf = DiskShapeConf{};
conf.vertexRadius = 2.871_m;
conf.location =
Vec2{1.912f, -77.31f} * 1_m;
conf.density = 1_kgpm2;
const auto shape = Shape(conf);
{
Attach(world, bodyId, shapeId,
false);
const auto fshape =
GetShape(world, shapeId);
EXPECT_EQ(TypeCast<DiskShapeConf>(fshape).
GetLocation(), conf.GetLocation());
{
auto i = 0;
for (
const auto& f:
GetShapes(world, bodyId))
{
EXPECT_EQ(f, shapeId);
++i;
}
EXPECT_EQ(i, 1);
}
EXPECT_NO_THROW(
Destroy(world, shapeId));
EXPECT_NO_THROW(
Detach(world, bodyId));
}
{
Attach(world, bodyId, shapeId,
false);
const auto fshape =
GetShape(world, shapeId);
EXPECT_EQ(TypeCast<DiskShapeConf>(fshape).
GetLocation(), conf.GetLocation());
{
auto i = 0;
for (
const auto& f:
GetShapes(world, bodyId)) {
EXPECT_EQ(f, shapeId);
++i;
}
EXPECT_EQ(i, 1);
}
}
}
{
auto world = World{};
}
TEST(WorldBody, StaticIsExpected)
{
auto world = World{};
}
TEST(WorldBody, KinematicIsExpected)
{
auto world = World{};
}
TEST(WorldBody, DynamicIsExpected)
{
auto world = World{};
}
{
const auto center =
Length2{0_m, 0_m};
const auto rotInertia = 3 * rotInertiaUnits;
{
auto world = World{};
EXPECT_EQ(
GetMass(world, body), 1_kg);
EXPECT_EQ(
GetRotInertia(world, body), std::numeric_limits<Real>::infinity() * rotInertiaUnits);
}
{
auto world = World{};
EXPECT_EQ(
GetMass(world, body), 1_kg);
EXPECT_EQ(
GetRotInertia(world, body), std::numeric_limits<Real>::infinity() * rotInertiaUnits);
EXPECT_EQ(
GetRotInertia(world, body), std::numeric_limits<Real>::infinity() * rotInertiaUnits);
}
{
auto world = World{};
EXPECT_EQ(
GetMass(world, body), 0_kg);
EXPECT_EQ(
GetRotInertia(world, body), std::numeric_limits<Real>::infinity() * rotInertiaUnits);
EXPECT_EQ(
GetMass(world, body), 0_kg);
EXPECT_EQ(
GetRotInertia(world, body), std::numeric_limits<Real>::infinity() * rotInertiaUnits);
}
}
{
auto bd = BodyConf{};
auto world = World{};
static_cast<double>(
GetX(xfm2.q)),
0.001);
static_cast<double>(
GetY(xfm2.q)),
0.001);
EXPECT_NO_THROW(
Destroy(world, body));
}
{
{
auto world = World{};
ASSERT_FALSE(
IsAwake(world, body));
ASSERT_FALSE(
IsAwake(world, body));
EXPECT_FALSE(
IsAwake(world, body));
EXPECT_FALSE(
IsAwake(world, body));
EXPECT_FALSE(
IsAwake(world, body));
}
{
auto world = World{};
ASSERT_FALSE(
IsAwake(world, body));
EXPECT_FALSE(
IsAwake(world, body));
EXPECT_FALSE(
IsAwake(world, body));
EXPECT_FALSE(
IsAwake(world, body));
}
{
auto world = World{};
ASSERT_FALSE(
IsAwake(world, body));
EXPECT_FALSE(
IsAwake(world, body));
ASSERT_FALSE(
IsAwake(world, body));
EXPECT_FALSE(
IsAwake(world, body));
SetAcceleration(world, body, someLinearAccel * 0.5f, someAngularAccel * 0.9f);
EXPECT_FALSE(
IsAwake(world, body));
SetAcceleration(world, body, someLinearAccel * 1.5f, someAngularAccel * 1.9f);
ASSERT_FALSE(
IsAwake(world, body));
SetAcceleration(world, body, someLinearAccel * 1.5f, someAngularAccel * 2.0f);
ASSERT_FALSE(
IsAwake(world, body));
SetAcceleration(world, body, someLinearAccel * 2.0f, someAngularAccel * 2.0f);
ASSERT_FALSE(
IsAwake(world, body));
SetAcceleration(world, body, someLinearAccel * -1.0f, someAngularAccel * 2.0f);
}
}
TEST(WorldBody, SetAngularAcceleration)
{
auto world = World{};
}
TEST(WorldBody, SetAngularVelocity)
{
auto world = World{};
}
{
auto world = World{};
const auto shapeId =
CreateShape(world, PolygonShapeConf(1_m, 1_m).UseDensity(1_kgpm2));
ASSERT_EQ(
GetMass(world, body), 4_kg);
}
{
auto world = World{};
const auto shapeId =
CreateShape(world, PolygonShapeConf(1_m, 1_m).UseDensity(1_kgpm2));
ASSERT_EQ(
GetMass(world, body), 4_kg);
}
{
auto world = World{};
const auto shapeId =
CreateShape(world, PolygonShapeConf(1_m, 1_m).UseDensity(1_kgpm2));
ASSERT_EQ(
GetMass(world, body), 4_kg);
}
{
auto world = World{};
const auto shapeId =
CreateShape(world, PolygonShapeConf(1_m, 1_m).UseDensity(1_kgpm2));
ASSERT_EQ(
GetMass(world, body), 4_kg);
}
TEST(WorldBody, CreateLotsOfFixtures)
{
auto bd = BodyConf{};
auto conf = DiskShapeConf{};
conf.vertexRadius = 2.871_m;
conf.location =
Vec2{1.912f, -77.31f} * 1_m;
conf.density = 1.3_kgpm2;
const auto shape = Shape(conf);
const auto num = 5000;
std::chrono::time_point<std::chrono::system_clock> start,
end;
start = std::chrono::system_clock::now();
{
auto world = World{};
for (auto i = decltype(num){0}; i < num; ++i)
{
ASSERT_NO_THROW(
Attach(world, body, shapeId,
false));
}
{
int i = decltype(num){0};
for ([[maybe_unused]]
auto&& f:
GetShapes(world, body))
{
++i;
}
EXPECT_EQ(i, num);
}
}
end = std::chrono::system_clock::now();
const std::chrono::duration<double> elapsed_secs_resetting_at_end =
end - start;
start = std::chrono::system_clock::now();
{
auto world = World{};
for (auto i = decltype(num){0}; i < num; ++i)
{
ASSERT_NO_THROW(
Attach(world, body, shapeId,
true));
}
{
auto i = decltype(num){0};
for ([[maybe_unused]]
auto&& f:
GetShapes(world, body))
{
++i;
}
EXPECT_EQ(i, num);
}
}
end = std::chrono::system_clock::now();
const std::chrono::duration<double> elapsed_secs_resetting_in_create =
end - start;
EXPECT_LT(elapsed_secs_resetting_at_end.count(), elapsed_secs_resetting_in_create.count());
}
{
auto world = World{};
}
TEST(WorldBody, ApplyLinearAccelDoesNothingToStatic)
{
auto world = World{};
ASSERT_FALSE(
IsAwake(world, body));
};
};
}
TEST(WorldBody, GetAccelerationFF)
{
auto world = World{};
}
TEST(WorldBody, SetAccelerationFF)
{
auto world = World{};
const auto newAccel = Acceleration{
};
}
{
auto world = World{};
const auto l1 =
Length2{-8_m, 0_m};
const auto l2 =
Length2{+8_m, 0_m};
const auto l3 =
Length2{+16_m, 0_m};
const auto shapeId =
CreateShape(world, DiskShapeConf{}.UseRadius(2_m).UseDensity(1e10_kgpm2));
{
0.032761313021183014, 0.032761313021183014/100);
}
{
0.032761313021183014, 0.032761313021183014/100);
}
}
TEST(WorldBody, RotateAboutWorldPointFF)
{
auto world = World{};
ASSERT_EQ(locationA,
Length2(0_m, 0_m));
EXPECT_NEAR(
static_cast<double>(
Real(
GetX(locationB)/
Meter)), +2.0, 0.001);
EXPECT_NEAR(
static_cast<double>(
Real(
GetY(locationB)/
Meter)), -2.0, 0.001);
}
TEST(WorldBody, RotateAboutLocalPointFF)
{
auto world = World{};
ASSERT_EQ(locationA,
Length2(0_m, 0_m));
EXPECT_NEAR(
static_cast<double>(
Real(
GetX(locationB)/
Meter)), +2.0, 0.001);
EXPECT_NEAR(
static_cast<double>(
Real(
GetY(locationB)/
Meter)), -2.0, 0.001);
}
{
const auto l1 =
Length2{-8_m, 0_m};
auto world = World{};
const auto shapeId =
CreateShape(world, DiskShapeConf{}.UseRadius(2_m).UseDensity(1_kgpm2));
}
TEST(WorldBody, GetPositionFF)
{
const auto position = Position{
Length2{-33_m, +4_m}, 10_deg};
auto world = World{};
SetAngle(world, body, position.angular);
static_cast<double>(
Real(position.angular /
Degree)),
0.0001);
}
TEST(WorldBody, GetSetTransformationFF)
{
auto world = World{};
EXPECT_EQ(xfm1.p, xfm0.p);
EXPECT_NEAR(
static_cast<double>(
GetX(xfm1.q)),
static_cast<double>(
GetX(xfm0.q)), 0.0001);
EXPECT_NEAR(
static_cast<double>(
GetY(xfm1.q)),
static_cast<double>(
GetY(xfm0.q)), 0.0001);
}
{
{
World world;
EXPECT_FALSE(
IsAwake(world, body));
}
{
World world;
EXPECT_FALSE(
IsAwake(world, body));
EXPECT_FALSE(
IsAwake(world, body));
}
}
{
auto world = World{};
for (auto i = 1; i < 10; ++i) {
}
ASSERT_NO_THROW(
Destroy(world, body));
ASSERT_NO_THROW(
Clear(world));
ASSERT_NO_THROW(
Destroy(world, body));
}
{
auto world = World{};
ASSERT_NO_THROW(shape =
CreateShape(world, DiskShapeConf{}.UseRadius(1_m).UseDensity(1_kgpm2)));
}
{
auto world = World{};
ASSERT_NO_THROW(shape =
CreateShape(world, DiskShapeConf{}.UseRadius(1_m).UseDensity(1_kgpm2)));
36.475624084472656, 1e-5);
}
Declarations of BodyConf class & free functions associated with it.
Definition of the DiskShapeConf class and closely related code.
Definition of the Joint class and closely related code.
Definition of the PolygonShapeConf class and closely related code.
Declarations of the StepConf class, and free functions associated with it.
Declarations of free functions of World for bodies identified by BodyID.
Declarations of free functions of World for unidentified information.
Declarations of free functions of World for shapes identified by ShapeID.
Definitions of the World class and closely related code.
static constexpr UnitVec GetUpRight() noexcept
Gets the 45 degree unit vector.
Definition: UnitVec.hpp:147
static constexpr UnitVec GetLeft() noexcept
Gets the left-ward oriented unit vector.
Definition: UnitVec.hpp:134
static constexpr UnitVec GetRight() noexcept
Gets the right-ward oriented unit vector.
Definition: UnitVec.hpp:122
detail::torque Torque
Torque quantity.
Definition: Units.hpp:341
detail::angular_acceleration AngularAcceleration
Angular acceleration quantity.
Definition: Units.hpp:321
detail::angular_momentum AngularMomentum
Angular momentum quantity.
Definition: Units.hpp:390
detail::angular_velocity AngularVelocity
Angular velocity quantity.
Definition: Units.hpp:311
detail::acceleration LinearAcceleration
Linear acceleration quantity.
Definition: Units.hpp:262
detail::velocity LinearVelocity
Linear velocity quantity.
Definition: Units.hpp:253
constexpr auto MeterPerSquareSecond
Meter per square second unit of linear acceleration.
Definition: Units.hpp:431
constexpr auto RadianPerSquareSecond
Radian per square second unit of angular acceleration.
Definition: Units.hpp:478
constexpr auto SquareMeter
Square meter unit of area.
Definition: Units.hpp:441
constexpr auto RadianPerSecond
Radian per second unit of angular velocity.
Definition: Units.hpp:468
constexpr auto SquareSecond
Square second unit.
Definition: Units.hpp:410
constexpr auto DegreePerSquareSecond
Degree per square second unit of angular acceleration.
Definition: Units.hpp:483
constexpr auto SquareRadian
Square radian unit type.
Definition: Units.hpp:463
constexpr auto Meter
Meter unit of Length.
Definition: Units.hpp:423
constexpr auto Newton
Newton unit of force.
Definition: Units.hpp:487
constexpr auto Kilogram
Kilogram unit of mass.
Definition: Units.hpp:437
constexpr auto NewtonMeterSecond
Newton meter second unit of angular momentum.
Definition: Units.hpp:502
constexpr auto Radian
Radian unit of angle.
Definition: Units.hpp:453
constexpr auto Degree
Degree unit of angle quantity.
Definition: Units.hpp:458
void SetAcceleration(Body &body, const Acceleration &value) noexcept
Sets the accelerations on the given body.
Definition: Body.hpp:1167
void ApplyAngularImpulse(Body &body, AngularMomentum impulse) noexcept
Applies an angular impulse.
Definition: Body.cpp:321
const BodyIDs & GetBodiesForProxies(const AabbTreeWorld &world) noexcept
Gets the bodies-for-proxies container for this world.
Definition: AabbTreeWorld.hpp:1050
NonNegative< Length > GetVertexRadius(const ChainShapeConf &arg) noexcept
Gets the vertex radius of the given shape configuration.
Definition: ChainShapeConf.hpp:234
std::size_t size(const DynamicTree &tree) noexcept
Gets the "size" of the given tree.
Definition: DynamicTree.hpp:715
bool IsAwake(const Body &body) noexcept
Gets the awake/asleep state of this body.
Definition: Body.hpp:884
Velocity GetVelocity(const Body &body) noexcept
Gets the velocity.
Definition: Body.hpp:1292
void SetTorque(World &world, BodyID id, Torque torque)
Sets the given amount of torque to the given body.
Definition: WorldBody.cpp:530
BodyCounter GetBodyCount(const World &world) noexcept
Gets the body count in the given world.
Definition: WorldBody.cpp:594
::playrho::detail::MassData< 2 > MassData
Mass data alias for 2-D objects.
Definition: MassData.hpp:88
Length2 GetWorldCenter(const Body &body) noexcept
Get the world position of the center of mass.
Definition: Body.hpp:1043
Position GetPosition(const Body &body) noexcept
Gets the body's position.
Definition: Body.hpp:1056
void ApplyForce(World &world, BodyID id, const Force2 &force, const Length2 &point)
Apply a force at a world point.
Definition: WorldBody.cpp:483
constexpr auto GetY(const UnitVec &value) -> decltype(get< 1 >(value))
Gets the "Y" element of the given value - i.e. the second element.
Definition: UnitVec.hpp:499
void SetType(Body &body, BodyType value) noexcept
Sets the type of this body.
Definition: Body.hpp:756
Angle GetAngle(const Body &body) noexcept
Gets the body's angle.
Definition: Body.cpp:280
AngularVelocity GetAngularVelocity(const Body &body) noexcept
Gets the angular velocity.
Definition: Body.hpp:1322
BodyID CreateBody(AabbTreeWorld &world, Body body=Body{})
Creates a rigid body that's a copy of the given one.
Definition: AabbTreeWorld.cpp:1019
LinearVelocity2 GetLinearVelocity(const Body &body) noexcept
Gets the linear velocity of the center of mass.
Definition: Body.hpp:1312
void SetForce(World &world, BodyID id, const Force2 &force, const Length2 &point)
Sets the given amount of force at the given point to the given body.
Definition: WorldBody.cpp:520
Mass GetMass(const Body &body) noexcept
Gets the mass of the body.
Definition: Body.hpp:1217
BodyType GetType(const Body &body) noexcept
Gets the type of this body.
Definition: Body.hpp:748
void SetTransform(World &world, BodyID id, const Length2 &location, Angle angle)
Sets the position of the body's origin and rotation.
Definition: WorldBody.hpp:211
bool Awaken(Body &body) noexcept
Awakens the body if it's asleep.
Definition: Body.hpp:1191
const BodyIDs & GetBodies(const AabbTreeWorld &world) noexcept
Gets a container of valid world body identifiers for this constant world.
Definition: AabbTreeWorld.hpp:1045
RotInertia GetRotInertia(const Body &body) noexcept
Gets the rotational inertia of the body.
Definition: Body.hpp:1235
ShapeID CreateShape(AabbTreeWorld &world, Shape def)
Creates an identifiable copy of the given shape within this world.
Definition: AabbTreeWorld.cpp:1234
void SetFixedRotation(Body &body, bool value)
Sets this body to have fixed rotation.
Definition: Body.hpp:1082
void SetLocation(Body &body, const Length2 &value)
Sets the body's location.
Definition: Body.cpp:275
void SetAwake(Body &body) noexcept
Awakens this body.
Definition: Body.hpp:898
void Clear(AabbTreeWorld &world) noexcept
Clears this world.
Definition: AabbTreeWorld.cpp:954
void Attach(AabbTreeWorld &world, BodyID id, ShapeID shapeID)
Associates a validly identified shape with the validly identified body.
Definition: AabbTreeWorld.cpp:2896
Force2 GetCentripetalForce(const World &world, BodyID id, const Length2 &axis)
Gets the centripetal force necessary to put the body into an orbit having the given radius.
Definition: WorldBody.cpp:467
const Transformation & GetTransformation(const Body &body) noexcept
Gets the body's transformation.
Definition: Body.hpp:1014
const BodyContactIDs & GetContacts(const AabbTreeWorld &world, BodyID id)
Gets the contacts associated with the identified body.
Definition: AabbTreeWorld.cpp:2554
void Destroy(AabbTreeWorld &world, BodyID id)
Destroys the identified body.
Definition: AabbTreeWorld.cpp:1062
ShapeCounter GetShapeCount(const World &world, BodyID id)
Gets the count of shapes associated with the identified body.
Definition: WorldBody.cpp:100
void SetAngle(Body &body, Angle value)
Sets the body's angular orientation.
Definition: Body.cpp:285
bool IsSpeedable(const Body &body) noexcept
Is "speedable".
Definition: Body.hpp:786
void RotateAboutWorldPoint(World &world, BodyID id, Angle amount, const Length2 &worldPoint)
Rotates a body a given amount around a point in world coordinates.
Definition: WorldBody.cpp:172
Length2 GetLocation(const Body &body) noexcept
Gets the body's origin location.
Definition: Body.hpp:930
Acceleration CalcGravitationalAcceleration(const World &world, BodyID id)
Calculates the gravitationally associated acceleration for the given body within its world.
Definition: WorldBody.cpp:190
bool IsImpenetrable(const Body &body) noexcept
Is this body treated like a bullet for continuous collision detection?
Definition: Body.hpp:805
bool IsFixedRotation(const Body &body) noexcept
Does this body have fixed rotation?
Definition: Body.hpp:1073
void ApplyTorque(World &world, BodyID id, Torque torque)
Applies a torque.
Definition: WorldBody.cpp:498
AngularAcceleration GetAngularAcceleration(const Body &body) noexcept
Gets this body's angular acceleration.
Definition: Body.hpp:1183
BodyCounter GetWorldIndex(const World &, BodyID id) noexcept
Gets the world index for the given body.
Definition: WorldBody.cpp:226
const Shape & GetShape(const AabbTreeWorld &world, ShapeID id)
Gets the identified shape.
Definition: AabbTreeWorld.cpp:1279
Interval< Positive< Length > > GetVertexRadiusInterval(const AabbTreeWorld &world) noexcept
Gets the vertex radius interval allowable for the given world.
Definition: AabbTreeWorld.hpp:1096
bool Detach(AabbTreeWorld &world, BodyID id, ShapeID shapeID)
Disassociates a validly identified shape from the validly identified body.
Definition: AabbTreeWorld.cpp:2903
void RotateAboutLocalPoint(World &world, BodyID id, Angle amount, const Length2 &localPoint)
Rotates a body a given amount around a point in body local coordinates.
Definition: WorldBody.cpp:185
bool IsEnabled(const Body &body) noexcept
Gets the enabled/disabled state of the body.
Definition: Body.hpp:850
const BodyJointIDs & GetJoints(const AabbTreeWorld &world, BodyID id)
Definition: AabbTreeWorld.cpp:2559
void ResetMassData(World &world, BodyID id)
Resets the mass data properties.
Definition: WorldBody.cpp:360
void SetEnabled(Body &body) noexcept
Sets the enabled state.
Definition: Body.hpp:858
Acceleration GetAcceleration(const Body &body) noexcept
Gets the given body's acceleration.
Definition: Body.hpp:1155
bool IsAccelerable(const Body &body) noexcept
Is "accelerable".
Definition: Body.hpp:797
constexpr auto GetX(const UnitVec &value)
Gets the "X" element of the given value - i.e. the first element.
Definition: UnitVec.hpp:493
void SetVelocity(Body &body, const Velocity &value) noexcept
Sets the body's velocity (linear and angular velocity).
Definition: Body.hpp:1302
BodyCounter GetBodyRange(const AabbTreeWorld &world) noexcept
Gets the extent of the currently valid body range.
Definition: AabbTreeWorld.cpp:1004
void ApplyLinearImpulse(Body &body, const Momentum2 &impulse, const Length2 &point) noexcept
Applies an impulse at a point.
Definition: Body.cpp:311
LinearAcceleration2 GetLinearAcceleration(const Body &body) noexcept
Gets this body's linear acceleration.
Definition: Body.hpp:1175
bool IsMassDataDirty(const Body &body) noexcept
Gets whether the mass data for this body is "dirty".
Definition: Body.hpp:1089
void SetMassData(World &world, BodyID id, const MassData &massData)
Sets the mass properties to override the mass properties of the fixtures.
Definition: WorldBody.cpp:365
void SetTransformation(Body &body, const Transformation &value) noexcept
Sets the body's transformation.
Definition: Body.cpp:270
void UnsetAwake(Body &body) noexcept
Sets this body to asleep if sleeping is allowed.
Definition: Body.hpp:913
const std::vector< ShapeID > & GetShapes(const AabbTreeWorld &world, BodyID id)
Disassociates all of the associated shape from the validly identified body.
Definition: AabbTreeWorld.cpp:2913
Real velocity
Velocity quantity type.
Definition: Units.hpp:157
Real mass
Mass quantity type.
Definition: Units.hpp:159
Real force
Force quantity type.
Definition: Units.hpp:166
Real acceleration
Acceleration quantity type.
Definition: Units.hpp:158
Definition: ArrayList.hpp:43
Vector2< Momentum > Momentum2
2-element vector of Momentum quantities.
Definition: Vector2.hpp:76
float Real
Real-number type.
Definition: Real.hpp:69
std::remove_const_t< decltype(MaxBodies)> BodyCounter
Count type for bodies.
Definition: Settings.hpp:187
Vector2< Force > Force2
2-element vector of Force quantities.
Definition: Vector2.hpp:66
Vector2< LinearVelocity > LinearVelocity2
2-element vector of linear velocity (LinearVelocity) quantities.
Definition: Vector2.hpp:58
auto end(ReversionWrapper< T > w)
End function for getting a reversed order iterator.
Definition: Templates.hpp:118
constexpr auto InvalidBodyID
Invalid body ID value.
Definition: BodyID.hpp:50
Vector2< LinearAcceleration > LinearAcceleration2
2-element vector of linear acceleration (LinearAcceleration) quantities.
Definition: Vector2.hpp:62
constexpr auto InvalidShapeID
Invalid shape ID value.
Definition: ShapeID.hpp:50
Vector2< Length > Length2
2-element vector of Length quantities.
Definition: Vector2.hpp:51
constexpr bool empty(IndexPair3 pairs) noexcept
Checks whether the given collection of index pairs is empty.
Definition: IndexPair.hpp:75
Vector2< Real > Vec2
Vector with 2 Real elements.
Definition: Vector2.hpp:47
Length2 linear
Linear position.
Definition: Position.hpp:55