summaryrefslogtreecommitdiffstats
path: root/src/glitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/glitem.cpp')
-rw-r--r--src/glitem.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/glitem.cpp b/src/glitem.cpp
index a307e38..47b2acc 100644
--- a/src/glitem.cpp
+++ b/src/glitem.cpp
@@ -362,7 +362,7 @@ void GLItem::createCube(const QVector3D &lbb, const QVector3D &rtf)
// Create all the vectors for caching
QVector3D lbf = QVector3D(lbb.x(), lbb.y(), rtf.z());
QVector3D rbb = QVector3D(rtf.x(), lbb.y(), lbb.z());
- QVector3D rbf = QVector3D(rtf.x(), lbb.y(), rtf.y());
+ QVector3D rbf = QVector3D(rtf.x(), lbb.y(), rtf.z());
QVector3D ltb = QVector3D(lbb.x(), rtf.y(), lbb.z());
QVector3D ltf = QVector3D(lbb.x(), rtf.y(), rtf.z());
QVector3D rtb = QVector3D(rtf.x(), rtf.y(), lbb.z());
@@ -422,6 +422,14 @@ void GLItem::createCube(const QVector3D &lbb, const QVector3D &rtf)
m_points.append(GLPoint(ltf, n0, t0, GLColorRgba::clGreen));
}
+void GLItem::createF(double height)
+{
+ float stdLength = height/5.0;
+ createCube(QVector3D(0.0, 0.0, 0.0),QVector3D(stdLength, height, stdLength));
+ createCube(QVector3D(stdLength, height, 0.0),QVector3D(3.0 * stdLength, height - 1.0 * stdLength, stdLength));
+ createCube(QVector3D(stdLength, height - 2.0 * stdLength, 0.0),QVector3D(2.0 * stdLength, height - 3.0 * stdLength, stdLength));
+}
+
void GLItem::createAxis(double length, const QVector3D & origin, const QVector3D & axis,
const QVector3D & normal, const QVector3D & texCoord,
const GLColorRgba& color)