public void putArrow(Vector3f pos, Vector3f dir, ColorRGBA color){ Arrow arrow = new Arrow(dir); putShape(arrow, color, 4).setLocalTranslation(pos); }
/** * Alter the location and extent of the red arrow. * * @param location the coordinates of the tail (not null, unaffected) * @param extent the offset of the tip from the tail (not null, unaffected) */ public void setRedArrow(Vector3f location, Vector3f extent) { arrowRedGeom.setLocalTranslation(location); arrowRed.setArrowExtent(extent); }
tempQuat.normalizeLocal(); VertexBuffer pvb = getBuffer(Type.Position); FloatBuffer buffer = (FloatBuffer)pvb.getData(); buffer.rewind(); updateBound(); updateCounts();
setBuffer(Type.Position, 3, newPositions); setBuffer(Type.Index, 2, new short[]{ 0, 1, 1, 4, 1, 5,}); setMode(Mode.Lines); updateBound(); updateCounts();
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 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 createArrow(Vector3f dir, float lineWidth, ColorRGBA color) { Arrow arrow = new Arrow(dir); arrow.setLineWidth(lineWidth); // make arrow thicker return createShape("Arrow", arrow, color); } /**
setBuffer(Type.Position, 3, newPositions); setBuffer(Type.Index, 2, new short[]{ 0, 1, 1, 4, 1, 5,}); setMode(Mode.Lines); updateBound(); updateCounts();
/** * Instantiate an enabled control to visualize the specified joint. * * @param debugAppState which app state (not null, alias created) * @param body the joint to visualize (not null, alias created) */ public BulletJointDebugControl(BulletDebugAppState debugAppState, PhysicsJoint body) { super(debugAppState); this.body = body; this.geomA = new Geometry(body.toString()); arrowA = new Arrow(Vector3f.ZERO); geomA.setMesh(arrowA); geomA.setMaterial(debugAppState.DEBUG_GREEN); this.geomB = new Geometry(body.toString()); arrowB = new Arrow(Vector3f.ZERO); geomB.setMesh(arrowB); geomB.setMaterial(debugAppState.DEBUG_GREEN); }
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); }
/** * Alter the location and extent of the red arrow. * * @param location the coordinates of the tail (not null, unaffected) * @param extent the offset of the tip from the tail (not null, unaffected) */ public void setRedArrow(Vector3f location, Vector3f extent) { arrowRedGeom.setLocalTranslation(location); arrowRed.setArrowExtent(extent); }
setBuffer(Type.Position, 3, newPositions); setBuffer(Type.Index, 2, new short[]{ 0, 1, 1, 4, 1, 5,}); setMode(Mode.Lines); updateBound(); updateCounts();
tempQuat.normalizeLocal(); VertexBuffer pvb = getBuffer(Type.Position); FloatBuffer buffer = (FloatBuffer)pvb.getData(); buffer.rewind(); updateBound(); updateCounts();
/** * Instantiate an enabled control to visualize the specified joint. * * @param debugAppState which app state (not null, alias created) * @param body the joint to visualize (not null, alias created) */ public BulletJointDebugControl(BulletDebugAppState debugAppState, PhysicsJoint body) { super(debugAppState); this.body = body; this.geomA = new Geometry(body.toString()); arrowA = new Arrow(Vector3f.ZERO); geomA.setMesh(arrowA); geomA.setMaterial(debugAppState.DEBUG_GREEN); this.geomB = new Geometry(body.toString()); arrowB = new Arrow(Vector3f.ZERO); geomB.setMesh(arrowB); geomB.setMaterial(debugAppState.DEBUG_GREEN); }
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); }
/** * Alter the location and extent of the magenta arrow. * * @param location the coordinates of the tail (not null, unaffected) * @param extent the offset of the tip from the tail (not null, unaffected) */ public void setMagentaArrow(Vector3f location, Vector3f extent) { arrowMagentaGeom.setLocalTranslation(location); arrowMagenta.setArrowExtent(extent); }
tempQuat.normalizeLocal(); VertexBuffer pvb = getBuffer(Type.Position); FloatBuffer buffer = (FloatBuffer)pvb.getData(); buffer.rewind(); updateBound(); updateCounts();
/** A red ball that marks the last spot that was "hit" by the "shot". */ protected void initMark() { Arrow arrow = new Arrow(Vector3f.UNIT_Z.mult(2f)); //Sphere sphere = new Sphere(30, 30, 0.2f); mark = new Geometry("BOOM!", arrow); //mark = new Geometry("BOOM!", sphere); Material mark_mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md"); mark_mat.getAdditionalRenderState().setLineWidth(3); mark_mat.setColor("Color", ColorRGBA.Red); mark.setMaterial(mark_mat); }
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); }
/** * Alter the location and extent of the pink arrow. * * @param location the coordinates of the tail (not null, unaffected) * @param extent the offset of the tip from the tail (not null, unaffected) */ public void setPinkArrow(Vector3f location, Vector3f extent) { arrowPinkGeom.setLocalTranslation(location); arrowPink.setArrowExtent(extent); }