Settings.hpp File Reference

Types and default settings file. More...

#include <cstddef>
#include <cassert>
#include <cfloat>
#include <cmath>
#include <cstdint>
#include <algorithm>
#include <PlayRho/Common/Templates.hpp>
#include <PlayRho/Common/RealConstants.hpp>
#include <PlayRho/Common/Units.hpp>
#include <PlayRho/Common/Wider.hpp>

Go to the source code of this file.

Classes

struct  playrho::detail::Defaults< T >
 Defaults object for real types. More...
 
struct  playrho::detail::Defaults< Fixed< std::int32_t, FRACTION_BITS > >
 Specialization of defaults object for fixed point types. More...
 

Namespaces

 playrho
 
 playrho::detail
 

Typedefs

using playrho::ChildCounter = std::remove_const< decltype(MaxChildCount)>::type
 Child counter type. More...
 
using playrho::TimestepIters = std::uint8_t
 
using playrho::VertexCounter = std::remove_const< decltype(MaxShapeVertices)>::type
 Vertex count type. More...
 
using playrho::BodyCounter = std::remove_const< decltype(MaxBodies)>::type
 Body count type. More...
 
using playrho::ContactCounter = Wider< BodyCounter >::type
 Contact count type. More...
 
using playrho::JointCounter = std::remove_const< decltype(MaxJoints)>::type
 Joint count type. More...
 

Variables

const PLAYRHO_CONSTEXPR auto playrho::MaxSimplexEdges = std::uint8_t{3}
 Maximum number of supportable edges in a simplex. More...
 
const PLAYRHO_CONSTEXPR auto playrho::MaxChildCount = std::numeric_limits<std::uint32_t>::max() >> 6
 Max child count. More...
 
const PLAYRHO_CONSTEXPR auto playrho::MaxFloat = std::numeric_limits<Real>::max()
 Maximum float value. More...
 
const PLAYRHO_CONSTEXPR auto playrho::MaxManifoldPoints = std::uint8_t{2}
 
const PLAYRHO_CONSTEXPR auto playrho::MaxShapeVertices = std::uint8_t{254}
 Maximum number of vertices for any shape type. More...
 
const PLAYRHO_CONSTEXPR auto playrho::InvalidVertex = static_cast<VertexCounter>(-1)
 Invalid vertex index. More...
 
const PLAYRHO_CONSTEXPR auto playrho::DefaultLinearSlop = detail::Defaults<Real>::GetLinearSlop()
 Default linear slop. More...
 
const PLAYRHO_CONSTEXPR auto playrho::DefaultMinVertexRadius = DefaultLinearSlop * Real{2}
 Default minimum vertex radius. More...
 
const PLAYRHO_CONSTEXPR auto playrho::DefaultMaxVertexRadius = detail::Defaults<Real>::GetMaxVertexRadius()
 Default maximum vertex radius. More...
 
const PLAYRHO_CONSTEXPR auto playrho::DefaultAabbExtension = DefaultLinearSlop * Real{20}
 Default AABB extension amount. More...
 
const PLAYRHO_CONSTEXPR auto playrho::DefaultDistanceMultiplier = Real{2}
 Default distance multiplier. More...
 
const PLAYRHO_CONSTEXPR auto playrho::DefaultAngularSlop = (Pi * 2_rad) / Real{180}
 Default angular slop. More...
 
const PLAYRHO_CONSTEXPR auto playrho::DefaultMaxLinearCorrection = 0.2_m
 Default maximum linear correction. More...
 
const PLAYRHO_CONSTEXPR auto playrho::DefaultMaxAngularCorrection = Real(8.0f / 180.0f) * Pi * 1_rad
 Default maximum angular correction. More...
 
const PLAYRHO_CONSTEXPR auto playrho::DefaultMaxTranslation = 2_m
 Default maximum translation amount. More...
 
const PLAYRHO_CONSTEXPR auto playrho::DefaultMaxRotation = Angle{Pi * 1_rad / Real(2)}
 Default maximum rotation per world step. More...
 
const PLAYRHO_CONSTEXPR auto playrho::DefaultMaxToiIters = std::uint8_t{20}
 Default maximum time of impact iterations. More...
 
const PLAYRHO_CONSTEXPR auto playrho::DefaultMaxToiRootIters = std::uint8_t{30}
 Default maximum time of impact root iterator count. More...
 
const PLAYRHO_CONSTEXPR auto playrho::DefaultMaxDistanceIters = std::uint8_t{20}
 Default max number of distance iterations. More...
 
const PLAYRHO_CONSTEXPR auto playrho::DefaultMaxSubSteps = std::uint8_t{8}
 
const PLAYRHO_CONSTEXPR auto playrho::DefaultVelocityThreshold = 1_mps
 Default velocity threshold. More...
 
const PLAYRHO_CONSTEXPR auto playrho::DefaultRegMinMomentum = Momentum{0_Ns / 100}
 Default regular-phase minimum momentum. More...
 
const PLAYRHO_CONSTEXPR auto playrho::DefaultToiMinMomentum = Momentum{0_Ns / 100}
 Default TOI-phase minimum momentum. More...
 
const PLAYRHO_CONSTEXPR auto playrho::MaxBodies
 Maximum number of bodies in a world. More...
 
const PLAYRHO_CONSTEXPR auto playrho::InvalidContactIndex = static_cast<ContactCounter>(-1)
 Invalid contact index. More...
 
const PLAYRHO_CONSTEXPR auto playrho::MaxContacts = ContactCounter{MaxBodies} * ContactCounter{MaxBodies - 1} / ContactCounter{2}
 Maximum number of contacts in a world (2147319811). More...
 
const PLAYRHO_CONSTEXPR auto playrho::MaxJoints
 Maximum number of joints in a world. More...
 
const PLAYRHO_CONSTEXPR auto playrho::DefaultStepTime = Time{1_s / 60}
 Default step time. More...
 
const PLAYRHO_CONSTEXPR auto playrho::DefaultStepFrequency = 60_Hz
 Default step frequency. More...
 
const PLAYRHO_CONSTEXPR auto playrho::DefaultMinStillTimeToSleep = Time{1_s / 2}
 
const PLAYRHO_CONSTEXPR auto playrho::DefaultLinearSleepTolerance = 0.01_mps
 
const PLAYRHO_CONSTEXPR auto playrho::DefaultAngularSleepTolerance = Real{(Pi * 2) / 180} * RadianPerSecond
 
const PLAYRHO_CONSTEXPR auto playrho::DefaultCirclesRatio = Real{10}
 

Detailed Description

Types and default settings file.

Definition in file Settings.hpp.