1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
use mat::Mat3x1;
use i_bound::IBound;
use i_vicinity::IVicinity;
pub enum ShapeType {
Point,
Ray,
Sphere,
Plane,
Trig,
Box,
Rect,
TriPrism,
Line,
Frustum,
Complex,
}
pub trait IShape: IVicinity<f64> {
fn get_shape_data(&self) -> Vec<f64>;
fn get_type(&self) -> ShapeType;
fn get_bound(&self) -> &dyn IBound;
fn get_intersect(&self, other: &dyn IShape) -> (bool, Option<Mat3x1<f64>>);
fn get_support(&self, v: &Mat3x1<f64>) -> Option<Mat3x1<f64>>;
}