Another project
1use bone_types::{
2 Aabb3, AngleTolerance, ChordHeightTolerance, Parameter, Point3, Tolerance, UnitVec3, Vec3,
3};
4
5use crate::mesh::TriMesh;
6
7pub trait Surface3 {
8 fn evaluate(&self, u: Parameter, v: Parameter) -> Point3;
9 fn partials(&self, u: Parameter, v: Parameter) -> (Vec3, Vec3);
10 fn normal(&self, u: Parameter, v: Parameter) -> UnitVec3;
11 fn bounding_box(&self) -> Aabb3;
12 fn contains_point(&self, p: Point3, tolerance: Tolerance) -> bool;
13 fn tessellate(&self, chord: ChordHeightTolerance, angle: AngleTolerance) -> TriMesh;
14}