@@ -38,12 +38,12 @@ pub struct Sphere {
38
38
}
39
39
40
40
impl Sphere {
41
- /// Get a reference to the sphere's origin.
41
+ /// Get the sphere's origin.
42
42
pub fn origin ( & self ) -> Vec3 {
43
43
self . origin
44
44
}
45
45
46
- /// Get a reference to the sphere's radius.
46
+ /// Get the sphere's radius.
47
47
pub fn radius ( & self ) -> f32 {
48
48
self . radius
49
49
}
@@ -136,7 +136,7 @@ pub struct AABB {
136
136
impl Primitive3d for AABB {
137
137
fn outside_plane ( & self , plane : Plane ) -> bool {
138
138
for vertex in self . vertices ( ) . iter ( ) {
139
- if plane. distance_to_point ( vertex) <= 0.0 {
139
+ if plane. distance_to_point ( * vertex) <= 0.0 {
140
140
return false ;
141
141
}
142
142
}
@@ -212,7 +212,7 @@ pub struct Frustum {
212
212
impl Primitive3d for Frustum {
213
213
fn outside_plane ( & self , plane : Plane ) -> bool {
214
214
for vertex in self . vertices ( ) . iter ( ) {
215
- if plane. distance_to_point ( vertex) <= 0.0 {
215
+ if plane. distance_to_point ( * vertex) <= 0.0 {
216
216
return false ;
217
217
}
218
218
}
@@ -344,13 +344,13 @@ impl Plane {
344
344
self . normal . dot ( point) + -self . normal . dot ( self . point )
345
345
}
346
346
347
- /// Get a reference to the plane's point.
348
- pub fn point ( & self ) -> & Vec3 {
349
- & self . point
347
+ /// Get the plane's point.
348
+ pub fn point ( & self ) -> Vec3 {
349
+ self . point
350
350
}
351
351
352
- /// Get a reference to the plane's normal.
353
- pub fn normal ( & self ) -> & Vec3 {
354
- & self . normal
352
+ /// Get the plane's normal.
353
+ pub fn normal ( & self ) -> Vec3 {
354
+ self . normal
355
355
}
356
356
}
0 commit comments