aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authoreug-vs <eugene@eug-vs.xyz>2021-10-27 10:15:50 +0300
committereug-vs <eugene@eug-vs.xyz>2021-10-27 10:15:50 +0300
commit92d5cd982d87963165ee175b985a8a477154a5e7 (patch)
treebd95d1bf9f0f833ad5a638d08dcbe133888c989f /src/main.rs
parent4c231404b9a11f42503cc6e51fe92470429acbbf (diff)
downloadpistol-92d5cd982d87963165ee175b985a8a477154a5e7.tar.gz
feat: use cgmath::Vector3
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/main.rs b/src/main.rs
index bf70415..3a757db 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,18 +1,14 @@
-mod vector;
mod camera;
mod canvas;
use std::f32::consts::PI;
+use cgmath::Vector3;
-use crate::{camera::{Buffer, Camera}, vector::Vector};
-
-trait Object {
- fn sdf(&self, point: Vector) -> f32;
-}
+use crate::camera::{Buffer, Camera};
fn main() {
let mut cam = Camera {
- position: Vector { x: 0.0, y: -0.7, z: 0.0 },
- direction: Vector { x: 1.0, y: 0.0, z: 0.0 },
+ position: Vector3 { x: 0.0, y: -0.7, z: 0.0 },
+ direction: Vector3 { x: 1.0, y: 0.0, z: 0.0 },
angle: PI / 2.0,
distance: 1.0,
aspect_ratio: 1.0,