/** * @param plane * The imaginary floor plane * @param bounciness * Bounciness is the factor of multiplication when bouncing off the floor. A bounciness factor of 1 means * the ball leaves the floor with the same velocity as it hit the floor, much like a rubber ball. */ public FloorInfluence(final ReadOnlyPlane plane, final double bounciness) { _bounciness = bounciness; _floor.set(plane); }
/** * @param plane * The imaginary floor plane * @param bounciness * Bounciness is the factor of multiplication when bouncing off the floor. A bounciness factor of 1 means * the ball leaves the floor with the same velocity as it hit the floor, much like a rubber ball. */ public FloorInfluence(final ReadOnlyPlane plane, final double bounciness) { _bounciness = bounciness; _floor.set(plane); }
public void setFloor(final ReadOnlyPlane floor) { _floor.set(floor); }
public void setFloor(final ReadOnlyPlane floor) { _floor.set(floor); }
@Override public void read(final InputCapsule capsule) throws IOException { super.read(capsule); _bounciness = capsule.readDouble("bounciness", 1.0); _floor.set((Plane) capsule.readSavable("floor", new Plane())); }
@Override public void read(final InputCapsule capsule) throws IOException { super.read(capsule); _bounciness = capsule.readDouble("bounciness", 1.0); _floor.set((Plane) capsule.readSavable("floor", new Plane())); }
@Test public void testEquals() { // couple of equals validity tests final Plane plane1 = new Plane(); assertEquals(plane1, plane1); assertFalse(plane1.equals(null)); assertFalse(plane1.equals(new Vector2())); // throw in a couple pool accesses for coverage final Plane plane2 = Plane.fetchTempInstance(); plane2.set(plane1); assertEquals(plane1, plane2); assertNotSame(plane1, plane2); Plane.releaseTempInstance(plane2); // cover more of equals assertFalse(plane1.equals(new Plane(Vector3.UNIT_X, 0))); }