Axiom.Samples.VolumeTexture.VolumeRendable.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.5 ) + min;
			dist = camera.DerivedPosition - mid;

			return dist.LengthSquared;
		}