예제 #1
0
		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))
				);

		}
예제 #2
0
		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;
			}

		}
예제 #3
0
		public bool Equals(BoundingBox other)
		{
			return this.min.Equals(other.min) && this.max.Equals(other.max);
		}
예제 #4
0
		public void Reset(BoundingBox box)
		{
			
		}