From 60ea1ae7257d60d3ee05f1b9d412a1bd441db7cb Mon Sep 17 00:00:00 2001 From: jonas Date: Mon, 14 Jan 2019 17:30:06 +0100 Subject: RTFM!! Error resulted in illegal coordiante pair for drawLine (x2 > x1) --- cWiremesh.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'cWiremesh.h') diff --git a/cWiremesh.h b/cWiremesh.h index 49bf4b9..17231a2 100644 --- a/cWiremesh.h +++ b/cWiremesh.h @@ -5,7 +5,7 @@ #include "cRender.h" -#define _DEPTH 100 +#define _DEPTH 99 struct sCoord3d { @@ -21,6 +21,15 @@ struct sCoord3d ret.z = z + p.z; return ret; } + + sCoord3d operator-(sCoord3d p) + { + sCoord3d ret; + ret.x = x - p.x; + ret.y = y - p.y; + ret.z = z - p.z; + return ret; + } }; struct sVector @@ -44,6 +53,8 @@ public: void rotate(sCoord3d _val); + void scale(int _scalar); + sCoord3d getPosition(); void setPosition(int _x, int _y, int _z); -- cgit v1.2.3