summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Cubehole.h4
-rw-r--r--Trapezocube.h4
-rw-r--r--Triangle.h5
3 files changed, 9 insertions, 4 deletions
diff --git a/Cubehole.h b/Cubehole.h
index 835aa62..ae31052 100644
--- a/Cubehole.h
+++ b/Cubehole.h
@@ -9,7 +9,9 @@
class Cubehole
{
public:
- Cubehole(): width(0), height(0), depth(0), x(0), y(0), z(0), innerwidth(0), innerdepth(0) {}
+ Cubehole(): width(0), height(0), depth(0), x(0), y(0), z(0), innerwidth(0), innerdepth(0) {
+ setColor(vmml::vec4f::ONE, vmml::vec4f::ONE, vmml::vec4f::ONE, vmml::vec4f::ONE);
+ }
Cubehole(float width0, float height0, float depth0, float x0, float y0, float z0,
float innerwidth0, float innerdepth0,
const vmml::vec4f &colorfront0, const vmml::vec4f &colorright0,
diff --git a/Trapezocube.h b/Trapezocube.h
index 3c2aa71..5bcaad1 100644
--- a/Trapezocube.h
+++ b/Trapezocube.h
@@ -8,7 +8,7 @@
class Trapezocube
{
public:
- Trapezocube(): widthfront(0), widthback(0), height(0), depth(0), x(0), y(0), z(0), rotate(0) {}
+ Trapezocube(): widthfront(0), widthback(0), height(0), depth(0), x(0), y(0), z(0), rotate(0), color(vmml::vec4f::ONE) {}
Trapezocube(float widthfront, float widthback, float height, float depth, float x, float y, float z,
float rotate, const vmml::vec4f &col) {
@@ -25,7 +25,7 @@ class Trapezocube
float getPosY() {return y;}
float getPosZ() {return z;}
float getRotate() {return rotate;}
- vmml::vec4f getColor() {return color;}
+ const vmml::vec4f& getColor() {return color;}
void setSize(float wf, float wb, float h, float d)
{
diff --git a/Triangle.h b/Triangle.h
index febcb3d..5e8a12c 100644
--- a/Triangle.h
+++ b/Triangle.h
@@ -8,7 +8,10 @@
class Triangle
{
public:
- Triangle() {}
+ Triangle() : c(vmml::vec4f::ONE) {
+ v[0] = v[1] = v[2] = vmml::vec3f::ZERO;
+ }
+
Triangle(const vmml::vec3f &v1, const vmml::vec3f &v2, const vmml::vec3f &v3, const vmml::vec4f &c0) : c(c0)
{
v[0] = v1;