Axiom.Demos.Line3d.GetSquaredViewDepth C# (CSharp) Method

GetSquaredViewDepth() public method

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

			return dist.LengthSquared;
		}