| 191 | } |
| 192 | |
| 193 | void RenderView::CopyFrom(const Camera* camera, const Viewport* viewport) |
| 194 | { |
| 195 | const Vector3 cameraPos = camera->GetPosition(); |
| 196 | LargeWorlds::UpdateOrigin(Origin, cameraPos); |
| 197 | Position = cameraPos - Origin; |
| 198 | Direction = camera->GetDirection(); |
| 199 | Near = camera->GetNearPlane(); |
| 200 | Far = camera->GetFarPlane(); |
| 201 | camera->GetMatrices(View, Projection, viewport ? *viewport : camera->GetViewport(), Origin); |
| 202 | Frustum.SetMatrix(View, Projection); |
| 203 | NonJitteredProjection = Projection; |
| 204 | Matrix::Invert(View, IV); |
| 205 | Matrix::Invert(Projection, IP); |
| 206 | Frustum.GetInvMatrix(IVP); |
| 207 | CullingFrustum = Frustum; |
| 208 | RenderLayersMask = camera->RenderLayersMask; |
| 209 | Flags = camera->RenderFlags; |
| 210 | Mode = camera->RenderMode; |
| 211 | } |
| 212 | |
| 213 | void RenderView::GetWorldMatrix(const Transform& transform, Matrix& world) const |
| 214 | { |
no test coverage detected