public WireBox(float xExt, float yExt, float zExt){ updatePositions(xExt,yExt,zExt); setBuffer(Type.Index, 2, new short[]{ 0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7, } ); setMode(Mode.Lines); updateCounts(); }
public void fromBoundingBox(BoundingBox bbox){ updatePositions(bbox.getXExtent(), bbox.getYExtent(), bbox.getZExtent()); }
public WireBox(float xExt, float yExt, float zExt){ updatePositions(xExt,yExt,zExt); setBuffer(Type.Index, 2, new short[]{ 0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7, } ); setMode(Mode.Lines); updateCounts(); }
public WireBox(float xExt, float yExt, float zExt){ updatePositions(xExt,yExt,zExt); setBuffer(Type.Index, 2, new short[]{ 0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7, } ); setMode(Mode.Lines); updateCounts(); }
public void updateSelectionBox() { if (isVisible()) { float dx = selectionArea.getDeltaX(); float dy = selectionArea.getDeltaY(); float delta = 0.01f; Vector2f position = selectionArea.getCenter(); wireBoxGeo.setLocalTranslation(position.x, MapLoader.FLOOR_HEIGHT, position.y); wireBox.updatePositions(MapLoader.TILE_WIDTH / 2 * dx + delta, MapLoader.FLOOR_HEIGHT + delta, MapLoader.TILE_WIDTH / 2 * dy + delta); // Selection color indicator ColorIndicator newSelectionColor = getColorIndicator(); if (!newSelectionColor.equals(selectionColor)) { selectionColor = newSelectionColor; matWireBox.setColor("Color", selectionColor.getColor()); } this.wireBoxGeo.setCullHint(CullHint.Never); } else { this.wireBoxGeo.setCullHint(CullHint.Always); } }