Probably wrong bilinear patch intersection
This commit is contained in:
parent
6d363aecd0
commit
76448ed442
2 changed files with 126 additions and 18 deletions
|
|
@ -1,6 +1,6 @@
|
|||
use crate::prelude::*;
|
||||
use core::panic;
|
||||
use std::ops::{Add, Index, Sub};
|
||||
use std::ops::{Add, Index, Mul, Sub};
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub struct Pos3 {
|
||||
|
|
@ -32,6 +32,14 @@ impl Pos3 {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn as_dir(self) -> Dir3 {
|
||||
Dir3 {
|
||||
x: self.x,
|
||||
y: self.y,
|
||||
z: self.z,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn from_barycentric(vertices: [Self; 3], coordinates: [Float; 3]) -> Self {
|
||||
Self {
|
||||
x: vertices[0].x() * coordinates[0]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue