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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#![cfg(feature = "geometry-glam")]
use theon::integration::glam;
use crate::geometry::{FromGeometry, UnitGeometry};
use crate::graph::GraphData;
#[doc(hidden)]
pub use self::glam::*;
impl FromGeometry<(f32, f32)> for Vec2 {
fn from_geometry(other: (f32, f32)) -> Self {
Self::from(other)
}
}
impl FromGeometry<(f32, f32, f32)> for Vec3 {
fn from_geometry(other: (f32, f32, f32)) -> Self {
Self::from(other)
}
}
impl FromGeometry<(f32, f32, f32)> for Vec3A {
fn from_geometry(other: (f32, f32, f32)) -> Self {
Self::from(other)
}
}
impl GraphData for Vec2 {
type Vertex = Self;
type Arc = ();
type Edge = ();
type Face = ();
}
impl GraphData for Vec3 {
type Vertex = Self;
type Arc = ();
type Edge = ();
type Face = ();
}
impl GraphData for Vec3A {
type Vertex = Self;
type Arc = ();
type Edge = ();
type Face = ();
}
impl UnitGeometry for Vec2 {}
impl UnitGeometry for Vec3 {}
impl UnitGeometry for Vec3A {}