Struct GpuJointMotorPair
#[repr(C)]pub struct GpuJointMotorPair {
pub current_r: [f32; 4],
pub current_d: [f32; 4],
pub prev_r: [f32; 4],
pub prev_d: [f32; 4],
}Expand description
64-byte GPU storage record per joint storing both current-frame and previous-frame
skinning PGA Motors ($M_{\text{skin}, j} = M_{\text{world}, j} \circ M_{\text{inv_bind}, j}$).
Layout matches @group(2) @binding(1) var<storage, read> rig_motors: array<GpuJointMotorPair>;
in the viewport vertex shaders.
Fields§
§current_r: [f32; 4]Current frame unit rotor [r_w, r_x, r_y, r_z].
current_d: [f32; 4]Current frame dual part [d_w, d_x, d_y, d_z] where $D = \frac{1}{2} T R$.
prev_r: [f32; 4]Previous frame unit rotor [r_w, r_x, r_y, r_z] (hemisphere-aligned to current_r).
prev_d: [f32; 4]Previous frame dual part [d_w, d_x, d_y, d_z].
Implementations§
§impl GpuJointMotorPair
impl GpuJointMotorPair
pub const fn identity() -> GpuJointMotorPair
pub const fn identity() -> GpuJointMotorPair
Identity skinning motor pair (zero rotation and translation in both frames).
pub fn from_motors(current: &Motor, prev: &Motor) -> GpuJointMotorPair
pub fn from_motors(current: &Motor, prev: &Motor) -> GpuJointMotorPair
Converts current and previous f64 PGA Motors into a GpuJointMotorPair.
Trait Implementations§
§impl Clone for GpuJointMotorPair
impl Clone for GpuJointMotorPair
§fn clone(&self) -> GpuJointMotorPair
fn clone(&self) -> GpuJointMotorPair
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 moreimpl Copy for GpuJointMotorPair
§impl Debug for GpuJointMotorPair
impl Debug for GpuJointMotorPair
§impl Default for GpuJointMotorPair
impl Default for GpuJointMotorPair
§fn default() -> GpuJointMotorPair
fn default() -> GpuJointMotorPair
Returns the “default value” for a type. Read more
§impl PartialEq for GpuJointMotorPair
impl PartialEq for GpuJointMotorPair
impl Pod for GpuJointMotorPair
impl StructuralPartialEq for GpuJointMotorPair
Auto Trait Implementations§
impl Freeze for GpuJointMotorPair
impl RefUnwindSafe for GpuJointMotorPair
impl Send for GpuJointMotorPair
impl Sync for GpuJointMotorPair
impl Unpin for GpuJointMotorPair
impl UnsafeUnpin for GpuJointMotorPair
impl UnwindSafe for GpuJointMotorPair
Blanket Implementations§
impl<T> AnyBitPattern for Twhere
T: Pod,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.