pub struct GitCreatureCommon {
pub x_position: f32,
pub y_position: f32,
pub z_position: f32,
pub x_orientation: f32,
pub y_orientation: f32,
pub z_orientation: Option<f32>,
}Expand description
The part of a creature entry that is what every creature entry carries, whichever form it takes.
Both arms flatten it and the list’s element is it, so the labels here are one declaration reached from both forms rather than two copies.
Fields§
§x_position: f32X position (XPosition).
y_position: f32Y position (YPosition).
z_position: f32Z position (ZPosition).
x_orientation: f32X orientation (XOrientation).
y_orientation: f32Y orientation (YOrientation).
z_orientation: Option<f32>Z orientation (ZOrientation).
Z orientation (ZOrientation), which only a saved form carries.
A static placement stores a two-component facing and stops: XOrientation
and YOrientation are on every install element and this is on none of
them, where every saved creature carries all three. Held as the absence so
writing a static placement back does not give it a third component.
Implementations§
Source§impl GitCreatureCommon
impl GitCreatureCommon
Sourcepub const PARTS: &'static [&'static [Field]]
pub const PARTS: &'static [&'static [Field]]
This type’s schema in parts, which is what a container holding it references.
Own fields first, then one part per flattened child in the order they are declared.
Sourcepub fn read_declared(root: &GffStruct) -> Self
pub fn read_declared(root: &GffStruct) -> Self
Reads every declared field off root.
Absent fields take the entry’s own answer, so a fallback is derived from the declaration rather than restated beside it.
A field declaring a hand-written read is left at that answer for the view to overwrite.
Sourcepub fn write_declared(&self, root: &mut GffStruct)
pub fn write_declared(&self, root: &mut GffStruct)
Writes every declared field onto root, leaving out the ones
their entry says the engine’s own writer leaves out.
A field declaring a hand-written write is not touched here.
Sourcepub fn read_element(structure: &GffStruct) -> Self
pub fn read_element(structure: &GffStruct) -> Self
Reads one element of a list of this type.
Sourcepub fn write_element(&self, structure: &mut GffStruct)
pub fn write_element(&self, structure: &mut GffStruct)
Writes one element of a list of this type.
Trait Implementations§
Source§impl Clone for GitCreatureCommon
impl Clone for GitCreatureCommon
Source§fn clone(&self) -> GitCreatureCommon
fn clone(&self) -> GitCreatureCommon
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GitCreatureCommon
impl Debug for GitCreatureCommon
Source§impl Default for GitCreatureCommon
impl Default for GitCreatureCommon
Source§impl HasSchema for GitCreatureCommon
impl HasSchema for GitCreatureCommon
Source§impl PartialEq for GitCreatureCommon
impl PartialEq for GitCreatureCommon
Source§fn eq(&self, other: &GitCreatureCommon) -> bool
fn eq(&self, other: &GitCreatureCommon) -> bool
self and other values to be equal, and is used by ==.