Skip to content

Commit

Permalink
WIP #12: rename InternalHallway to InternalConnection (non-pickable)
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
jacobmaxfrank committed Jan 18, 2016
1 parent 358b7c8 commit 5bf7764
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
7 changes: 3 additions & 4 deletions src/com/brindyblitz/artemis/engconsole/ui/damcon/Damcon.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -70,7 +69,7 @@ public class Damcon implements MouseListener, MouseMotionListener, MouseWheelLis
private static final Random random = new Random();

private Map<GridCoord, InternalNode> internalNodes = new HashMap<>();
private Set<InternalHallway> internalHallways = new HashSet<>();
private Set<InternalConnection> internalConnections = new HashSet<>();
private Map<Integer, InternalTeam> internalTeams = new HashMap<>();
private Map<Node, Internal> nodesToInternals = new HashMap<>();
private static final float PICK_TOLERANCE = 0.1f;
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down

0 comments on commit 5bf7764

Please sign in to comment.