public static Geometry createArrow(Vector3f dir, float lineWidth, ColorRGBA color) { Arrow arrow = new Arrow(dir); arrow.setLineWidth(lineWidth); // make arrow thicker return createShape("Arrow", arrow, color); } /**
public Spatial draw(DrawableCombiner3d dc, Primitive3d primitive, SpaceObject sobj, ViewportJMonkey vp) { arrow = new Arrow(sizelocal); arrow.setLineWidth(2); geo = new Geometry(identifier, arrow); return geo; }
private void attachCoordinateAxes(Node node, Vector3f pos){ Arrow arrow = new Arrow(Vector3f.UNIT_X); arrow.setLineWidth(4); // make arrow thicker putShape(node, arrow, ColorRGBA.Red).setLocalTranslation(pos); arrow = new Arrow(Vector3f.UNIT_Y); arrow.setLineWidth(4); // make arrow thicker putShape(node, arrow, ColorRGBA.Green).setLocalTranslation(pos); arrow = new Arrow(Vector3f.UNIT_Z); arrow.setLineWidth(4); // make arrow thicker putShape(node, arrow, ColorRGBA.Blue).setLocalTranslation(pos); }
private void attachCoordinateAxes(Node node, Vector3f pos){ Arrow arrow = new Arrow(Vector3f.UNIT_X); arrow.setLineWidth(4); // make arrow thicker putShape(node, arrow, ColorRGBA.Red).setLocalTranslation(pos); arrow = new Arrow(Vector3f.UNIT_Y); arrow.setLineWidth(4); // make arrow thicker putShape(node, arrow, ColorRGBA.Green).setLocalTranslation(pos); arrow = new Arrow(Vector3f.UNIT_Z); arrow.setLineWidth(4); // make arrow thicker putShape(node, arrow, ColorRGBA.Blue).setLocalTranslation(pos); }
public static void attachCoordinateAxes(Vector3f pos, float size, AssetManager assetManager, Node rootNode) { Arrow arrow = new Arrow(Vector3f.UNIT_X.mult(size)); arrow.setLineWidth(4); // make arrow thicker putShape(arrow, ColorRGBA.Green, assetManager, rootNode).setLocalTranslation(pos); arrow = new Arrow(Vector3f.UNIT_Y.mult(size)); arrow.setLineWidth(4); // make arrow thicker putShape(arrow, ColorRGBA.Blue, assetManager, rootNode).setLocalTranslation(pos); arrow = new Arrow(Vector3f.UNIT_Z.mult(size)); arrow.setLineWidth(4); // make arrow thicker putShape(arrow, ColorRGBA.Red, assetManager, rootNode).setLocalTranslation(pos); }
public static Geometry createArrow(Material mat, Vector3f pos, Vector3f dir) { Arrow arrow = new Arrow(dir.subtract(pos)); arrow.setLineWidth(4); // make arrow thicker Geometry arrowGeom = new Geometry("Arrow", arrow); arrowGeom.setMaterial(mat); arrowGeom.setLocalTranslation(pos); return arrowGeom; }
public static Geometry createArrow(Material mat, Vector3f pos, Vector3f dir) { Arrow arrow = new Arrow(dir.subtract(pos)); arrow.setLineWidth(4); // make arrow thicker Geometry arrowGeom = new Geometry("Arrow", arrow); arrowGeom.setMaterial(mat); arrowGeom.setLocalTranslation(pos); return arrowGeom; }
private void putArrow(Vector3f pos, Vector3f dir, ColorRGBA color) { Arrow arrow = new Arrow(dir); arrow.setArrowExtent(dir); arrow.setPointSize(0.2f); arrow.setLineWidth(5); // make arrow thicker putShape(arrow, color).setLocalTranslation(pos); }
public static Geometry giveArrow (ColorRGBA color, float thickness, Vector3f direction, AssetManager assetManager) { Arrow a = new Arrow(direction); a.setLineWidth(thickness); Geometry ret = new Geometry("arrrow " + direction.toString(), a); Material m = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md"); m.setColor("Color", color); ret.setMaterial(m); return ret; } }
public static void attachLocalCoordinateAxes(Node node, float size, AssetManager assetManager, Node rootNode) { Node n = new Node(); n.setLocalTranslation(node.getWorldTranslation()); rootNode.attachChild(n); Arrow arrow = new Arrow(node.getWorldRotation().mult(Vector3f.UNIT_X).normalize().mult(size)); arrow.setLineWidth(4); // make arrow thicker putShape(arrow, ColorRGBA.Red, assetManager, n); arrow = new Arrow(node.getWorldRotation().mult(Vector3f.UNIT_Y).normalize().mult(size)); arrow.setLineWidth(4); // make arrow thicker putShape(arrow, ColorRGBA.Green, assetManager, n); arrow = new Arrow(node.getWorldRotation().mult(Vector3f.UNIT_Z).normalize().mult(size)); arrow.setLineWidth(4); // make arrow thicker putShape(arrow, ColorRGBA.Blue, assetManager, n); }