use bone_types::{
    Aabb3, AngleTolerance, ChordHeightTolerance, Parameter, Point3, Tolerance, UnitVec3, Vec3,
};

use crate::mesh::TriMesh;

pub trait Surface3 {
    fn evaluate(&self, u: Parameter, v: Parameter) -> Point3;
    fn partials(&self, u: Parameter, v: Parameter) -> (Vec3, Vec3);
    fn normal(&self, u: Parameter, v: Parameter) -> UnitVec3;
    fn bounding_box(&self) -> Aabb3;
    fn contains_point(&self, p: Point3, tolerance: Tolerance) -> bool;
    fn tessellate(&self, chord: ChordHeightTolerance, angle: AngleTolerance) -> TriMesh;
}
