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

Method CopyViewData

Source/Editor/Viewport/EditorViewport.cs:1390–1403  ·  view source on GitHub ↗

Copies the render view data to structure. The view.

(ref RenderView view)

Source from the content-addressed store, hash-verified

1388 /// </summary>
1389 /// <param name="view">The view.</param>
1390 public void CopyViewData(ref RenderView view)
1391 {
1392 Vector3 position = ViewPosition;
1393 LargeWorlds.UpdateOrigin(ref view.Origin, position);
1394 view.Position = position - view.Origin;
1395 view.Direction = ViewDirection;
1396 view.Near = _nearPlane;
1397 view.Far = _farPlane;
1398
1399 CreateProjectionMatrix(out view.Projection);
1400 CreateViewMatrix(view.Position, out view.View);
1401
1402 view.UpdateCachedData();
1403 }
1404
1405 /// <summary>
1406 /// Gets the input state data.

Callers

nothing calls this directly

Calls 2

UpdateOriginMethod · 0.80
UpdateCachedDataMethod · 0.45

Tested by

no test coverage detected