MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / CopyFrom

Method CopyFrom

Source/Engine/Graphics/RenderView.cpp:193–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191}
192
193void 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
213void RenderView::GetWorldMatrix(const Transform& transform, Matrix& world) const
214{

Callers 5

SchemaMethod · 0.45
operator()Method · 0.45
pointer.hFile · 0.45
OnBeginMethod · 0.45
OnTaskBeginMethod · 0.45

Calls 7

GetNearPlaneMethod · 0.80
GetFarPlaneMethod · 0.80
GetMatricesMethod · 0.80
InvertFunction · 0.50
GetPositionMethod · 0.45
GetViewportMethod · 0.45
SetMatrixMethod · 0.45

Tested by

no test coverage detected