[−][src]Trait physme::dim2::JointBehaviour
Defines a set of behaviours on how joints should move the anchored body relative to the anchor.
Associated Constants
Loading content...Provided methods
fn position(
&mut self,
_offset: Vec2,
_anchor: &RigidBody,
_target: &RigidBody
) -> Option<Vec2>
&mut self,
_offset: Vec2,
_anchor: &RigidBody,
_target: &RigidBody
) -> Option<Vec2>
Returns a new position for target based on self
and anchor
.
fn rotation(
&mut self,
_angle: f32,
_anchor: &RigidBody,
_target: &RigidBody
) -> Option<f32>
&mut self,
_angle: f32,
_anchor: &RigidBody,
_target: &RigidBody
) -> Option<f32>
Returns a new rotation for target based on self
and anchor
.
fn linear_velocity(
&mut self,
_offset: Vec2,
_anchor: &RigidBody,
_target: &RigidBody
) -> Option<Vec2>
&mut self,
_offset: Vec2,
_anchor: &RigidBody,
_target: &RigidBody
) -> Option<Vec2>
Returns a new linear velocity for target based on self
and anchor
.
fn angular_velocity(
&mut self,
_angle: f32,
_anchor: &RigidBody,
_target: &RigidBody
) -> Option<f32>
&mut self,
_angle: f32,
_anchor: &RigidBody,
_target: &RigidBody
) -> Option<f32>
Returns a new angular velocity for target based on self
and anchor
.
fn linear_impulse(
&mut self,
_offset: Vec2,
_anchor: &RigidBody,
_target: &RigidBody
) -> Option<Vec2>
&mut self,
_offset: Vec2,
_anchor: &RigidBody,
_target: &RigidBody
) -> Option<Vec2>
Returns a linear impulse to apply to target based on self
and anchor
.
fn angular_impulse(
&mut self,
_angle: f32,
_anchor: &RigidBody,
_target: &RigidBody
) -> Option<f32>
&mut self,
_angle: f32,
_anchor: &RigidBody,
_target: &RigidBody
) -> Option<f32>
Returns an angular impulse to apply to target based on self
and anchor
.
Implementors
impl JointBehaviour for FixedJointBehaviour
[src]
const STAGE: &'static str
[src]
fn position(
&mut self,
offset: Vec2,
anchor: &RigidBody,
_target: &RigidBody
) -> Option<Vec2>
[src]
&mut self,
offset: Vec2,
anchor: &RigidBody,
_target: &RigidBody
) -> Option<Vec2>
fn rotation(
&mut self,
angle: f32,
anchor: &RigidBody,
_target: &RigidBody
) -> Option<f32>
[src]
&mut self,
angle: f32,
anchor: &RigidBody,
_target: &RigidBody
) -> Option<f32>
impl JointBehaviour for MechanicalJointBehaviour
[src]
const STAGE: &'static str
[src]
fn position(
&mut self,
offset: Vec2,
anchor: &RigidBody,
_target: &RigidBody
) -> Option<Vec2>
[src]
&mut self,
offset: Vec2,
anchor: &RigidBody,
_target: &RigidBody
) -> Option<Vec2>
fn rotation(
&mut self,
angle: f32,
anchor: &RigidBody,
_target: &RigidBody
) -> Option<f32>
[src]
&mut self,
angle: f32,
anchor: &RigidBody,
_target: &RigidBody
) -> Option<f32>
fn linear_velocity(
&mut self,
_offset: Vec2,
_anchor: &RigidBody,
_target: &RigidBody
) -> Option<Vec2>
[src]
&mut self,
_offset: Vec2,
_anchor: &RigidBody,
_target: &RigidBody
) -> Option<Vec2>
fn angular_velocity(
&mut self,
_angle: f32,
_anchor: &RigidBody,
_target: &RigidBody
) -> Option<f32>
[src]
&mut self,
_angle: f32,
_anchor: &RigidBody,
_target: &RigidBody
) -> Option<f32>
impl JointBehaviour for SpringJointBehaviour
[src]
const STAGE: &'static str
[src]
fn linear_velocity(
&mut self,
_offset: Vec2,
_anchor: &RigidBody,
_target: &RigidBody
) -> Option<Vec2>
[src]
&mut self,
_offset: Vec2,
_anchor: &RigidBody,
_target: &RigidBody
) -> Option<Vec2>
fn angular_velocity(
&mut self,
_angle: f32,
_anchor: &RigidBody,
_target: &RigidBody
) -> Option<f32>
[src]
&mut self,
_angle: f32,
_anchor: &RigidBody,
_target: &RigidBody
) -> Option<f32>
fn linear_impulse(
&mut self,
offset: Vec2,
anchor: &RigidBody,
target: &RigidBody
) -> Option<Vec2>
[src]
&mut self,
offset: Vec2,
anchor: &RigidBody,
target: &RigidBody
) -> Option<Vec2>
fn angular_impulse(
&mut self,
angle: f32,
anchor: &RigidBody,
target: &RigidBody
) -> Option<f32>
[src]
&mut self,
angle: f32,
anchor: &RigidBody,
target: &RigidBody
) -> Option<f32>