Ray3 extends Line3Base implements ReadOnlyRay3, Poolable { public Ray3 set(final ReadOnlyRay3 source) { _origin.set(source.getOrigin()); _direction.set(source.getDirection()); return this; } Ray3();  Ray3(final ReadOnlyRay3 source);  Ray3(final ReadOnlyVector3 origin, final ReadOnlyVector3 direction); Ray3 set(final ReadOnlyRay3 source); @Override double getDistanceToPrimitive(final Vector3[] worldVertices); @Override boolean intersects(final Vector3[] polygonVertices, final Vector3 locationStore); @Override boolean intersectsTriangle(final ReadOnlyVector3 pointA, final ReadOnlyVector3 pointB,
      final ReadOnlyVector3 pointC, final Vector3 locationStore); @Override boolean intersectsTrianglePlanar(final ReadOnlyVector3 pointA, final ReadOnlyVector3 pointB,
      final ReadOnlyVector3 pointC, final Vector3 locationStore); @Override boolean intersectsQuad(final ReadOnlyVector3 pointA, final ReadOnlyVector3 pointB,
      final ReadOnlyVector3 pointC, final ReadOnlyVector3 pointD, final Vector3 locationStore); @Override boolean intersectsQuadPlanar(final ReadOnlyVector3 pointA, final ReadOnlyVector3 pointB,
      final ReadOnlyVector3 pointC, final ReadOnlyVector3 pointD, final Vector3 locationStore); @Override boolean intersectsPlane(final ReadOnlyPlane plane, final Vector3 locationStore); @Override double distanceSquared(final ReadOnlyVector3 point, final Vector3 store); static boolean isValid(final ReadOnlyRay3 ray); @Override String toString(); @Override boolean equals(final Object o); @Override Ray3 clone(); final static Ray3 fetchTempInstance(); final static void releaseTempInstance(final Ray3 ray);  }
@Test public void testData() { final Ray3 ray = new Ray3(); assertEquals(Vector3.UNIT_Z, ray.getDirection()); assertEquals(Vector3.ZERO, ray.getOrigin()); ray.setDirection(Vector3.NEG_UNIT_X); assertEquals(Vector3.NEG_UNIT_X, ray.getDirection()); ray.setOrigin(Vector3.ONE); assertEquals(Vector3.ONE, ray.getOrigin()); final Ray3 ray2 = new Ray3(ray); assertEquals(Vector3.NEG_UNIT_X, ray2.getDirection()); assertEquals(Vector3.ONE, ray2.getOrigin()); ray.set(new Ray3()); assertEquals(Vector3.UNIT_Z, ray.getDirection()); assertEquals(Vector3.ZERO, ray.getOrigin()); }