public GetSquaredViewDepth ( |
||
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;
}