Skip to main content

rakata_generics/git/
camera.rs

1//! Static camera entries in a GIT.
2
3use rakata_formats::GffModel;
4/// A static camera entry in the area.
5///
6/// `Position` is a GFF Vector3 and `Orientation` is a GFF Quaternion (Vector4).
7#[derive(Debug, Clone, PartialEq, GffModel)]
8pub struct GitCamera {
9    /// Camera ID (`CameraID`).
10    #[gff(CameraID, stamped = -1)]
11    pub camera_id: i32,
12    /// Position as GFF Vector3 (`Position`).
13    #[gff(Position, stamped = [0.0, 0.0, 0.0])]
14    pub position: [f32; 3],
15    /// Orientation as GFF Quaternion (`Orientation`).
16    #[gff(Orientation, stamped = [1.0, 0.0, 0.0, 0.0])]
17    pub orientation: [f32; 4],
18    /// Pitch angle (`Pitch`).
19    #[gff(Pitch, stamped)]
20    pub pitch: f32,
21    /// Height offset (`Height`).
22    #[gff(Height, stamped)]
23    pub height: f32,
24    /// Field of view (`FieldOfView`, engine default 55.0).
25    #[gff(FieldOfView, stamped = 55.0)]
26    pub field_of_view: f32,
27    /// Microphone range (`MicRange`).
28    #[gff(MicRange, stamped)]
29    pub mic_range: f32,
30}