Table of Contents

Class Constants

Namespace
Box3D.Native
Assembly
Box3D.NET.Native.dll

The compile-time constants of Box3D.

public static class Constants

Inheritance

Inherited Members

Remarks

Only macros with a fixed value appear here. Several Box3D macros expand to an expression involving b3GetLengthUnitsPerMeter() and therefore change when the application chooses different units; those live on Box3D.Native.ScaledConstants as properties, because a const would bake in the wrong value.

The values assume a default build of Box3D. Constants guarded by #ifndef in the header (B3_MAX_WORLDS, B3_GYROSCOPIC_ITERATIONS, B3_RESTITUTION_ITERATIONS) can be overridden when compiling the native library, in which case these no longer match.

Fields

B3_AABB_MARGIN_FRACTION

The per-shape bounding box margin as a fraction of the shape extent.

B3_CHILD_POWER

The number of bits used to index child shapes in a shape pair key.

B3_COMPOUND_VERSION

The baked compound version, derived from the tree, mesh and hull versions.

B3_CONTACT_MANIFOLD_COUNT_BUCKETS

The number of buckets used to report contact points per shape pair.

B3_CONTACT_RECYCLE_ANGULAR_DISTANCE

The contact recycling angular threshold, stored as cos(angle/2) squared for ten degrees.

B3_DEFAULT_CATEGORY_BITS

The default collision category bits: every category.

B3_DEFAULT_MASK_BITS

The default collision mask bits: collide with everything.

B3_DEG_TO_RAD

Multiplier converting degrees to radians.

B3_DYNAMIC_TREE_VERSION

The dynamic tree version, for validating serialized data.

B3_GRAPH_COLOR_COUNT

The number of colours in the constraint graph. The last one is the overflow set.

B3_GYROSCOPIC_ITERATIONS

The number of iterations used for gyroscopic torques. May be overridden at compile time.

B3_HASH_INIT

The seed for the djb2 hash used in determinism testing.

B3_HEIGHT_FIELD_HOLE

The material index that designates a hole in a height field.

B3_HEIGHT_FIELD_VERSION

The height field version, for validating serialized data.

B3_HULL_VERSION

The convex hull version, for validating serialized data.

B3_MAX_CHILD_SHAPES

The maximum number of child shapes in a compound.

B3_MAX_COMPOUND_MESH_MATERIALS

The maximum number of materials on a mesh inside a compound.

B3_MAX_HULL_EDGES

The maximum number of convex hull edges. Full edges, not half-edges.

B3_MAX_HULL_FACES

The maximum number of convex hull faces.

B3_MAX_HULL_VERTICES

The maximum number of convex hull vertices. Fixed for performance.

B3_MAX_MANIFOLD_POINTS

The maximum number of contact points between two touching shapes.

B3_MAX_ROTATION

The maximum rotation of a body per time step, in radians.

B3_MAX_SHAPES

The maximum number of shapes in a world.

B3_MAX_SHAPE_CAST_POINTS

The maximum number of points in a shape cast proxy.

B3_MAX_TASKS

The maximum number of tasks queued per world step.

B3_MAX_WORKERS

The maximum number of parallel workers.

B3_MAX_WORLDS

The maximum number of simultaneous worlds. May be overridden at compile time.

B3_MESH_VERSION

The triangle mesh version, for validating serialized data.

B3_MIN_FRICTION_WEIGHT

The lower bound on the friction weight of a speculative contact point.

B3_MIN_SCALE

The minimum scale usable for collision meshes.

B3_NULL_INDEX

Indicates null for interfaces that use indices rather than pointers.

B3_PARALLEL_EDGE_TOL

The relative tolerance used to decide whether two edges are parallel.

B3_PI

Pi.

B3_RAD_TO_DEG

Multiplier converting radians to degrees.

B3_RESTITUTION_ITERATIONS

The number of restitution iterations. May be overridden at compile time.

B3_SHAPE_POWER

The number of bits used to index shapes in a shape pair key.

B3_TIME_TO_SLEEP

The time a body must be still before it sleeps, in seconds.