pub struct ModelArena { /* private fields */ }Implementations§
Source§impl ModelArena
impl ModelArena
pub fn new(bones: Vec<BoneInit>) -> Result<Self, ModelBuildError>
pub fn new_with_ik( bones: Vec<BoneInit>, ik_solvers: Vec<IkSolverInit>, ) -> Result<Self, ModelBuildError>
pub fn new_full( bones: Vec<BoneInit>, ik_solvers: Vec<IkSolverInit>, append_transforms: Vec<AppendTransformInit>, ) -> Result<Self, ModelBuildError>
pub fn new_with_morphs( bones: Vec<BoneInit>, ik_solvers: Vec<IkSolverInit>, append_transforms: Vec<AppendTransformInit>, morph: MorphInit, ) -> Result<Self, ModelBuildError>
pub fn bone_count(&self) -> usize
pub fn parent_index(&self, bone: BoneIndex) -> Option<BoneIndex>
pub fn rest_position(&self, bone: BoneIndex) -> Vec3A
pub fn inverse_bind_matrix(&self, bone: BoneIndex) -> Mat4
pub fn transform_order(&self, bone: BoneIndex) -> i32
pub fn fixed_axis(&self, bone: BoneIndex) -> Option<Vec3A>
pub fn fixed_axis_count(&self) -> usize
Sourcepub fn with_local_axes(
self,
local_axes: impl IntoIterator<Item = Option<LocalAxis>>,
) -> Self
pub fn with_local_axes( self, local_axes: impl IntoIterator<Item = Option<LocalAxis>>, ) -> Self
Overlay per-bone PMX local-axis descriptors without changing existing
constructors. Entries beyond bone_count are ignored; shorter lists
leave trailing bones without a local axis. Degenerate axes are dropped.
pub fn local_axis(&self, bone: BoneIndex) -> Option<LocalAxis>
Sourcepub fn local_axis_basis(&self, bone: BoneIndex) -> Option<Quat>
pub fn local_axis_basis(&self, bone: BoneIndex) -> Option<Quat>
Orthonormal local-axis basis as a quaternion (columns of the bone-local frame). Used only as the IK angle-limit evaluation frame.
pub fn local_axis_count(&self) -> usize
pub fn transform_after_physics(&self, bone: BoneIndex) -> bool
pub fn eval_order(&self) -> &[BoneIndex]
pub fn ik_count(&self) -> usize
pub fn ik_solvers(&self) -> &[IkSolver]
pub fn append_transform_index(&self, bone: BoneIndex) -> Option<usize>
pub fn append_transform(&self, append_index: usize) -> &AppendTransform
pub fn append_transforms(&self) -> &[AppendTransform]
pub fn morph_count(&self) -> u32
pub fn vertex_morph_offsets(&self) -> &[VertexMorphOffset]
pub fn vertex_morph_spans(&self) -> &[MorphOffsetSpan]
pub fn bone_morph_offsets(&self) -> &[BoneMorphOffset]
pub fn bone_morph_spans(&self) -> &[MorphOffsetSpan]
pub fn group_morph_offsets(&self) -> &[GroupMorphOffset]
pub fn group_morph_spans(&self) -> &[MorphOffsetSpan]
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ModelArena
impl RefUnwindSafe for ModelArena
impl Send for ModelArena
impl Sync for ModelArena
impl Unpin for ModelArena
impl UnsafeUnpin for ModelArena
impl UnwindSafe for ModelArena
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> 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