pub struct AvatarRaceMode {
pub id: StructuredId,
pub name: String,
pub slot_defaults: HashMap<AvatarSlot, u32>,
pub morph_weight: f32,
}Expand description
A race = a set of biology slot defaults plus a morph weight. Applying it sets the biology slots; everything else stays custom.
Fields§
§id: StructuredId§name: String§slot_defaults: HashMap<AvatarSlot, u32>Default part ids for (biology) slots.
morph_weight: f321.0 = full race; < 1.0 blends toward a proto-form.
Implementations§
Source§impl AvatarRaceMode
impl AvatarRaceMode
pub fn new(id: StructuredId, name: &str) -> Self
pub fn with_default(self, slot: AvatarSlot, part_id: u32) -> Self
Sourcepub fn apply_to(&self, spec: &mut AvatarSpec)
pub fn apply_to(&self, spec: &mut AvatarSpec)
Stamp this race’s biology defaults onto spec.
Trait Implementations§
Source§impl Clone for AvatarRaceMode
impl Clone for AvatarRaceMode
Source§fn clone(&self) -> AvatarRaceMode
fn clone(&self) -> AvatarRaceMode
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 moreAuto Trait Implementations§
impl Freeze for AvatarRaceMode
impl RefUnwindSafe for AvatarRaceMode
impl Send for AvatarRaceMode
impl Sync for AvatarRaceMode
impl Unpin for AvatarRaceMode
impl UnsafeUnpin for AvatarRaceMode
impl UnwindSafe for AvatarRaceMode
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