コード例 #1
0
        public void SetToUnitFrustum(bool withNear = true, bool withFar = true)
        {
            _planeList.Clear();
            _planeList.Add(Plane.Create(1.0f, 0.0f, 0.0f, 1.0f));  // left plane.
            _planeList.Add(Plane.Create(-1.0f, 0.0f, 0.0f, 1.0f)); // right plane.
            _planeList.Add(Plane.Create(0.0f, 1.0f, 0.0f, 1.0f));  // bottom plane.
            _planeList.Add(Plane.Create(0.0f, -1.0f, 0.0f, 1.0f)); // top plane.
            if (withNear)
            {
                _planeList.Add(Plane.Create(0.0f, 0.0f, 1.0f, 1.0f)); // near plane
            }

            if (withFar)
            {
                _planeList.Add(Plane.Create(0.0f, 0.0f, -1.0f, 1.0f)); // far plane
            }
        }
コード例 #2
0
 public static void Clear()
 {
     PlaneList.Clear();
     BoxList.Clear();
 }