pub struct GitObjectPlacement {
pub object_id: Option<ObjectId>,
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
Where an item entry or a store entry sits, whichever form the entry takes.
One type for two lists rather than one each: the sets are the same, they agree on every audited axis, and the declarations the extraction produced for them are identical. A later measurement that parts them breaks the share rather than quietly answering for the wrong list.
ObjectId is deliberately not here, because it is not shared: every
saved form carries it, no static form does, and the party stash carries it
on none of its items. It is declared by the saved arms instead, so a list
that has no runtime id does not gain one on the way back out.
Fields§
§object_id: Option<ObjectId>Runtime object id (ObjectId), which not every list carries.
None where the file has no label, which is the state the six fields
below never reach: they are on every element of every list measured and
this one is not. Static forms carry it nowhere, and among saved forms
the party’s shared stash carries it on none of its items while every
other item list carries it on all of theirs.
Held as the absence rather than resolved to a value because writing it
back is what the resolution would cost. The engine’s own answer for an
absent label is on the schema entry beside this one, and it is
INVALID rather than zero.
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.
The same two-versus-three split the creature block has: a static item or
store placement carries XOrientation and YOrientation and no third,
and every saved one carries all three.
Implementations§
Source§impl GitObjectPlacement
impl GitObjectPlacement
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 GitObjectPlacement
impl Clone for GitObjectPlacement
Source§fn clone(&self) -> GitObjectPlacement
fn clone(&self) -> GitObjectPlacement
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 GitObjectPlacement
impl Debug for GitObjectPlacement
Source§impl Default for GitObjectPlacement
impl Default for GitObjectPlacement
Source§impl HasSchema for GitObjectPlacement
impl HasSchema for GitObjectPlacement
Source§impl PartialEq for GitObjectPlacement
impl PartialEq for GitObjectPlacement
Source§fn eq(&self, other: &GitObjectPlacement) -> bool
fn eq(&self, other: &GitObjectPlacement) -> bool
self and other values to be equal, and is used by ==.