PlaneParallelLineGenerator implements ParallelLineGenerator { @Override public Vector3dc getDirection() { return direction; } <I extends Interval> PlaneParallelLineGenerator(final I interval, final Quaterniondc direction,
														   final BinaryHybridCFI1<Vector3d, Quaterniondc, Vector3d> rotateOp,
														   final long sections); @Override Line nextLine(); @Override Vector3dc getDirection(); void setSeed(final long seed); void reset();  }
@Test public void testGetDirection() { final Vector3d expectedDirection = new Vector3d(0, 0, 1); final PlaneParallelLineGenerator plane = new PlaneParallelLineGenerator(IMG, IDENTITY, rotateOp, 1); final Vector3dc direction = plane.getDirection(); assertEquals("Incorrect direction", expectedDirection, direction); }
@Test public void testGetDirectionRotation() { final Quaterniondc rotation = new Quaterniond(new AxisAngle4d(Math.PI / 2.0, 0, 1, 0)); final Vector3d expectedDirection = IMAGE_J.op().linalg().rotate( new Vector3d(0, 0, 1), rotation); final PlaneParallelLineGenerator plane = new PlaneParallelLineGenerator(IMG, rotation, rotateOp, 1); final Vector3dc direction = plane.getDirection(); assertEquals("Direction rotated incorrectly", expectedDirection, direction); }