public WireFrustum(Vector3f[] points){ initGeom(this, points); }
@Override public void updateLogicalState(float tpf) { super.updateLogicalState(tpf); wires.updateGeometry(); points.updateGeometry(); if(interBoneWires != null) { interBoneWires.updateGeometry(); } }
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(); }
/** * 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); }
/** * Creates a debugger with bone lengths data. If the data is supplied then the wires will show each full bone (from head to tail), * the points will display both heads and tails of the bones and dotted lines between bones will be seen. * @param name * the name of the debugger's node * @param skeleton * the skeleton that will be shown * @param boneLengths * a map between the bone's index and the bone's length */ public SkeletonDebugger(String name, Skeleton skeleton, Map<Integer, Float> boneLengths) { super(name); wires = new SkeletonWire(skeleton, boneLengths); points = new SkeletonPoints(skeleton, boneLengths); this.attachChild(new Geometry(name + "_wires", wires)); this.attachChild(new Geometry(name + "_points", points)); if (boneLengths != null) { interBoneWires = new SkeletonInterBoneWire(skeleton, boneLengths); this.attachChild(new Geometry(name + "_interwires", interBoneWires)); } this.setQueueBucket(Bucket.Transparent); }
/** * Th method couns the connections between bones. * @param bone * the bone where counting starts */ private void countConnections(Bone bone) { for (Bone child : bone.getChildren()) { numConnections++; this.countConnections(child); } }
/** * Create a WireSphere from a BoundingSphere * * @param bsph * BoundingSphere used to create the WireSphere * */ public void fromBoundingSphere(BoundingSphere bsph) { updatePositions(bsph.getRadius()); } }
/** * Th method couns the connections between bones. * @param bone * the bone where counting starts */ private void countConnections(Bone bone) { for (Bone child : bone.getChildren()) { ++connectionsAmount; this.countConnections(child); } } }
/** * 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); }
public static Mesh makeFrustum(Vector3f[] points){ Mesh m = new Mesh(); initGeom(m, points); return m; }
/** * 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); }
/** * 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); }
/** * Alter the location and extent of the blue 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 setBlueArrow(Vector3f location, Vector3f extent) { arrowBlueGeom.setLocalTranslation(location); arrowBlue.setArrowExtent(extent); }
/** * Alter the location and extent of the green 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 setGreenArrow(Vector3f location, Vector3f extent) { arrowGreenGeom.setLocalTranslation(location); arrowGreen.setArrowExtent(extent); }
/** * 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); }
/** * Alter the location and extent of the yellow 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 setYellowArrow(Vector3f location, Vector3f extent) { arrowYellowGeom.setLocalTranslation(location); arrowYellow.setArrowExtent(extent); }
/** * Alter the location and extent of the green 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 setGreenArrow(Vector3f location, Vector3f extent) { arrowGreenGeom.setLocalTranslation(location); arrowGreen.setArrowExtent(extent); }
/** * 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); }
/** * Alter the location and extent of the yellow 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 setYellowArrow(Vector3f location, Vector3f extent) { arrowYellowGeom.setLocalTranslation(location); arrowYellow.setArrowExtent(extent); }
/** * Alter the location and extent of the blue 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 setBlueArrow(Vector3f location, Vector3f extent) { arrowBlueGeom.setLocalTranslation(location); arrowBlue.setArrowExtent(extent); }