Skip to content
Snippets Groups Projects
Commit 5cc2d5a1 authored by Johannes Eder's avatar Johannes Eder
Browse files

YELLOW

parent 671079db
No related branches found
No related tags found
No related merge requests found
Graph3DViewObject.java 3712170073c3e835663a1f06bfc5bad2c5dad920 RED Graph3DViewObject.java 8b0f50b524b427c02ac00b4c0c76f7fafbace938 YELLOW
ViewObjectBase.java 2fbcf09f17655c06abffaeb00dbc558e711404eb GREEN ViewObjectBase.java 2fbcf09f17655c06abffaeb00dbc558e711404eb GREEN
...@@ -77,6 +77,10 @@ public class Graph3DViewObject extends ViewObjectBase { ...@@ -77,6 +77,10 @@ public class Graph3DViewObject extends ViewObjectBase {
HashMap<String, Object3D> characters; HashMap<String, Object3D> characters;
/** Hash map of all numbers which can be rendered */ /** Hash map of all numbers which can be rendered */
HashMap<Integer, Object3D> numbers; HashMap<Integer, Object3D> numbers;
/** Scaling factor for text. */
final float TEXT_SCALING_FACTOR = 1.75f;
/** Scaling factor for a sphere {@link GraphPoint3D} */
float SCALING_FACTOR_POINT = 1.5f;
/** Constructor. */ /** Constructor. */
public Graph3DViewObject(Graph3D graph) { public Graph3DViewObject(Graph3D graph) {
...@@ -185,8 +189,7 @@ public class Graph3DViewObject extends ViewObjectBase { ...@@ -185,8 +189,7 @@ public class Graph3DViewObject extends ViewObjectBase {
// rotate text so it is readable from left to right // rotate text so it is readable from left to right
rotate(new Vector4f(0, 0, 1, -90)); rotate(new Vector4f(0, 0, 1, -90));
// TODO (SB, 14) scale(TEXT_SCALING_FACTOR, TEXT_SCALING_FACTOR, TEXT_SCALING_FACTOR);
scale(1.75f, 1.75f, 1.75f);
// draw the Text // draw the Text
for(Object3D o : objects) { for(Object3D o : objects) {
...@@ -221,10 +224,11 @@ public class Graph3DViewObject extends ViewObjectBase { ...@@ -221,10 +224,11 @@ public class Graph3DViewObject extends ViewObjectBase {
private void renderPoint(GraphPoint3D p) { private void renderPoint(GraphPoint3D p) {
saveMatrix(); saveMatrix();
moveTo(p.getPosition()); moveTo(p.getPosition());
// TODO (SB, 14) scale(SCALING_FACTOR_POINT, SCALING_FACTOR_POINT, SCALING_FACTOR_POINT);
scale(1.5f, 1.5f, 1.5f); float radius = 0.2f;
// TODO (SB, 14) int nrOfSlices = 9;
SPHERE.draw(0.2f, 9, 4); int nrOfStacks = 4;
SPHERE.draw(radius, nrOfSlices, nrOfStacks);
restoreMatrix(); restoreMatrix();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment