Class ScaledConstants
- Namespace
- Box3D.Native
- Assembly
- Box3D.NET.Native.dll
Box3D constants that scale with the application's length units.
public static class ScaledConstantsInheritance
Inherited Members
Examples
B3.b3SetLengthUnitsPerMeter(100.0f); // centimetres, before any other call
float slop = ScaledConstants.B3_LINEAR_SLOP; // 0.5, not 0.005
Remarks
In the C headers these are macros that expand to a call to
b3GetLengthUnitsPerMeter(), so their value depends on what the
application passed to b3SetLengthUnitsPerMeter at startup. They are
properties here for the same reason: capturing them in a const would
silently freeze the default of one unit per metre.
Reading any of these calls into the native library.
Properties
- B3_CONTACT_RECYCLE_DISTANCE
-
The default distance at which contact points are recycled.
- B3_HUGE
-
The bound used to detect bad values. Positions beyond this are treated as errors.
- B3_LINEAR_SLOP
-
A small length used as a collision and constraint tolerance, in metres.
- B3_MAX_AABB_MARGIN
-
The upper bound on the margin used to fatten bounding boxes in the dynamic tree.
- B3_MESH_REST_OFFSET
-
The rest offset applied to mesh contacts to reduce ghost collisions.
- B3_MIN_CAPSULE_LENGTH
-
The minimum length of a capsule. Shorter capsules should be spheres.
- B3_OVERLAP_SLOP
-
The distance at which shapes are considered overlapped.
- B3_SPECULATIVE_DISTANCE
-
The distance within which speculative contacts are generated.