Struct veloren_voxygen_anim::character::CharacterSkeleton
source · pub struct CharacterSkeleton {Show 25 fields
head: Bone,
chest: Bone,
belt: Bone,
back: Bone,
shorts: Bone,
hand_l: Bone,
hand_r: Bone,
foot_l: Bone,
foot_r: Bone,
shoulder_l: Bone,
shoulder_r: Bone,
glider: Bone,
main: Bone,
second: Bone,
lantern: Bone,
hold: Bone,
torso: Bone,
control: Bone,
control_l: Bone,
control_r: Bone,
holding_lantern: bool,
back_carry_offset: f32,
main_weapon_trail: bool,
off_weapon_trail: bool,
glider_trails: bool,
}
Fields§
§head: Bone
§chest: Bone
§belt: Bone
§back: Bone
§shorts: Bone
§hand_l: Bone
§hand_r: Bone
§foot_l: Bone
§foot_r: Bone
§shoulder_l: Bone
§shoulder_r: Bone
§glider: Bone
§main: Bone
§second: Bone
§lantern: Bone
§hold: Bone
§torso: Bone
§control: Bone
§control_l: Bone
§control_r: Bone
§holding_lantern: bool
§back_carry_offset: f32
§main_weapon_trail: bool
§off_weapon_trail: bool
§glider_trails: bool
Implementations§
source§impl CharacterSkeleton
impl CharacterSkeleton
sourcepub fn do_tools_on_back(
&mut self,
hands: (Option<Hands>, Option<Hands>),
active_tool_kind: Option<ToolKind>,
second_tool_kind: Option<ToolKind>,
)
pub fn do_tools_on_back( &mut self, hands: (Option<Hands>, Option<Hands>), active_tool_kind: Option<ToolKind>, second_tool_kind: Option<ToolKind>, )
Animate tools (main and secondary) on the character’s back, taking in account backpack offsets.
sourcepub fn do_hold_lantern(
&mut self,
s_a: &SkeletonAttr,
anim_time: f32,
acc_vel: f32,
speednorm: f32,
impact: f32,
tilt: f32,
)
pub fn do_hold_lantern( &mut self, s_a: &SkeletonAttr, anim_time: f32, acc_vel: f32, speednorm: f32, impact: f32, tilt: f32, )
If we’re holding a lantern, animate hold the lantern in a reasonable position.
Trait Implementations§
source§impl Clone for CharacterSkeleton
impl Clone for CharacterSkeleton
source§fn clone(&self) -> CharacterSkeleton
fn clone(&self) -> CharacterSkeleton
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Default for CharacterSkeleton
impl Default for CharacterSkeleton
source§fn default() -> CharacterSkeleton
fn default() -> CharacterSkeleton
Returns the “default value” for a type. Read more
source§impl<'a, Factor> Lerp<Factor> for &'a CharacterSkeleton
impl<'a, Factor> Lerp<Factor> for &'a CharacterSkeleton
§type Output = CharacterSkeleton
type Output = CharacterSkeleton
The resulting type after performing the LERP operation.
source§fn lerp_unclamped_precise(from: Self, to: Self, factor: Factor) -> Self::Output
fn lerp_unclamped_precise(from: Self, to: Self, factor: Factor) -> Self::Output
Returns the linear interpolation of
from
to to
with factor
unconstrained,
using a possibly slower but more precise operation. Read moresource§fn lerp_unclamped(from: Self, to: Self, factor: Factor) -> Self::Output
fn lerp_unclamped(from: Self, to: Self, factor: Factor) -> Self::Output
Returns the linear interpolation of
from
to to
with factor
unconstrained,
using the supposedly fastest but less precise implementation. Read moresource§fn lerp_unclamped_inclusive_range(
range: RangeInclusive<Self>,
factor: Factor,
) -> Self::Output
fn lerp_unclamped_inclusive_range( range: RangeInclusive<Self>, factor: Factor, ) -> Self::Output
Version of
lerp_unclamped()
that used a single RangeInclusive
parameter instead of two values.source§fn lerp_unclamped_precise_inclusive_range(
range: RangeInclusive<Self>,
factor: Factor,
) -> Self::Output
fn lerp_unclamped_precise_inclusive_range( range: RangeInclusive<Self>, factor: Factor, ) -> Self::Output
Version of
lerp_unclamped_precise()
that used a single RangeInclusive
parameter instead of two values.source§impl Skeleton for CharacterSkeleton
impl Skeleton for CharacterSkeleton
type Attr = SkeletonAttr
type Body = Body
const BONE_COUNT: usize = 16usize
fn compute_matrices_inner( &self, base_mat: Mat4<f32>, buf: &mut [FigureBoneData; 16], body: Self::Body, ) -> Offsets
fn compute_matrices( &self, base_mat: Mat4<f32>, buf: &mut [FigureBoneData; 16], body: Self::Body, ) -> Offsets
Auto Trait Implementations§
impl Freeze for CharacterSkeleton
impl RefUnwindSafe for CharacterSkeleton
impl Send for CharacterSkeleton
impl Sync for CharacterSkeleton
impl Unpin for CharacterSkeleton
impl UnwindSafe for CharacterSkeleton
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self
file descriptor.§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Pointee for T
impl<T> Pointee for T
§impl<Context> SubContext<Context> for Context
impl<Context> SubContext<Context> for Context
fn sub_context(self) -> Context
§impl<T> TryDefault for Twhere
T: Default,
impl<T> TryDefault for Twhere
T: Default,
§fn try_default() -> Result<T, String>
fn try_default() -> Result<T, String>
Tries to create the default.
§fn unwrap_default() -> Self
fn unwrap_default() -> Self
Calls
try_default
and panics on an error case.