Class NearClip


  • public class NearClip
    extends Object
    Clip in camera space any Primitive that crosses the camera's near clipping plane z = -near.
    • Method Detail

      • clip

        public static Model clip​(Model model,
                                 Camera camera)
        Start with a Model that contains Primitives that have been transformed into camera space.

        If a transformed Primitive crosses the camera's near plane, then replace that Primitive, in the Model's list of primitives, with one that has been clipped so that it lies completely in the far side of the camera's near plane (the side of the near plane away from the camera).

        If a transformed Primitive is completely in the camera side of the near plane, then drop that Primitive from the Model's list of primitives.

        Return a Model for which every Primitive is completely on the far side of the camera's near plane.

        Parameters:
        model - Model containing Primitives transformed into camera space
        camera - Camera that determines the near clipping plane
        Returns:
        a Model containing Primitives clipped to the camera's near plane