NcEngine
PhysicsLimits.h
Go to the documentation of this file.
1
5#pragma once
6
7#include <limits>
8#include <numbers>
9
10namespace nc
11{
13constexpr auto g_minShapeScale = 0.1f;
14constexpr auto g_maxShapeScale = 2000.0f;
15constexpr auto g_preferredMaxDynamicShapeScale = 10.0f;
16
18constexpr auto g_minMass = 0.1f;
19constexpr auto g_maxMass = 100000.0f;
20constexpr auto g_minFrictionCoefficient = 0.0f;
21constexpr auto g_maxFrictionCoefficient = 1.0f;
22constexpr auto g_minRestitutionCoefficient = 0.0f;
23constexpr auto g_maxRestitutionCoefficient = 1.0f;
24constexpr auto g_minGravityMultiplier = 0.0f;
25constexpr auto g_maxGravityMultiplier = 100.0f;
26constexpr auto g_minDamping = 0.0f;
27constexpr auto g_maxDamping = 1.0f;
28
30constexpr auto g_maxLinearVelocity = 500.0f;
31constexpr auto g_maxAngularVelocity = std::numbers::pi_v<float> * 15.0f;
32
34constexpr auto g_minFrictionForce = 0.0f;
35constexpr auto g_maxFrictionForce = std::numeric_limits<float>::max();
36constexpr auto g_minFrictionTorque = 0.0f;
37constexpr auto g_maxFrictionTorque = std::numeric_limits<float>::max();
38} // namespace nc
constexpr auto g_minGravityMultiplier
minimum per-body gravity multiplier
Definition: PhysicsLimits.h:24
constexpr auto g_minDamping
minimum linear and angular damping value
Definition: PhysicsLimits.h:26
constexpr auto g_minMass
minimum mass for a RigidBody
Definition: PhysicsLimits.h:18
constexpr auto g_minRestitutionCoefficient
minimum restitution coefficient
Definition: PhysicsLimits.h:22
constexpr auto g_minShapeScale
minimum allowed scale for a Shape
Definition: PhysicsLimits.h:13
constexpr auto g_maxRestitutionCoefficient
maximum restitution coefficient
Definition: PhysicsLimits.h:23
constexpr auto g_minFrictionForce
minimum friction force a constraint can apply
Definition: PhysicsLimits.h:34
constexpr auto g_maxGravityMultiplier
maximum per-body gravity multiplier
Definition: PhysicsLimits.h:25
constexpr auto g_maxAngularVelocity
maximum angular velocity a RigidBody can reach
Definition: PhysicsLimits.h:31
constexpr auto g_maxFrictionCoefficient
maximum friction coefficient
Definition: PhysicsLimits.h:21
constexpr auto g_maxFrictionTorque
maximum torque a constraint can apply as friction
Definition: PhysicsLimits.h:37
constexpr auto g_maxMass
maximum mass for a RigidBody
Definition: PhysicsLimits.h:19
constexpr auto g_minFrictionCoefficient
minimum friction coefficient
Definition: PhysicsLimits.h:20
constexpr auto g_preferredMaxDynamicShapeScale
maximum scale for a Shape on a dynamic RigidBody (soft limit for best stability)
Definition: PhysicsLimits.h:15
constexpr auto g_minFrictionTorque
minimum torque a constraint can apply as friction
Definition: PhysicsLimits.h:36
constexpr auto g_maxShapeScale
maximum allowed scale for a Shape
Definition: PhysicsLimits.h:14
constexpr auto g_maxDamping
maximum linear and angular damping value
Definition: PhysicsLimits.h:27
constexpr auto g_maxLinearVelocity
maximum linear velocity a RigidBody can reach
Definition: PhysicsLimits.h:30
constexpr auto g_maxFrictionForce
maximum friction force a constraint can apply
Definition: PhysicsLimits.h:35