| 135 | } |
| 136 | |
| 137 | void RenderView::SetFace(int32 faceIndex) |
| 138 | { |
| 139 | static Float3 directions[6] = |
| 140 | { |
| 141 | { Float3::Right }, |
| 142 | { Float3::Left }, |
| 143 | { Float3::Up }, |
| 144 | { Float3::Down }, |
| 145 | { Float3::Forward }, |
| 146 | { Float3::Backward }, |
| 147 | }; |
| 148 | static Float3 ups[6] = |
| 149 | { |
| 150 | { Float3::Up }, |
| 151 | { Float3::Up }, |
| 152 | { Float3::Backward }, |
| 153 | { Float3::Forward }, |
| 154 | { Float3::Up }, |
| 155 | { Float3::Up }, |
| 156 | }; |
| 157 | ASSERT(faceIndex >= 0 && faceIndex < 6); |
| 158 | |
| 159 | // Create view matrix |
| 160 | Direction = directions[faceIndex]; |
| 161 | Matrix::LookAt(Position, Position + Direction, ups[faceIndex], View); |
| 162 | Matrix::Invert(View, IV); |
| 163 | |
| 164 | // Compute frustum matrix |
| 165 | Frustum.SetMatrix(View, Projection); |
| 166 | Matrix::Invert(ViewProjection(), IVP); |
| 167 | CullingFrustum = Frustum; |
| 168 | } |
| 169 | |
| 170 | void RenderView::SetProjector(float nearPlane, float farPlane, const Float3& position, const Float3& direction, const Float3& up, float angle) |
| 171 | { |
no test coverage detected