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

changed plane visualization, added Color3D to GraphLine3D

refs 1293
parent e1a33dc4
No related branches found
No related tags found
No related merge requests found
......@@ -34,7 +34,6 @@ import static org.fortiss.tooling.graphicsGL.ui.util.Graph3DUtil.importCharacter
import static org.fortiss.tooling.graphicsGL.ui.util.Graph3DUtil.importLetters;
import static org.fortiss.tooling.graphicsGL.ui.util.Graph3DUtil.importNumbers;
import static org.fortiss.tooling.graphicsGL.util.Graphics3DModelElementFactory.BLACK;
import static org.fortiss.tooling.graphicsGL.util.Graphics3DModelElementFactory.BLUE;
import static org.fortiss.tooling.graphicsGL.util.Graphics3DModelElementFactory.WHITE;
import static org.lwjgl.util.glu.GLU.GLU_FILL;
......@@ -98,13 +97,18 @@ public class Graph3DViewObject extends ViewObjectBase {
/** {@inheritDoc} */
@Override
public void renderObject(Camera c) {
// GLPrimitives.scale(1.5f, 1.5f, 1.5f);
renderCoordSys(graph.getCoordinateSystem());
setColor(WHITE);
for(GraphPoint3D p : graph.getPointsList()) {
if(p == highlighted) {
setColor(BLUE);
renderPoint(p);
// setColor(BLUE);
setColor(WHITE);
// GraphPoint3D p2 = EcoreUtil.copy(p);
// p2.getColor().setBlue(p2.getColor().getBlue() * 1.1f);
// p2.getColor().setRed(p2.getColor().getRed() * 1.1f);
// p2.getColor().setGreen(p2.getColor().getGreen() * 1.1f);
renderPoint(p);
} else {
setColor(WHITE);
Color3D color = p.getColor();
......@@ -118,7 +122,11 @@ public class Graph3DViewObject extends ViewObjectBase {
setColor(BLACK);
for(GraphLine3D l : graph.getLinesList()) {
Color3D co = l.getColor();
if(co != null)
setColor(co);
drawLine(l.getStart().getPosition(), l.getEnd().getPosition());
setColor(BLACK);
}
setColor(BLACK);
......
......@@ -46,6 +46,7 @@
<eClassifiers xsi:type="ecore:EClass" name="GraphLine3D">
<eStructuralFeatures xsi:type="ecore:EReference" name="start" eType="#//graph/GraphPoint3D"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="end" eType="#//graph/GraphPoint3D"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="color" eType="#//Color3D"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Graph3D">
<eStructuralFeatures xsi:type="ecore:EReference" name="coordinateSystem" eType="#//graph/CoordinateSystem3D"
......
......@@ -48,6 +48,8 @@
ecoreFeature="ecore:EReference graphics3D.ecore#//graph/GraphLine3D/start"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true"
ecoreFeature="ecore:EReference graphics3D.ecore#//graph/GraphLine3D/end"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true"
ecoreFeature="ecore:EReference graphics3D.ecore#//graph/GraphLine3D/color"/>
</genClasses>
<genClasses ecoreClass="graphics3D.ecore#//graph/Graph3D">
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference graphics3D.ecore#//graph/Graph3D/coordinateSystem"/>
......
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