Esempio n. 1
0
 // The front plan is at 0 (the intersection of the 4 side planes). Plane normals should point out.
 public Frustum(Vector3 leftNormal, Vector3 rightNormal,
                Vector3 bottomNormal, Vector3 topNormal,
                Vector3 backNormal, double distanceToBack)
 {
     Planes    = new Plane[5];
     Planes[0] = new Plane(leftNormal.GetNormal(), 0);
     Planes[1] = new Plane(rightNormal.GetNormal(), 0);
     Planes[2] = new Plane(bottomNormal.GetNormal(), 0);
     Planes[3] = new Plane(topNormal.GetNormal(), 0);
     Planes[4] = new Plane(backNormal.GetNormal(), distanceToBack);
 }
Esempio n. 2
0
 public Plane(Vector3 planeNormal, Vector3 pointOnPlane)
 {
     this.Normal             = planeNormal.GetNormal();
     this.DistanceFromOrigin = Vector3Ex.Dot(planeNormal, pointOnPlane);
 }
Esempio n. 3
0
 public Plane(Vector3 planeNormal, double distanceFromOrigin)
 {
     this.Normal             = planeNormal.GetNormal();
     this.DistanceFromOrigin = distanceFromOrigin;
 }
Esempio n. 4
0
 public Plane(Vector3 planeNormal, Vector3 pointOnPlane)
 {
     this.planeNormal = planeNormal.GetNormal();
     this.distanceToPlaneFromOrigin = Vector3.Dot(planeNormal, pointOnPlane);
 }