Skip to main content

PhysicsSpace

Trait PhysicsSpace 

Source
pub trait PhysicsSpace:
    Space
    + IsometryGroup
    + Send
    + Sync {
    type AngVel: Bivector + Send + Sync;
    type Inertia: Copy + Send + Sync;

Show 13 methods // Required methods fn broadphase_bound(&self) -> BroadphaseBound; fn supports_collider(&self, kind: ColliderKind) -> bool; fn valid_vector(&self, vector: Self::Vector) -> bool; fn valid_inertia(&self, inertia: Self::Inertia) -> bool; fn valid_orientation(&self, orientation: Self::Iso) -> bool; fn valid_angular_velocity(&self, angular_velocity: Self::AngVel) -> bool; fn integrate_orientation( &self, iso: Self::Iso, omega: Self::AngVel, dt: f32, ) -> Self::Iso; fn apply_inv_inertia( &self, inertia: Self::Inertia, torque: Self::AngVel, ) -> Self::AngVel; fn wedge(&self, a: Self::Vector, b: Self::Vector) -> Self::AngVel; fn velocity_at_point( &self, body: &RigidBody<Self>, p: Self::Point, ) -> Self::Vector where Self: Sized; fn effective_mass_inv( &self, a: &RigidBody<Self>, b: &RigidBody<Self>, contact_point: Self::Point, direction: Self::Vector, ) -> f32 where Self: Sized; fn apply_contact_impulse( &self, a: &mut RigidBody<Self>, b: &mut RigidBody<Self>, contact_point: Self::Point, direction: Self::Vector, magnitude: f32, ) where Self: Sized; // Provided method fn valid_initial_state( &self, position: Self::Point, velocity: Self::Vector, inertia: Self::Inertia, ) -> bool { ... }
}

Required Associated Types§

Required Methods§

Source

fn broadphase_bound(&self) -> BroadphaseBound

Source

fn supports_collider(&self, kind: ColliderKind) -> bool

Source

fn valid_vector(&self, vector: Self::Vector) -> bool

Source

fn valid_inertia(&self, inertia: Self::Inertia) -> bool

Source

fn valid_orientation(&self, orientation: Self::Iso) -> bool

Source

fn valid_angular_velocity(&self, angular_velocity: Self::AngVel) -> bool

Source

fn integrate_orientation( &self, iso: Self::Iso, omega: Self::AngVel, dt: f32, ) -> Self::Iso

Source

fn apply_inv_inertia( &self, inertia: Self::Inertia, torque: Self::AngVel, ) -> Self::AngVel

Source

fn wedge(&self, a: Self::Vector, b: Self::Vector) -> Self::AngVel

Source

fn velocity_at_point( &self, body: &RigidBody<Self>, p: Self::Point, ) -> Self::Vector
where Self: Sized,

Source

fn effective_mass_inv( &self, a: &RigidBody<Self>, b: &RigidBody<Self>, contact_point: Self::Point, direction: Self::Vector, ) -> f32
where Self: Sized,

Sleeping and static bodies contribute zero.

Source

fn apply_contact_impulse( &self, a: &mut RigidBody<Self>, b: &mut RigidBody<Self>, contact_point: Self::Point, direction: Self::Vector, magnitude: f32, )
where Self: Sized,

Subtracts from A, adds to B.

Provided Methods§

Source

fn valid_initial_state( &self, position: Self::Point, velocity: Self::Vector, inertia: Self::Inertia, ) -> bool

Implementations on Foreign Types§

Source§

impl PhysicsSpace for EuclideanR3

Source§

type AngVel = Bivector3

Source§

type Inertia = f32

Source§

fn broadphase_bound(&self) -> BroadphaseBound

Source§

fn supports_collider(&self, kind: ColliderKind) -> bool

Source§

fn valid_vector(&self, vector: Vec3) -> bool

Source§

fn valid_orientation(&self, orientation: Iso3) -> bool

Source§

fn valid_angular_velocity(&self, angular_velocity: Bivector3) -> bool

Source§

fn valid_inertia(&self, inertia: f32) -> bool

Source§

fn integrate_orientation(&self, iso: Iso3, omega: Bivector3, dt: f32) -> Iso3

Source§

fn apply_inv_inertia(&self, inertia: f32, torque: Bivector3) -> Bivector3

Source§

fn wedge(&self, a: Vec3, b: Vec3) -> Bivector3

Source§

fn velocity_at_point(&self, body: &RigidBody<EuclideanR3>, p: Vec3) -> Vec3

Source§

fn effective_mass_inv( &self, a: &RigidBody<EuclideanR3>, b: &RigidBody<EuclideanR3>, contact_point: Vec3, direction: Vec3, ) -> f32

Source§

fn apply_contact_impulse( &self, a: &mut RigidBody<EuclideanR3>, b: &mut RigidBody<EuclideanR3>, contact_point: Vec3, direction: Vec3, magnitude: f32, )

Source§

impl PhysicsSpace for EuclideanR2

Source§

type AngVel = Bivector2

Source§

type Inertia = f32

Source§

fn broadphase_bound(&self) -> BroadphaseBound

Source§

fn supports_collider(&self, kind: ColliderKind) -> bool

Source§

fn valid_vector(&self, vector: Vec2) -> bool

Source§

fn valid_orientation(&self, orientation: Iso2) -> bool

Source§

fn valid_angular_velocity(&self, angular_velocity: Bivector2) -> bool

Source§

fn valid_inertia(&self, inertia: f32) -> bool

Source§

fn integrate_orientation(&self, iso: Iso2, omega: Bivector2, dt: f32) -> Iso2

Source§

fn apply_inv_inertia(&self, inertia: f32, torque: Bivector2) -> Bivector2

Source§

fn wedge(&self, a: Vec2, b: Vec2) -> Bivector2

Source§

fn velocity_at_point(&self, body: &RigidBody<EuclideanR2>, p: Vec2) -> Vec2

Source§

fn effective_mass_inv( &self, a: &RigidBody<EuclideanR2>, b: &RigidBody<EuclideanR2>, contact_point: Vec2, direction: Vec2, ) -> f32

Source§

fn apply_contact_impulse( &self, a: &mut RigidBody<EuclideanR2>, b: &mut RigidBody<EuclideanR2>, contact_point: Vec2, direction: Vec2, magnitude: f32, )

Source§

impl PhysicsSpace for EuclideanR4

Source§

type AngVel = Bivector4

Source§

type Inertia = f32

Source§

fn broadphase_bound(&self) -> BroadphaseBound

Source§

fn supports_collider(&self, kind: ColliderKind) -> bool

Source§

fn valid_vector(&self, vector: Vec4) -> bool

Source§

fn valid_orientation(&self, orientation: Iso4Flat) -> bool

Source§

fn valid_angular_velocity(&self, angular_velocity: Bivector4) -> bool

Source§

fn valid_inertia(&self, inertia: f32) -> bool

Source§

fn integrate_orientation( &self, iso: Iso4Flat, omega: Bivector4, dt: f32, ) -> Iso4Flat

Source§

fn apply_inv_inertia(&self, inertia: f32, torque: Bivector4) -> Bivector4

Source§

fn wedge(&self, a: Vec4, b: Vec4) -> Bivector4

Source§

fn velocity_at_point(&self, body: &RigidBody<EuclideanR4>, p: Vec4) -> Vec4

Source§

fn effective_mass_inv( &self, a: &RigidBody<EuclideanR4>, b: &RigidBody<EuclideanR4>, contact_point: Vec4, direction: Vec4, ) -> f32

Source§

fn apply_contact_impulse( &self, a: &mut RigidBody<EuclideanR4>, b: &mut RigidBody<EuclideanR4>, contact_point: Vec4, direction: Vec4, magnitude: f32, )

Implementors§