mirror of
https://github.com/Theaninova/Bampy.git
synced 2026-01-08 19:13:01 +00:00
feat: stuff
This commit is contained in:
@@ -1,21 +1,15 @@
|
||||
use super::{triangle::Triangle, FloatValue};
|
||||
use bvh::{aabb::Aabb, bvh::Bvh};
|
||||
use nalgebra::{ClosedAdd, ClosedMul, ClosedSub, Scalar, SimdPartialOrd};
|
||||
use num::{Float, FromPrimitive};
|
||||
|
||||
use super::triangle::Triangle;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Mesh<T: SimdPartialOrd + Scalar + Copy> {
|
||||
pub aabb: Aabb<T, 3>,
|
||||
pub bvh: Bvh<T, 3>,
|
||||
pub triangles: Vec<Triangle<T>>,
|
||||
pub struct Mesh {
|
||||
pub aabb: Aabb<FloatValue, 3>,
|
||||
pub bvh: Bvh<FloatValue, 3>,
|
||||
pub triangles: Vec<Triangle>,
|
||||
}
|
||||
|
||||
impl<T> From<Vec<Triangle<T>>> for Mesh<T>
|
||||
where
|
||||
T: SimdPartialOrd + Scalar + Copy + ClosedMul + ClosedAdd + ClosedSub + Float + FromPrimitive,
|
||||
{
|
||||
fn from(mut triangles: Vec<Triangle<T>>) -> Self {
|
||||
impl From<Vec<Triangle>> for Mesh {
|
||||
fn from(mut triangles: Vec<Triangle>) -> Self {
|
||||
Self {
|
||||
aabb: triangles
|
||||
.get(0)
|
||||
|
||||
Reference in New Issue
Block a user