diff options
Diffstat (limited to 'bindgen/rust')
-rw-r--r-- | bindgen/rust/celeritas-sys/src/lib.rs | 28 | ||||
-rw-r--r-- | bindgen/rust/src/lib.rs | 3 |
2 files changed, 30 insertions, 1 deletions
diff --git a/bindgen/rust/celeritas-sys/src/lib.rs b/bindgen/rust/celeritas-sys/src/lib.rs index e6f62ad..780ceff 100644 --- a/bindgen/rust/celeritas-sys/src/lib.rs +++ b/bindgen/rust/celeritas-sys/src/lib.rs @@ -111,3 +111,31 @@ impl Default for ShaderDataLayout { } } } + +impl Default for Camera { + fn default() -> Self { + let camera_pos = Vec3 { + x: 18.9, + y: 10.6, + z: 11.6, + }; + let camera_front = Vec3 { + x: -0.6, + y: -0.2, + z: -0.7, + }; + let camera = unsafe { + Camera_Create( + camera_pos, + camera_front, + Vec3 { + x: 0.0, + y: 1.0, + z: 0.0, + }, + 45.0, + ) + }; + camera + } +} diff --git a/bindgen/rust/src/lib.rs b/bindgen/rust/src/lib.rs index a20a9e8..f2e177f 100644 --- a/bindgen/rust/src/lib.rs +++ b/bindgen/rust/src/lib.rs @@ -20,7 +20,8 @@ use std::{ }; use celeritas_sys::{ - Core_Bringup, Core_Shutdown, DirectionalLight, PointLight, RenderEnt, Transform, Vec3, + Camera, Camera_Create, Core_Bringup, Core_Shutdown, DirectionalLight, PointLight, RenderEnt, + Transform, Vec3, }; use serde::{Deserialize, Serialize}; |