package org.helioviewer.gl3d.scenegraph.visuals;

import org.helioviewer.gl3d.scenegraph.GL3DGroup;
import org.helioviewer.gl3d.scenegraph.GL3DShape;
import org.helioviewer.gl3d.scenegraph.math.GL3DVec4f;

public class GL3DArrow extends GL3DGroup {

    public GL3DArrow(double radius, double offset, double length, int detail, GL3DVec4f color) {
        this("Arrow", radius, offset, length, detail, color);
    }

    public GL3DArrow(String name, double radius, double offset, double length, int detail, GL3DVec4f color) {
        super(name);
        GL3DShape cylinder = new GL3DCylinder(radius / 2, length / 2, detail, color);
        cylinder.modelView().setTranslation(0.0, 0, offset + length / 4);
        addNode(cylinder);

        GL3DShape cone = new GL3DCone(radius, length / 2, detail, color);
        cone.modelView().setTranslation(0, 0, offset + length / 2);
        addNode(cone);
    }
}

@@ -43,16 +43,48 @@
 suals;%0A%0A
+import javax.media.opengl.GL2;%0A%0A
 import o
@@ -175,16 +175,66 @@
 DShape;%0A
+import org.helioviewer.gl3d.scenegraph.GL3DState;%0A
 import o
@@ -980,11 +980,219 @@
 );%0A    %7D
+%0A%0A    @Override%0A    public void shapeDraw(GL3DState state) %7B%0A        GL2 gl = state.get().gl;%0A        gl.glDisable(GL2.GL_LIGHTING);%0A        super.shapeDraw(state);%0A        gl.glEnable(GL2.GL_LIGHTING);%0A    %7D
 %0A%7D%0A

update arrow color