-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(read wavefront obj file)
- Loading branch information
Showing
5 changed files
with
124 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ pub mod plane; | |
pub mod sphere; | ||
pub mod shape; | ||
pub mod triangle; | ||
pub mod triangle_model; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
use crate::core::bounds::Bounds; | ||
use crate::core::intersections::Intersections; | ||
use crate::core::matrix::Matrix; | ||
use crate::core::ray::Ray; | ||
use crate::shapes::triangle::Triangle; | ||
|
||
#[derive(Debug, Clone)] | ||
pub struct TriangleModel { | ||
pub triangles : Vec<Triangle> | ||
} | ||
|
||
impl TriangleModel { | ||
pub fn new(triangles : Vec<Triangle>) -> Self { | ||
Self {triangles} | ||
} | ||
|
||
pub(crate) fn set_transformation(&self, transformation: Matrix<4>) { | ||
todo!() | ||
} | ||
|
||
pub(crate) fn bounds(&self) -> Bounds { | ||
todo!() | ||
} | ||
|
||
pub(crate) fn intersect(&self, ray: &Ray) -> Intersections { | ||
todo!() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters