Axiom.Core.WireBoundingBox.GetSquaredViewDepth C# (CSharp) Method

GetSquaredViewDepth() public method

public GetSquaredViewDepth ( Camera camera ) : float
camera Camera
return float
		public override float GetSquaredViewDepth( Camera camera )
		{
			Vector3 min = box.Minimum,
					max = box.Maximum,
					mid = ( ( max - min ) * 0.5f ) + min,
					dist = camera.DerivedPosition - mid;

			return dist.LengthSquared;
		}