Skip to content

Commit

Permalink
Refactoring: move files into bin project
Browse files Browse the repository at this point in the history
  • Loading branch information
fremag committed Feb 1, 2024
1 parent cb43921 commit 3789662
Show file tree
Hide file tree
Showing 23 changed files with 198 additions and 24 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/target
/.idea
/.vscode/
/ray-tracer-cli/target
/ray-tracer-lib/target
16 changes: 8 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 1 addition & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
workspace = { members = [ "ray-tracer-lib"] }

[package]
name = "ray_tracer_rust"
version = "0.1.0"
edition = "2021"
workspace = { members = [ "ray-tracer-lib", "ray-tracer-cli"], resolver = "2" }

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
rand = { version = "0.8.5", features = [] }
ray-tracer-lib = { version = "0.1.0", path = "ray-tracer-lib" }
90 changes: 90 additions & 0 deletions ray-tracer-cli/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions ray-tracer-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[package]
name = "ray-tracer-cli"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
rand = { version = "0.8.5", features = [] }
ray-tracer-lib = { version = "0.1.0", path = "../ray-tracer-lib" }
6 changes: 3 additions & 3 deletions src/main.rs → ray-tracer-cli/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
mod ray_tracer;
mod tests;
mod scenes;
mod ray_tracer;
mod scene;
mod tests;

use std::env;
use std::process::exit;
use ray_tracer_lib::patterns::pattern::Pattern;
use scenes::clover_scene::CloverScene;
use scene::Scene;
use crate::scene::Scene;
use crate::scenes::basic_refraction_scene::BasicRefractionScene;
use crate::scenes::clover_triangles_scene::CloverTriangleScene;
use crate::scenes::cone_scene::ConeScene;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use ray_tracer_lib::core::math::{Float, PI};
use ray_tracer_lib::core::transform::view_transform;
use ray_tracer_lib::core::tuple::{point, Tuple, vector};
use crate::ray_tracer::{build_mesh, curve_sweep_mesh};
use crate::scene::Scene;
use ray_tracer_lib::world::World;
use crate::scene::Scene;

pub struct CloverScene {
from_x: Float,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ use ray_tracer_lib::lights::point_light::PointLight;
use ray_tracer_lib::material::Material;
use ray_tracer_lib::object::{build_cylinder, build_plane, build_sphere, Object};
use ray_tracer_lib::patterns::pattern::Pattern;
use crate::scene::Scene;
use ray_tracer_lib::shapes::group::Group;
use ray_tracer_lib::world::World;
use crate::scene::Scene;

pub struct GroupScene {

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
82 changes: 82 additions & 0 deletions ray-tracer-lib/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion ray-tracer-lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
name = "ray-tracer-lib"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
Expand Down

0 comments on commit 3789662

Please sign in to comment.