projects
/
mandelwow.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix benchmarks for latest glium/glutin API
[mandelwow.git]
/
cube.rs
diff --git
a/cube.rs
b/cube.rs
index de5315b80fa498404e6108d8e450732312488e32..916b8689d4ee5b8efc0072e9756a443e11d36b49 100644
(file)
--- a/
cube.rs
+++ b/
cube.rs
@@
-1,6
+1,6
@@
use std::f32;
use std::f32;
-#[derive(Copy, Clone)]
+#[derive(Copy, Clone
, Debug
)]
pub struct Cube {
pub xmin: f32,
pub ymin: f32,
pub struct Cube {
pub xmin: f32,
pub ymin: f32,
@@
-9,3
+9,10
@@
pub struct Cube {
pub ymax: f32,
pub zmax: f32,
}
pub ymax: f32,
pub zmax: f32,
}
+
+// Returns a unit Cube centered in the origin.
+impl Default for Cube {
+ fn default() -> Cube {
+ Cube { xmin: -0.5, ymin: -0.5, zmin: -0.5, xmax: 0.5, ymax: 0.5, zmax: 0.5f32 }
+ }
+}