Skip to content
Snippets Groups Projects
Commit f8a7361f authored by Simon Barner's avatar Simon Barner
Browse files

RED

refs 3373
parent 69827f72
No related branches found
No related tags found
No related merge requests found
Graph3DViewObject.java c427f056f46f71175b180d490cd7f7d299156db2 YELLOW
Graph3DViewObject.java 3712170073c3e835663a1f06bfc5bad2c5dad920 RED
ViewObjectBase.java 2fbcf09f17655c06abffaeb00dbc558e711404eb GREEN
......@@ -28,6 +28,7 @@ import static org.fortiss.tooling.graphicsGL.ui.util.GLPrimitives.rotate;
import static org.fortiss.tooling.graphicsGL.ui.util.GLPrimitives.saveMatrix;
import static org.fortiss.tooling.graphicsGL.ui.util.GLPrimitives.scale;
import static org.fortiss.tooling.graphicsGL.ui.util.GLPrimitives.setColor;
import static org.fortiss.tooling.graphicsGL.ui.util.GLPrimitives.translate;
import static org.fortiss.tooling.graphicsGL.ui.util.Graph3DUtil.convert;
import static org.fortiss.tooling.graphicsGL.ui.util.Graph3DUtil.importCharacters;
import static org.fortiss.tooling.graphicsGL.ui.util.Graph3DUtil.importLetters;
......@@ -50,7 +51,6 @@ import org.fortiss.tooling.graphicsGL.model.graph.GraphText3D;
import org.fortiss.tooling.graphicsGL.model.scene.Object3D;
import org.fortiss.tooling.graphicsGL.ui.camera.Camera;
import org.fortiss.tooling.graphicsGL.ui.picker.ModelObjectPicker;
import org.fortiss.tooling.graphicsGL.ui.util.GLPrimitives;
import org.lwjglx.util.glu.GLU;
import org.lwjglx.util.glu.Sphere;
import org.lwjglx.util.vector.Vector3f;
......@@ -146,8 +146,9 @@ public class Graph3DViewObject extends ViewObjectBase {
}
// if it is neither a letter, number, white space or "_" print a "?"
if(renderObject == null) {
if(!st.equals(" ") && !st.equals("_"))
if(!st.equals(" ") && !st.equals("_")) {
renderObject = this.characters.get("?");
}
}
toRender.add(renderObject);
}
......@@ -184,13 +185,15 @@ public class Graph3DViewObject extends ViewObjectBase {
// rotate text so it is readable from left to right
rotate(new Vector4f(0, 0, 1, -90));
// TODO (SB, 14)
scale(1.75f, 1.75f, 1.75f);
// draw the Text
for(Object3D o : objects) {
if(o != null)
if(o != null) {
drawMaterialGroups(o.getMesh().getMaterialGroups());
GLPrimitives.translate(0, DISTANCE_BEWTWEEN_LETTERS, 0);
}
translate(0, DISTANCE_BEWTWEEN_LETTERS, 0);
}
restoreMatrix();
......@@ -218,7 +221,9 @@ public class Graph3DViewObject extends ViewObjectBase {
private void renderPoint(GraphPoint3D p) {
saveMatrix();
moveTo(p.getPosition());
// TODO (SB, 14)
scale(1.5f, 1.5f, 1.5f);
// TODO (SB, 14)
SPHERE.draw(0.2f, 9, 4);
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