| 65 | } |
| 66 | |
| 67 | float Tr2PrimitiveSet::GetSortValue() |
| 68 | { /* |
| 69 | Primitives are sorted by the distance to the bounding sphere |
| 70 | */ |
| 71 | Vector4 bound = GetBoundingSphere(); |
| 72 | Vector3 d = Tr2Renderer::GetViewPosition() - Vector3( bound.x, bound.y, bound.z ); |
| 73 | float distance = Length( d ) - bound.w; |
| 74 | return distance; |
| 75 | } |
| 76 | |
| 77 | Vector4 Tr2PrimitiveSet::GetBoundingSphere( void ) |
| 78 | { /* |
nothing calls this directly
no test coverage detected