Table of Contents

Struct RigidBodyData

Namespace
Jitter2.Dynamics
Assembly
Jitter2.dll

Low-level simulation state for a RigidBody, stored in unmanaged memory.

public struct RigidBodyData
Inherited Members

Remarks

This structure is layout-sensitive and intended for internal engine use. Prefer using RigidBody properties instead of accessing fields directly. All spatial values (position, velocity, orientation, inertia) are in world space. The Flags field is a bitfield: bits 0–1 encode MotionType, bit 2 indicates active state, and bit 3 enables gyroscopic forces.

Fields

AngularVelocity

Angular velocity in world space, measured in radians per second. The vector direction is the rotation axis, and its magnitude is the rotation speed.

public JVector AngularVelocity

Field Value

JVector

DeltaAngularVelocity

Accumulated angular velocity change for the current substep (from torques). Internal use only.

public JVector DeltaAngularVelocity

Field Value

JVector

DeltaVelocity

Accumulated linear velocity change for the current substep (from forces and gravity). Internal use only.

public JVector DeltaVelocity

Field Value

JVector

Flags

Bitfield encoding motion type (bits 0–1), active state (bit 2), and gyroscopic forces (bit 3). Use the corresponding properties instead of manipulating this directly.

public int Flags

Field Value

int

InverseInertiaWorld

Inverse inertia tensor in world space. For dynamic bodies, this is recomputed each step from the body-space inverse inertia and current orientation. For static and kinematic bodies, this is zero (representing infinite inertia).

public JMatrix InverseInertiaWorld

Field Value

JMatrix

InverseMass

Inverse mass of the body. A value of zero represents infinite mass (used for static and kinematic bodies in the solver).

public float InverseMass

Field Value

float

Orientation

World-space orientation of the rigid body.

public JQuaternion Orientation

Field Value

JQuaternion

Position

World-space position of the rigid body (center of mass).

public JVector Position

Field Value

JVector

Velocity

Linear velocity in world space, measured in units per second.

public JVector Velocity

Field Value

JVector

_index

Internal index used by the engine for handle management. Not stable across frames.

public int _index

Field Value

int

_lockFlag

Internal synchronization flag used by the engine. Do not modify.

public int _lockFlag

Field Value

int

Properties

EnableGyroscopicForces

Gets or sets whether the implicit gyroscopic torque solver is enabled. See EnableGyroscopicForces for details.

public bool EnableGyroscopicForces { readonly get; set; }

Property Value

bool

IsActive

Gets or sets whether the body is active (awake) and participating in simulation. Inactive bodies are considered sleeping and skip integration until reactivated.

public bool IsActive { readonly get; set; }

Property Value

bool

IsStaticOrInactive

Returns true if the body is static or currently inactive (sleeping).

[Obsolete("Use MotionType directly.")]
public bool IsStaticOrInactive { get; }

Property Value

bool

MotionType

Gets or sets how this body participates in the simulation. Encoded in bits 0–1 of Flags.

public MotionType MotionType { get; set; }

Property Value

MotionType