| 30 | } |
| 31 | |
| 32 | bool BBoxIsOutsideView( |
| 33 | const ViewClipPlanes& clip_planes, |
| 34 | const m_BBox3& bbox, |
| 35 | const m_Mat4& bbox_mat ) |
| 36 | { |
| 37 | for( const m_Plane3& plane : clip_planes ) |
| 38 | { |
| 39 | bool is_inside= false; |
| 40 | for( unsigned int z= 0u; z < 2u; z++ ) |
| 41 | for( unsigned int y= 0u; y < 2u; y++ ) |
| 42 | for( unsigned int x= 0u; x < 2u; x++ ) |
| 43 | { |
| 44 | const m_Vec3 point( |
| 45 | x == 0 ? bbox.min.x : bbox.max.x, |
| 46 | y == 0 ? bbox.min.y : bbox.max.y, |
| 47 | z == 0 ? bbox.min.z : bbox.max.z ); |
| 48 | |
| 49 | if( plane.IsPointAheadPlane( point * bbox_mat ) ) |
| 50 | { |
| 51 | is_inside= true; |
| 52 | goto box_vertices_check_end; |
| 53 | } |
| 54 | } |
| 55 | box_vertices_check_end: |
| 56 | |
| 57 | if( !is_inside ) // bbox is behind of one of clip planes |
| 58 | return true; |
| 59 | } |
| 60 | |
| 61 | return false; |
| 62 | } |
| 63 | |
| 64 | unsigned int GetModelBMPSpritePhase( const MapState::StaticModel& model ) |
| 65 | { |
no outgoing calls
no test coverage detected