Axiom.Samples.VolumeTexture.ThingRendable.GetSquaredViewDepth C# (CSharp) Метод

GetSquaredViewDepth() публичный Метод

Returns the camera-relative squared depth of this renderable.
public GetSquaredViewDepth ( Camera camera ) : float
camera Axiom.Core.Camera
Результат 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;
		}