From 5bf776476fb4f73947c4b04f5473f97f11ddd765 Mon Sep 17 00:00:00 2001 From: Jacob Frank Date: Mon, 18 Jan 2016 12:48:29 -0800 Subject: [PATCH] WIP #12: rename InternalHallway to InternalConnection (non-pickable) - Hallway is actually the term for internal nodes without systems, hence the renaming - Turns out you can't pick the inter-node connections in the real client --- .../artemis/engconsole/ui/damcon/Damcon.java | 7 +++---- .../{InternalHallway.java => InternalConnection.java} | 10 ++-------- 2 files changed, 5 insertions(+), 12 deletions(-) rename src/com/brindyblitz/artemis/engconsole/ui/damcon/{InternalHallway.java => InternalConnection.java} (84%) diff --git a/src/com/brindyblitz/artemis/engconsole/ui/damcon/Damcon.java b/src/com/brindyblitz/artemis/engconsole/ui/damcon/Damcon.java index 36d938f..14422e7 100644 --- a/src/com/brindyblitz/artemis/engconsole/ui/damcon/Damcon.java +++ b/src/com/brindyblitz/artemis/engconsole/ui/damcon/Damcon.java @@ -26,7 +26,6 @@ import com.sun.j3d.loaders.Scene; import com.sun.j3d.loaders.objectfile.ObjectFile; import com.sun.j3d.utils.pickfast.PickCanvas; -import com.sun.j3d.utils.picking.PickTool; import com.sun.j3d.utils.universe.SimpleUniverse; import com.sun.j3d.utils.universe.Viewer; import com.sun.j3d.utils.universe.ViewingPlatform; @@ -70,7 +69,7 @@ public class Damcon implements MouseListener, MouseMotionListener, MouseWheelLis private static final Random random = new Random(); private Map internalNodes = new HashMap<>(); - private Set internalHallways = new HashSet<>(); + private Set internalConnections = new HashSet<>(); private Map internalTeams = new HashMap<>(); private Map nodesToInternals = new HashMap<>(); private static final float PICK_TOLERANCE = 0.1f; @@ -162,8 +161,8 @@ private void loadCorridors() { BranchGroup corridor_bg = new BranchGroup(); for (VesselNodeConnection vnc : this.engineeringConsoleManager.getGridConnections()) { - InternalHallway ih = new InternalHallway(vnc); - internalHallways.add(ih); + InternalConnection ih = new InternalConnection(vnc); + internalConnections.add(ih); Node node = ih.getShape(); nodesToInternals.put(node, ih); corridor_bg.addChild(node); diff --git a/src/com/brindyblitz/artemis/engconsole/ui/damcon/InternalHallway.java b/src/com/brindyblitz/artemis/engconsole/ui/damcon/InternalConnection.java similarity index 84% rename from src/com/brindyblitz/artemis/engconsole/ui/damcon/InternalHallway.java rename to src/com/brindyblitz/artemis/engconsole/ui/damcon/InternalConnection.java index 4aeeb50..377519e 100644 --- a/src/com/brindyblitz/artemis/engconsole/ui/damcon/InternalHallway.java +++ b/src/com/brindyblitz/artemis/engconsole/ui/damcon/InternalConnection.java @@ -8,12 +8,12 @@ import javax.vecmath.Point3f; import java.awt.*; -public class InternalHallway extends Internal { +public class InternalConnection extends Internal { private VesselNodeConnection vesselNodeConnection; private LineArray lineArray; private Shape3D shape; - public InternalHallway(VesselNodeConnection vessel_node_connection) { + public InternalConnection(VesselNodeConnection vessel_node_connection) { alpha = 0.1f; this.vesselNodeConnection = vessel_node_connection; @@ -25,12 +25,6 @@ public InternalHallway(VesselNodeConnection vessel_node_connection) { this.shape = new Shape3D(lineArray, appearanceFromHealthPercentage(1f)); this.shape.setCapability(Shape3D.ALLOW_APPEARANCE_WRITE); - - this.shape.setCapability(Shape3D.ENABLE_PICK_REPORTING); - this.shape.setPickable(true); - - // TODO: > make fully transparent sphere here for picking similar to picking from InternalNode? - // can you even pick a hallway in the real client? } @Override