Class PhysicsEnvironment
- Namespace
- Gravitas
- Assembly
- Gravitas.dll
Stores world-local physical environment values used by deterministic simulation.
public sealed class PhysicsEnvironment
- Inheritance
-
PhysicsEnvironment
- Inherited Members
Constructors
PhysicsEnvironment(Fixed64, Fixed64, Fixed64, Fixed64, Fixed64, Fixed64, Fixed64, Fixed64, int, Fixed64, int, int, int, int)
Initializes a new environment with explicit physical and culling values.
public PhysicsEnvironment(Fixed64 gravity, Fixed64 airDensity, Fixed64 minSpeed, Fixed64 maxSpeed, Fixed64 maxFallSpeed, Fixed64 frictionTransitionSpeed, Fixed64 decelerationMultiplier, Fixed64 dampingFactor, int cullDistanceMax, Fixed64 cullFastDistanceMax, int cullVelocityStep, int cullVelocityMax, int cullTimeStep, int cullTimeMax)
Parameters
gravityFixed64airDensityFixed64minSpeedFixed64maxSpeedFixed64maxFallSpeedFixed64frictionTransitionSpeedFixed64decelerationMultiplierFixed64dampingFactorFixed64cullDistanceMaxintcullFastDistanceMaxFixed64cullVelocityStepintcullVelocityMaxintcullTimeStepintcullTimeMaxint
Fields
DefaultAirDensity
Standard air density used by drag calculations.
public static readonly Fixed64 DefaultAirDensity
Field Value
- Fixed64
DefaultCullDistanceFrameDivisor
Frame-rate divisor used to derive the default maximum distance-based collision-culling score.
public static readonly int DefaultCullDistanceFrameDivisor
Field Value
DefaultCullFastDistance
Distance threshold whose square becomes the default fast-collision preservation threshold.
public static readonly int DefaultCullFastDistance
Field Value
DefaultCullFastDistanceMax
Squared distance below which the standard environment preserves fast collision checks.
public static readonly Fixed64 DefaultCullFastDistanceMax
Field Value
- Fixed64
DefaultCullTimeMaxFrameDivisor
Frame-rate divisor used to derive the default maximum time-based collision-culling score.
public static readonly int DefaultCullTimeMaxFrameDivisor
Field Value
DefaultCullTimeStepFrameMultiplier
Frame-rate multiplier used to derive the default collision-culling time step.
public static readonly int DefaultCullTimeStepFrameMultiplier
Field Value
DefaultCullVelocityMax
Maximum velocity-based collision-culling score used by the standard environment.
public static readonly int DefaultCullVelocityMax
Field Value
DefaultCullVelocityStep
Velocity step used by standard collision culling.
public static readonly int DefaultCullVelocityStep
Field Value
DefaultDampingFactor
Angular velocity damping factor used by the standard environment.
public static readonly Fixed64 DefaultDampingFactor
Field Value
- Fixed64
DefaultDecelerationMultiplier
Motion deceleration multiplier used by the standard environment.
public static readonly Fixed64 DefaultDecelerationMultiplier
Field Value
- Fixed64
DefaultFrictionTransitionSpeed
Speed threshold used when transitioning friction behavior in the standard environment.
public static readonly Fixed64 DefaultFrictionTransitionSpeed
Field Value
- Fixed64
DefaultGravity
Standard gravitational acceleration in world units per second squared.
public static readonly Fixed64 DefaultGravity
Field Value
- Fixed64
DefaultMaxFallSpeed
Maximum downward fall speed used by the standard environment.
public static readonly Fixed64 DefaultMaxFallSpeed
Field Value
- Fixed64
DefaultMaxSpeed
Maximum linear or angular speed used by the standard environment.
public static readonly Fixed64 DefaultMaxSpeed
Field Value
- Fixed64
DefaultMinSpeed
Minimum speed treated as meaningful motion by the standard environment.
public static readonly Fixed64 DefaultMinSpeed
Field Value
- Fixed64
KilogramToPound
One kilogram is equal to this many pounds.
public static readonly Fixed64 KilogramToPound
Field Value
- Fixed64
PoundToNewton
One pound is equal to this many Newtons.
public static readonly Fixed64 PoundToNewton
Field Value
- Fixed64
Properties
AirDensity
Gets or sets air density used by drag calculations.
public Fixed64 AirDensity { get; set; }
Property Value
- Fixed64
CullDistanceMax
Gets or sets the maximum distance-based collision-culling score.
public int CullDistanceMax { get; set; }
Property Value
CullFastDistanceMax
Gets or sets the squared distance below which fast collision checks are preserved.
public Fixed64 CullFastDistanceMax { get; set; }
Property Value
- Fixed64
CullTimeMax
Gets or sets the maximum time-based collision-culling score.
public int CullTimeMax { get; set; }
Property Value
CullTimeStep
Gets or sets the frame-count step used by collision culling.
public int CullTimeStep { get; set; }
Property Value
CullVelocityMax
Gets or sets the maximum velocity-based collision-culling score.
public int CullVelocityMax { get; set; }
Property Value
CullVelocityStep
Gets or sets the velocity step used by collision culling.
public int CullVelocityStep { get; set; }
Property Value
DampingFactor
Gets or sets the damping factor applied to angular velocity.
public Fixed64 DampingFactor { get; set; }
Property Value
- Fixed64
DecelerationMultiplier
Gets or sets the multiplier applied when decelerating motion.
public Fixed64 DecelerationMultiplier { get; set; }
Property Value
- Fixed64
FrictionTransitionSpeed
Gets or sets the speed threshold used when transitioning friction behavior.
public Fixed64 FrictionTransitionSpeed { get; set; }
Property Value
- Fixed64
Gravity
Gets or sets gravitational acceleration in world units per second squared.
public Fixed64 Gravity { get; set; }
Property Value
- Fixed64
MaxFallSpeed
Gets or sets the maximum downward fall speed.
public Fixed64 MaxFallSpeed { get; set; }
Property Value
- Fixed64
MaxSpeed
Gets or sets the maximum linear or angular speed.
public Fixed64 MaxSpeed { get; set; }
Property Value
- Fixed64
MinSpeed
Gets or sets the minimum speed treated as meaningful motion.
public Fixed64 MinSpeed { get; set; }
Property Value
- Fixed64
Methods
Default(int)
Creates environment values for the standard Gravitas runtime defaults.
public static PhysicsEnvironment Default(int frameRate = 32)
Parameters
frameRateintFrame rate used to initialize frame-derived culling thresholds.
Returns
- PhysicsEnvironment
A new environment instance.