From 92d5cd982d87963165ee175b985a8a477154a5e7 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Wed, 27 Oct 2021 10:15:50 +0300 Subject: feat: use cgmath::Vector3 --- src/main.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/main.rs') 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, -- cgit v1.2.3