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