CCRay3 extends CCLine3Base { public boolean intersectsQuad( final CCVector3 theA, final CCVector3 theB, final CCVector3 theC, final CCVector3 theD, final CCVector3 theLocationStore ) { return intersects(theA, theB, theC, theLocationStore, false) || intersects(theA, theC, theD, theLocationStore, false); } CCRay3();  CCRay3(final CCRay3 theSource);  CCRay3(final CCVector3 theOrigin, final CCVector3 theDirection); static CCRay3 createFromLine(CCVector3 theStart, CCVector3 theEnd); CCRay3 set(final CCRay3 theSource); double getDistanceToPrimitive(final CCVector3[] theWorldVertices); boolean intersects(final CCVector3[] thePolygonVertices, final CCVector3 theLocationStore); boolean intersectsTriangle(
		final CCVector3 theA, 
		final CCVector3 theB, 
		final CCVector3 theC, 
		final CCVector3 theLocationStore
	); boolean intersectsTrianglePlanar(
		final CCVector3 pointA, 
		final CCVector3 pointB, 
		final CCVector3 pointC,
		final CCVector3 locationStore
	); boolean intersectsQuad(
		final CCVector3 theA, 
		final CCVector3 theB, 
		final CCVector3 theC, 
		final CCVector3 theD,
		final CCVector3 theLocationStore
	); boolean intersectsQuadPlanar(
		final CCVector3 theA, 
		final CCVector3 theB, 
		final CCVector3 theC, 
		final CCVector3 theD,
		final CCVector3 theLocationStore
	); CCVector3 intersectsPlane(final CCPlane thePlane, CCVector3 theLocationStore); CCVector3 intersectsPlane(final CCPlane thePlane); double distanceSquared(final CCVector3 thePoint, final CCVector3 theStore); static boolean isValid(final CCRay3 theRay); @Override String toString(); @Override boolean equals(final Object theObject); @Override CCRay3 clone();  }
@Test public void testIntersectsQuad() { final CCVector3 v0 = new CCVector3(0, 0, 0); final CCVector3 v1 = new CCVector3(5, 0, 0); final CCVector3 v2 = new CCVector3(5, 5, 0); final CCVector3 v3 = new CCVector3(0, 5, 0); CCVector3 intersectionPoint = null; final CCRay3 pickRayA = new CCRay3(new CCVector3(2, 2, 10), new CCVector3(0, 0, -1)); final CCRay3 pickRayB = new CCRay3(new CCVector3(2, 4, 10), new CCVector3(0, 0, -1)); assertTrue(pickRayA.intersectsQuad(v0, v1, v2, v3, intersectionPoint)); assertTrue(pickRayB.intersectsQuad(v0, v1, v2, v3, intersectionPoint)); final CCRay3 pickRay2 = new CCRay3(new CCVector3(-1, 0, 10), new CCVector3(0, 0, -1)); assertFalse(pickRay2.intersectsQuad(v0, v1, v2, v3, intersectionPoint)); assertTrue(10.0 == pickRayA.getDistanceToPrimitive(new CCVector3[] { v0, v1, v2, v3 })); assertTrue(Float.POSITIVE_INFINITY == pickRay2.getDistanceToPrimitive(new CCVector3[] { v0, v1, v2, v3 })); assertFalse(pickRay2.intersects(new CCVector3[] { v0, v1 }, null)); assertFalse(new CCRay3(new CCVector3(0, 0, -1), CCVector3.UNIT_Y).intersectsQuadPlanar(v0, v1, v2, v3, intersectionPoint)); intersectionPoint = new CCVector3(); assertTrue(pickRayA.intersectsQuadPlanar(v0, v1, v2, v3, intersectionPoint)); assertTrue(pickRayB.intersectsQuadPlanar(v0, v1, v2, v3, intersectionPoint)); }