NcEngine
PhysicsLimits.h File Reference
#include <limits>
#include <numbers>

Go to the source code of this file.

Variables

Shape Limits
constexpr auto nc::g_minShapeScale = 0.1f
 minimum allowed scale for a Shape
 
constexpr auto nc::g_maxShapeScale = 2000.0f
 maximum allowed scale for a Shape
 
constexpr auto nc::g_preferredMaxDynamicShapeScale = 10.0f
 maximum scale for a Shape on a dynamic RigidBody (soft limit for best stability)
 
RigidBody Property Limits
constexpr auto nc::g_minMass = 0.1f
 minimum mass for a RigidBody
 
constexpr auto nc::g_maxMass = 100000.0f
 maximum mass for a RigidBody
 
constexpr auto nc::g_minFrictionCoefficient = 0.0f
 minimum friction coefficient
 
constexpr auto nc::g_maxFrictionCoefficient = 1.0f
 maximum friction coefficient
 
constexpr auto nc::g_minRestitutionCoefficient = 0.0f
 minimum restitution coefficient
 
constexpr auto nc::g_maxRestitutionCoefficient = 1.0f
 maximum restitution coefficient
 
constexpr auto nc::g_minGravityMultiplier = 0.0f
 minimum per-body gravity multiplier
 
constexpr auto nc::g_maxGravityMultiplier = 100.0f
 maximum per-body gravity multiplier
 
constexpr auto nc::g_minDamping = 0.0f
 minimum linear and angular damping value
 
constexpr auto nc::g_maxDamping = 1.0f
 maximum linear and angular damping value
 
Kinematic Limits
constexpr auto nc::g_maxLinearVelocity = 500.0f
 maximum linear velocity a RigidBody can reach
 
constexpr auto nc::g_maxAngularVelocity = std::numbers::pi_v<float> * 15.0f
 maximum angular velocity a RigidBody can reach
 
Constraint Limits
constexpr auto nc::g_minFrictionForce = 0.0f
 minimum friction force a constraint can apply
 
constexpr auto nc::g_maxFrictionForce = std::numeric_limits<float>::max()
 maximum friction force a constraint can apply
 
constexpr auto nc::g_minFrictionTorque = 0.0f
 minimum torque a constraint can apply as friction
 
constexpr auto nc::g_maxFrictionTorque = std::numeric_limits<float>::max()
 maximum torque a constraint can apply as friction
 

Detailed Description