pub struct SimplePhysicsData {
pub param: u32,
pub model_type: PhysicsModelType,
pub map_mode: PhysicsMapMode,
pub gravity: f32,
pub length: f32,
pub frequency: f32,
pub angle_damping: f32,
pub length_damping: f32,
pub output_scale: [f32; 2],
pub local_only: Option<bool>,
}Expand description
Node data with physics simulation. Simulates behavior of chains/tails/accessories.
Fields§
§param: u32UUID of the parameter controlling the physics output.
model_type: PhysicsModelTypeSimulation type (Pendulum or SpringPendulum).
map_mode: PhysicsMapModeHow to map angle/length to output parameter.
gravity: f32Gravity for this simulation (overrides global if >0).
length: f32Length of the “bone” in pixels.
frequency: f32Oscillation frequency (Hz).
angle_damping: f32Angular damping (reduces angle oscillation).
length_damping: f32Length damping (reduces extension oscillation).
output_scale: [f32; 2]Parameter output scale (sx, sy).
local_only: Option<bool>If true, physics is relative to local node (not global).
Trait Implementations§
Source§impl Clone for SimplePhysicsData
impl Clone for SimplePhysicsData
Source§fn clone(&self) -> SimplePhysicsData
fn clone(&self) -> SimplePhysicsData
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SimplePhysicsData
impl Debug for SimplePhysicsData
Source§impl Default for SimplePhysicsData
impl Default for SimplePhysicsData
Source§fn default() -> SimplePhysicsData
fn default() -> SimplePhysicsData
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SimplePhysicsData
impl RefUnwindSafe for SimplePhysicsData
impl Send for SimplePhysicsData
impl Sync for SimplePhysicsData
impl Unpin for SimplePhysicsData
impl UnsafeUnpin for SimplePhysicsData
impl UnwindSafe for SimplePhysicsData
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more