pub struct GitCamera {
pub camera_id: i32,
pub position: [f32; 3],
pub orientation: [f32; 4],
pub pitch: f32,
pub height: f32,
pub field_of_view: f32,
pub mic_range: f32,
}Expand description
A static camera entry in the area.
Position is a GFF Vector3 and Orientation is a GFF Quaternion (Vector4).
Fields§
§camera_id: i32Camera ID (CameraID).
position: [f32; 3]Position as GFF Vector3 (Position).
orientation: [f32; 4]Orientation as GFF Quaternion (Orientation).
pitch: f32Pitch angle (Pitch).
height: f32Height offset (Height).
field_of_view: f32Field of view (FieldOfView, engine default 55.0).
mic_range: f32Microphone range (MicRange).
Implementations§
Source§impl GitCamera
impl GitCamera
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.