public BoundingBox Union(BoundingBox box) { return new BoundingBox( new Float3(Math.Min(min.X, box.Min.X), Math.Min(min.Y, box.Min.Y), Math.Min(min.Z, box.Min.Z)), new Float3(Math.Max(max.X, box.Max.X), Math.Max(max.Y, box.Max.Y), Math.Max(max.Z, box.Max.Z)) ); }
public void Reset(BoundingBox box) { if (!box.IsEmpty) { var sceneSize = Math.Min(1024*1024,box.Size()); this.TargetDistance = sceneSize; this.Camera.LookAt(box.Max.ToVector() * 1.5f, box.Center.ToVector()); this.Camera.ZFar = sceneSize * 4f; this.Camera.ZNear = sceneSize * 0.001f; } }
public bool Equals(BoundingBox other) { return this.min.Equals(other.min) && this.max.Equals(other.max); }
public void Reset(BoundingBox box) { }