/** * Construct a new set of view rays. * * @param c Preallocated storage for matrix operations * @return A new set of view rays */ public static R2ViewRaysType newViewRays(final PMatrixM4x4F.ContextPM4F c) { final R2ViewRays vr = new R2ViewRays( new VectorM4F(), new VectorM4F(), new VectorM4F(), new VectorM4F(), new VectorM4F(), new VectorM4F(), new VectorM4F(), new VectorM4F()); vr.recalculate(c, PMatrixI4x4F.identity()); return vr; }
@Override public void recalculate( final PMatrixM4x4F.ContextPM4F c, final PMatrixReadable4x4FType<R2SpaceClipType, R2SpaceEyeType> m) { NullCheck.notNull(c); NullCheck.notNull(m); R2ViewRays.calculateRayAndOrigin( c, m, R2ViewRays.NEAR_X0Y0, R2ViewRays.FAR_X0Y0, this.temp_near, this.temp_far, this.ray_x0y0, this.origin_x0y0); R2ViewRays.calculateRayAndOrigin( c, m, R2ViewRays.NEAR_X1Y0, R2ViewRays.FAR_X1Y0, this.temp_near, this.temp_far, this.ray_x1y0, this.origin_x1y0); R2ViewRays.calculateRayAndOrigin( c, m, R2ViewRays.NEAR_X0Y1, R2ViewRays.FAR_X0Y1, this.temp_near, this.temp_far, this.ray_x0y1, this.origin_x0y1); R2ViewRays.calculateRayAndOrigin( c, m, R2ViewRays.NEAR_X1Y1, R2ViewRays.FAR_X1Y1, this.temp_near, this.temp_far, this.ray_x1y1, this.origin_x1y1); }