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
#![cfg(feature = "geometry-ultraviolet")]
use theon::integration::ultraviolet;
use ultraviolet::vec::{Vec2, Vec3};
use crate::geometry::{FromGeometry, UnitGeometry};
use crate::graph::GraphData;
#[doc(hidden)]
pub use self::ultraviolet::*;
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 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 UnitGeometry for Vec2 {}
impl UnitGeometry for Vec3 {}