PlayRho  2.0.0
An interactive physics engine & library.
GearJoint.cpp

This is the googletest based unit testing file for the interfaces to playrho::d2::GearJointConf.

/*
* Copyright (c) 2023 Louis Langholtz https://github.com/louis-langholtz/PlayRho
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*/
#include "UnitTests.hpp"
#include <type_traits>
using namespace playrho;
using namespace playrho::d2;
TEST(GearJointConf, DefaultConstruction)
{
auto conf = GearJointConf{};
EXPECT_EQ(conf.bodyA, InvalidBodyID);
EXPECT_EQ(conf.bodyB, InvalidBodyID);
EXPECT_EQ(conf.bodyC, InvalidBodyID);
EXPECT_EQ(conf.bodyD, InvalidBodyID);
EXPECT_EQ(conf.ratio, Real(1));
EXPECT_TRUE(std::holds_alternative<std::monostate>(conf.typeDataAC));
EXPECT_TRUE(std::holds_alternative<std::monostate>(conf.typeDataBD));
EXPECT_EQ(GetTypeAC(conf), GetTypeID<void>());
EXPECT_EQ(GetTypeBD(conf), GetTypeID<void>());
auto bodies = std::vector<BodyConstraint>{};
EXPECT_NO_THROW(InitVelocity(conf, bodies, StepConf{}, ConstraintSolverConf{}));
EXPECT_NO_THROW(SolveVelocity(conf, bodies, StepConf{}));
EXPECT_NO_THROW(SolvePosition(conf, bodies, ConstraintSolverConf{}));
}
#if 0
TEST(GearJointConf, ConstructionRequiresNonNullJoints)
{
EXPECT_THROW(GearJointConf(nullptr, nullptr), NonNull<Joint*>::checker_type::exception_type);
}
TEST(GearJoint, IsOkay)
{
auto world = World{};
const auto b1 = CreateBody(world);
const auto b2 = CreateBody(world);
const auto b3 = CreateBody(world);
const auto b4 = CreateBody(world);
const auto dj = CreateJoint(world, DistanceJointConf{b1, b2});
EXPECT_FALSE(GearJoint::IsOkay(GearJointConf{dj, dj}));
const auto rj1 = CreateJoint(world, GetRevoluteJointConf(world, b1, b2, Length2{}));
const auto rj2 = CreateJoint(world, GetRevoluteJointConf(world, b3, b4, Length2{}));
EXPECT_TRUE(GearJoint::IsOkay(GearJointConf{rj1, rj2}));
EXPECT_FALSE(GearJoint::IsOkay(GearJointConf{rj1, rj1}));
}
#endif
TEST(GearJoint, CreationRevolute)
{
auto world = World{};
const auto body0 = CreateBody(world);
const auto body1 = CreateBody(world);
const auto body2 = CreateBody(world);
const auto body3 = CreateBody(world);
const auto rdef0 = GetRevoluteJointConf(world, body0, body1, Length2{});
const auto rdef1 = GetRevoluteJointConf(world, body2, body3, Length2{});
const auto revJoint1 = CreateJoint(world, rdef0);
const auto revJoint2 = CreateJoint(world, rdef1);
const auto def = GetGearJointConf(world, revJoint1, revJoint2);
ASSERT_EQ(GetTypeAC(def), GetTypeID<RevoluteJointConf>());
ASSERT_EQ(GetTypeBD(def), GetTypeID<RevoluteJointConf>());
const auto joint = CreateJoint(world, def);
EXPECT_EQ(GetType(world, joint), GetTypeID<GearJointConf>());
EXPECT_EQ(GetBodyA(world, joint), def.bodyA);
EXPECT_EQ(GetBodyB(world, joint), def.bodyB);
EXPECT_EQ(GetCollideConnected(world, joint), def.collideConnected);
EXPECT_EQ(GetLinearReaction(world, joint), Momentum2{});
EXPECT_EQ(GetAngularReaction(world, joint), AngularMomentum{0});
EXPECT_EQ(GetLocalAnchorA(world, joint), GetLocalAnchorB(world, revJoint1));
EXPECT_EQ(GetLocalAnchorB(world, joint), GetLocalAnchorB(world, revJoint2));
EXPECT_EQ(GetRatio(world, joint), def.ratio);
const auto djoint = CreateJoint(world, DistanceJointConf{body0, body1});
EXPECT_THROW(CreateJoint(world, GetGearJointConf(world, djoint, revJoint2)), InvalidArgument);
}
TEST(GearJoint, ShiftOrigin)
{
auto world = World{};
const auto body0 = CreateBody(world);
const auto body1 = CreateBody(world);
const auto body2 = CreateBody(world);
const auto body3 = CreateBody(world);
const auto rdef1 = GetRevoluteJointConf(world, body0, body1, Length2{});
const auto rdef2 = GetRevoluteJointConf(world, body2, body3, Length2{});
const auto revJoint1 = CreateJoint(world, rdef1);
const auto revJoint2 = CreateJoint(world, rdef2);
const auto def = GetGearJointConf(world, revJoint1, revJoint2);
const auto joint = CreateJoint(world, def);
const auto newOrigin = Length2{1_m, 1_m};
EXPECT_FALSE(ShiftOrigin(world, joint, newOrigin));
}
TEST(GearJoint, SetRatio)
{
auto world = World{};
const auto body0 = CreateBody(world);
const auto body1 = CreateBody(world);
const auto body2 = CreateBody(world);
const auto body3 = CreateBody(world);
auto rdef1 = GetRevoluteJointConf(world, body0, body1, Length2{});
auto rdef2 = GetRevoluteJointConf(world, body2, body3, Length2{});
const auto revJoint1 = CreateJoint(world, rdef1);
const auto revJoint2 = CreateJoint(world, rdef2);
auto def = GetGearJointConf(world, revJoint1, revJoint2);
const auto joint = CreateJoint(world, def);
ASSERT_EQ(GetRatio(world, joint), Real(1));
auto conf = TypeCast<GearJointConf>(GetJoint(world, joint));
EXPECT_NO_THROW(SetRatio(conf, Real(2)));
EXPECT_EQ(GetRatio(conf), Real(2));
EXPECT_NO_THROW(SetJoint(world, joint, conf));
EXPECT_EQ(GetRatio(world, joint), Real(2));
}
TEST(GearJoint, GetGearJointConfThrows)
{
EXPECT_THROW(GetGearJointConf(Joint{}), std::bad_cast);
}
TEST(GearJoint, GetGearJointConf)
{
auto world = World{};
const auto body0 = CreateBody(world);
const auto body1 = CreateBody(world);
const auto body2 = CreateBody(world);
const auto body3 = CreateBody(world);
auto rdef1 = GetRevoluteJointConf(world, body0, body1, Length2{});
auto rdef2 = GetRevoluteJointConf(world, body2, body3, Length2{});
const auto revJoint1 = CreateJoint(world, rdef1);
const auto revJoint2 = CreateJoint(world, rdef2);
const auto def = GetGearJointConf(world, revJoint1, revJoint2);
const auto joint = CreateJoint(world, def);
ASSERT_EQ(GetType(world, joint), GetTypeID<GearJointConf>());
ASSERT_EQ(GetBodyA(world, joint), def.bodyA);
ASSERT_EQ(GetBodyB(world, joint), def.bodyB);
ASSERT_EQ(GetCollideConnected(world, joint), def.collideConnected);
ASSERT_EQ(GetLocalAnchorA(world, joint), GetLocalAnchorB(world, revJoint1));
ASSERT_EQ(GetLocalAnchorB(world, joint), GetLocalAnchorB(world, revJoint2));
auto conf = TypeCast<GearJointConf>(GetJoint(world, joint));
ASSERT_EQ(GetTypeAC(conf), GetTypeID<decltype(rdef1)>());
ASSERT_EQ(GetTypeBD(conf), GetTypeID<decltype(rdef2)>());
ASSERT_EQ(GetRatio(world, joint), def.ratio);
const auto cdef = GetGearJointConf(GetJoint(world, joint));
EXPECT_EQ(cdef.bodyA, def.bodyA);
EXPECT_EQ(cdef.bodyB, def.bodyB);
EXPECT_EQ(cdef.collideConnected, false);
EXPECT_EQ(GetTypeAC(cdef), GetTypeID<decltype(rdef1)>());
EXPECT_EQ(GetTypeBD(cdef), GetTypeID<decltype(rdef2)>());
EXPECT_EQ(cdef.ratio, Real(1));
}
TEST(GearJoint, WithDynamicCirclesAndRevoluteJoints)
{
auto world = World{};
const auto p1 = Length2{-1_m, 0_m};
const auto p2 = Length2{+1_m, 0_m};
const auto p3 = Length2{+2_m, 0_m};
const auto p4 = Length2{+3_m, 0_m};
const auto shapeId = CreateShape(world, DiskShapeConf{}.UseRadius(0.2_m));
const auto b1 = CreateBody(world, BodyConf{}.Use(BodyType::Dynamic).UseLocation(p1));
const auto b2 = CreateBody(world, BodyConf{}.Use(BodyType::Dynamic).UseLocation(p2));
const auto b3 = CreateBody(world, BodyConf{}.Use(BodyType::Dynamic).UseLocation(p3));
const auto b4 = CreateBody(world, BodyConf{}.Use(BodyType::Dynamic).UseLocation(p4));
Attach(world, b1, shapeId);
Attach(world, b2, shapeId);
const auto def =
GetGearJointConf(world, CreateJoint(world, GetRevoluteJointConf(world, b1, b2, Length2{})),
CreateJoint(world, GetRevoluteJointConf(world, b4, b3, Length2{})));
const auto joint = CreateJoint(world, def);
ASSERT_NE(joint, InvalidJointID);
Step(world, 1_s);
EXPECT_NEAR(double(Real{GetX(GetLocation(world, b1)) / Meter}), -1.0, 0.001);
EXPECT_NEAR(double(Real{GetY(GetLocation(world, b1)) / Meter}), 0.0, 0.001);
EXPECT_NEAR(double(Real{GetX(GetLocation(world, b2)) / Meter}), +1.0, 0.01);
EXPECT_NEAR(double(Real{GetY(GetLocation(world, b2)) / Meter}), 0.0, 0.01);
EXPECT_EQ(GetAngle(world, b1), 0_deg);
EXPECT_EQ(GetAngle(world, b2), 0_deg);
}
TEST(GearJoint, WithDynamicCirclesAndPrismaticJoints)
{
auto world = World{};
const auto p1 = Length2{-1_m, 0_m};
const auto p2 = Length2{+1_m, 0_m};
const auto p3 = Length2{+2_m, 0_m};
const auto p4 = Length2{+3_m, 0_m};
const auto shapeId = CreateShape(world, DiskShapeConf{}.UseRadius(0.2_m));
const auto b1 = CreateBody(world, BodyConf{}.Use(BodyType::Dynamic).UseLocation(p1));
const auto b2 = CreateBody(world, BodyConf{}.Use(BodyType::Dynamic).UseLocation(p2));
const auto b3 = CreateBody(world, BodyConf{}.Use(BodyType::Dynamic).UseLocation(p3));
const auto b4 = CreateBody(world, BodyConf{}.Use(BodyType::Dynamic).UseLocation(p4));
Attach(world, b1, shapeId);
Attach(world, b2, shapeId);
const auto def = GetGearJointConf(
world,
EXPECT_EQ(GetTypeAC(def), GetTypeID<PrismaticJointConf>());
EXPECT_EQ(GetTypeBD(def), GetTypeID<PrismaticJointConf>());
EXPECT_EQ(GetLocalAnchorA(def), Length2(-1_m, 0_m));
EXPECT_EQ(GetLocalAnchorB(def), Length2(-2_m, 0_m));
const auto joint = CreateJoint(world, def);
ASSERT_NE(joint, InvalidJointID);
Step(world, 1_s);
EXPECT_NEAR(double(Real{GetX(GetLocation(world, b1)) / Meter}), -1.0, 0.001);
EXPECT_NEAR(double(Real{GetY(GetLocation(world, b1)) / Meter}), 0.0, 0.001);
EXPECT_NEAR(double(Real{GetX(GetLocation(world, b2)) / Meter}), +1.0, 0.01);
EXPECT_NEAR(double(Real{GetY(GetLocation(world, b2)) / Meter}), 0.0, 0.01);
EXPECT_EQ(GetAngle(world, b1), 0_deg);
EXPECT_EQ(GetAngle(world, b2), 0_deg);
}
TEST(GearJoint, GetAnchorAandB)
{
auto world = World{};
const auto p1 = Length2{-1_m, 0_m};
const auto p2 = Length2{+1_m, 0_m};
const auto p3 = Length2{+2_m, 0_m};
const auto p4 = Length2{+3_m, 0_m};
const auto shapeId = CreateShape(world, DiskShapeConf{}.UseRadius(0.2_m));
const auto b1 = CreateBody(world, BodyConf{}.Use(BodyType::Dynamic).UseLocation(p1));
const auto b2 = CreateBody(world, BodyConf{}.Use(BodyType::Dynamic).UseLocation(p2));
const auto b3 = CreateBody(world, BodyConf{}.Use(BodyType::Dynamic).UseLocation(p3));
const auto b4 = CreateBody(world, BodyConf{}.Use(BodyType::Dynamic).UseLocation(p4));
Attach(world, b1, shapeId);
Attach(world, b2, shapeId);
const auto def =
GetGearJointConf(world, CreateJoint(world, GetRevoluteJointConf(world, b1, b2, Length2{})),
CreateJoint(world, GetRevoluteJointConf(world, b4, b3, Length2{})));
const auto joint = CreateJoint(world, def);
ASSERT_NE(joint, InvalidJointID);
const auto anchorA =
GetWorldPoint(world, GetBodyA(world, joint), GetLocalAnchorA(world, joint));
const auto anchorB =
GetWorldPoint(world, GetBodyB(world, joint), GetLocalAnchorB(world, joint));
EXPECT_EQ(GetAnchorA(world, joint), anchorA);
EXPECT_EQ(GetAnchorB(world, joint), anchorB);
}
TEST(GearJointConf, EqualsOperator)
{
EXPECT_TRUE(GearJointConf() == GearJointConf());
{
auto conf = GearJointConf{};
conf.typeDataAC = GearJointConf::PrismaticData{Length2{1.2_m, -3_m}, Length2{}, UnitVec::GetUp()};
EXPECT_TRUE(conf == conf);
EXPECT_FALSE(GearJointConf() == conf);
}
{
auto conf = GearJointConf{};
conf.typeDataAC = GearJointConf::PrismaticData{Length2{}, Length2{1.2_m, -3_m}, UnitVec::GetUp()};
EXPECT_TRUE(conf == conf);
EXPECT_FALSE(GearJointConf() == conf);
}
{
auto conf = GearJointConf{};
conf.typeDataAC = GearJointConf::RevoluteData{23_deg};
EXPECT_TRUE(conf == conf);
EXPECT_FALSE(GearJointConf() == conf);
}
{
auto conf = GearJointConf{};
conf.typeDataBD = GearJointConf::RevoluteData{19_deg};
EXPECT_TRUE(conf == conf);
EXPECT_FALSE(GearJointConf() == conf);
}
// TODO: test remaining fields.
}
TEST(GearJointConf, NotEqualsOperator)
{
EXPECT_FALSE(GearJointConf() != GearJointConf());
{
auto conf = GearJointConf{};
conf.mass = Real(3.4);
EXPECT_FALSE(conf != conf);
EXPECT_TRUE(GearJointConf() != conf);
}
// TODO: test remaining fields.
}
TEST(GearJointConf, GetName)
{
EXPECT_STREQ(GetName(GetTypeID<GearJointConf>()), "d2::GearJointConf");
}
TEST(GearJointConf, InitVelocity)
{
auto conf = GearJointConf{};
std::vector<BodyConstraint> bodies;
EXPECT_NO_THROW(InitVelocity(conf, bodies, StepConf{}, ConstraintSolverConf{}));
conf.bodyA = BodyID(0);
conf.bodyB = BodyID(0);
conf.bodyC = BodyID(0);
conf.bodyD = BodyID(0);
EXPECT_THROW(InitVelocity(conf, bodies, StepConf{}, ConstraintSolverConf{}), std::out_of_range);
const auto posA = Position{Length2{-5_m, 0_m}, 0_deg};
bodies.push_back(BodyConstraint{Real(1) / 4_kg, InvRotInertia{}, Length2{}, posA, Velocity{}});
EXPECT_NO_THROW(InitVelocity(conf, bodies, StepConf{}, ConstraintSolverConf{}));
}
TEST(GearJointConf, SolveVelocity)
{
auto conf = GearJointConf{};
std::vector<BodyConstraint> bodies;
auto result = false;
EXPECT_NO_THROW(result = SolveVelocity(conf, bodies, StepConf{}));
EXPECT_TRUE(result);
conf.bodyA = BodyID(0);
conf.bodyB = BodyID(0);
conf.bodyC = BodyID(0);
conf.bodyD = BodyID(0);
EXPECT_THROW(SolveVelocity(conf, bodies, StepConf{}), std::out_of_range);
const auto posA = Position{Length2{-5_m, 0_m}, 0_deg};
bodies.push_back(BodyConstraint{Real(1) / 4_kg, InvRotInertia{}, Length2{}, posA, Velocity{}});
EXPECT_NO_THROW(result = SolveVelocity(conf, bodies, StepConf{}));
}
TEST(GearJointConf, SolvePosition)
{
auto conf = GearJointConf{};
std::vector<BodyConstraint> bodies;
auto result = false;
EXPECT_NO_THROW(result = SolvePosition(conf, bodies, ConstraintSolverConf{}));
EXPECT_TRUE(result);
conf.bodyA = BodyID(0);
conf.bodyB = BodyID(0);
conf.bodyC = BodyID(0);
conf.bodyD = BodyID(0);
EXPECT_THROW(SolvePosition(conf, bodies, ConstraintSolverConf{}), std::out_of_range);
const auto posA = Position{Length2{-5_m, 0_m}, 0_deg};
bodies.push_back(BodyConstraint{Real(1) / 4_kg, InvRotInertia{}, Length2{}, posA, Velocity{}});
EXPECT_NO_THROW(result = SolvePosition(conf, bodies, ConstraintSolverConf{}));
}
Declarations of BodyConf class & free functions associated with it.
Definition of the BodyConstraint class and closely related code.
Definition of the ConstraintSolverConf class and closely related code.
Definition of the DiskShapeConf class and closely related code.
Definition of the DistanceJointConf class and closely related code.
Definition of the GearJointConf class and closely related code.
Definition of the Joint class and closely related code.
Definition of the PrismaticJointConf class and closely related code.
Definition of the RevoluteJointConf 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 joints identified by JointID.
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 GetUp() noexcept
Gets the up-ward oriented unit vector.
Definition: UnitVec.hpp:128
detail::angular_momentum AngularMomentum
Angular momentum quantity.
Definition: Units.hpp:390
detail::inverse_moment_of_inertia InvRotInertia
Inverse rotational inertia quantity.
Definition: Units.hpp:368
constexpr auto Meter
Meter unit of Length.
Definition: Units.hpp:423
Definition: AABB.hpp:48
constexpr auto SetRatio(GearJointConf &object, Real value) noexcept
Free function for setting the ratio value of the given configuration.
Definition: GearJointConf.hpp:270
bool SolveVelocity(DistanceJointConf &object, const Span< BodyConstraint > &bodies, const StepConf &step)
Solves velocity constraint.
Definition: DistanceJointConf.cpp:169
TypeID GetTypeBD(const GearJointConf &object) noexcept
Free function for getting joint 2 type value of the given configuration.
Definition: GearJointConf.cpp:489
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
constexpr Momentum2 GetLinearReaction(const DistanceJointConf &object) noexcept
Gets the current linear reaction for the given configuration.
Definition: DistanceJointConf.hpp:175
Length2 GetLocalAnchorB(const GearJointConf &conf)
Gets the local anchor B property of the given joint.
Definition: GearJointConf.cpp:510
Angle GetAngle(const Body &body) noexcept
Gets the body's angle.
Definition: Body.cpp:280
BodyID CreateBody(AabbTreeWorld &world, Body body=Body{})
Creates a rigid body that's a copy of the given one.
Definition: AabbTreeWorld.cpp:1019
GearJointConf GetGearJointConf(const Joint &joint)
Gets the definition data for the given joint.
Definition: GearJointConf.cpp:87
BodyID GetBodyB(const Joint &object) noexcept
Gets the second body attached to this joint.
Definition: Joint.hpp:295
BodyType GetType(const Body &body) noexcept
Gets the type of this body.
Definition: Body.hpp:748
void ShiftOrigin(AabbTreeWorld &world, const Length2 &newOrigin)
Shifts the world origin.
Definition: AabbTreeWorld.cpp:2221
bool SolvePosition(const DistanceJointConf &object, const Span< BodyConstraint > &bodies, const ConstraintSolverConf &conf)
Solves the position constraint.
Definition: DistanceJointConf.cpp:203
ShapeID CreateShape(AabbTreeWorld &world, Shape def)
Creates an identifiable copy of the given shape within this world.
Definition: AabbTreeWorld.cpp:1234
Length2 GetWorldPoint(const Body &body, const Length2 &localPoint) noexcept
Gets the world coordinates of a point given in coordinates relative to the body's origin.
Definition: Body.hpp:1352
PrismaticJointConf GetPrismaticJointConf(const Joint &joint)
Gets the definition data for the given joint.
Definition: PrismaticJointConf.cpp:127
const Joint & GetJoint(const AabbTreeWorld &world, JointID id)
Gets the identified joint.
Definition: AabbTreeWorld.cpp:2855
RevoluteJointConf GetRevoluteJointConf(const Joint &joint)
Gets the definition data for the given joint.
Definition: RevoluteJointConf.cpp:103
BodyID GetBodyA(const Joint &object) noexcept
Gets the first body attached to this joint.
Definition: Joint.hpp:290
void Attach(AabbTreeWorld &world, BodyID id, ShapeID shapeID)
Associates a validly identified shape with the validly identified body.
Definition: AabbTreeWorld.cpp:2896
TypeID GetTypeAC(const GearJointConf &object) noexcept
Free function for getting joint 1 type value of the given configuration.
Definition: GearJointConf.cpp:476
Length2 GetLocation(const Body &body) noexcept
Gets the body's origin location.
Definition: Body.hpp:930
Length2 GetAnchorB(const World &world, JointID id)
Definition: WorldJoint.cpp:179
JointID CreateJoint(AabbTreeWorld &world, Joint def)
Creates a joint to constrain one or more bodies.
Definition: AabbTreeWorld.cpp:1132
Length2 GetAnchorA(const World &world, JointID id)
Definition: WorldJoint.cpp:171
Length2 GetLocalAnchorA(const GearJointConf &conf)
Gets the local anchor A property of the given joint.
Definition: GearJointConf.cpp:502
constexpr auto GetRatio(const GearJointConf &object) noexcept
Free function for getting the ratio value of the given configuration.
Definition: GearJointConf.hpp:263
bool GetCollideConnected(const Joint &object) noexcept
Gets collide connected.
Definition: Joint.hpp:300
constexpr auto GetX(const UnitVec &value)
Gets the "X" element of the given value - i.e. the first element.
Definition: UnitVec.hpp:493
void SetJoint(AabbTreeWorld &world, JointID id, Joint def)
Sets the identified joint.
Definition: AabbTreeWorld.cpp:1108
StepStats Step(AabbTreeWorld &world, const StepConf &conf)
Steps the world simulation according to the given configuration.
Definition: AabbTreeWorld.cpp:2144
constexpr AngularMomentum GetAngularReaction(const DistanceJointConf &) noexcept
Gets the current angular reaction for the given configuration.
Definition: DistanceJointConf.hpp:182
void InitVelocity(DistanceJointConf &object, const Span< BodyConstraint > &bodies, const StepConf &step, const ConstraintSolverConf &conf)
Initializes velocity constraint data based on the given solver data.
Definition: DistanceJointConf.cpp:81
const char * GetName(Manifold::Type type) noexcept
Gets a unique name for the given manifold type.
Definition: Manifold.cpp:633
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
TypeID GetTypeID() noexcept
Gets the type ID for the function's template parameter type with its name demangled.
Definition: TypeInfo.hpp:121
constexpr auto InvalidBodyID
Invalid body ID value.
Definition: BodyID.hpp:50
constexpr auto InvalidJointID
Invalid joint ID value.
Definition: JointID.hpp:50
Vector2< Length > Length2
2-element vector of Length quantities.
Definition: Vector2.hpp:51
detail::IndexingNamedType< BodyCounter, struct BodyIdentifier > BodyID
Body identifier.
Definition: BodyID.hpp:44