// 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); }
public Plane(Vector3 planeNormal, Vector3 pointOnPlane) { this.Normal = planeNormal.GetNormal(); this.DistanceFromOrigin = Vector3Ex.Dot(planeNormal, pointOnPlane); }
public Plane(Vector3 planeNormal, double distanceFromOrigin) { this.Normal = planeNormal.GetNormal(); this.DistanceFromOrigin = distanceFromOrigin; }
public Plane(Vector3 planeNormal, Vector3 pointOnPlane) { this.planeNormal = planeNormal.GetNormal(); this.distanceToPlaneFromOrigin = Vector3.Dot(planeNormal, pointOnPlane); }