MCPcopy Create free account
hub / github.com/Illation/ETEngine / PopulateCamera

Method PopulateCamera

Engine/source/EtFramework/Components/CameraComponent.cpp:43–54  ·  view source on GitHub ↗

--------------------------------- CameraComponent::PopulateCamera fill out a render camera from the component

Source from the content-addressed store, hash-verified

41// fill out a render camera from the component
42//
43void CameraComponent::PopulateCamera(render::Camera& target, render::Viewport const& viewport, TransformComponent const& tfComp) const
44{
45 target.SetTransformation(tfComp.GetPosition(), tfComp.GetForward(), tfComp.GetUp(), true);
46
47 target.SetIsPerspective(true, true); // #todo: support ortho cameras
48 target.SetFieldOfView(m_FieldOfView, true);
49 target.SetSize(m_Size, true);
50 target.SetClippingPlanes(m_NearPlane, m_FarPlane, true);
51 target.SetViewport(&viewport, true);
52
53 target.Recalculate();
54}
55
56
57//=============================

Callers 2

OnEditorTickMethod · 0.80
MainLoopMethod · 0.80

Calls 7

SetTransformationMethod · 0.80
SetIsPerspectiveMethod · 0.80
SetClippingPlanesMethod · 0.80
RecalculateMethod · 0.80
SetFieldOfViewMethod · 0.45
SetSizeMethod · 0.45
SetViewportMethod · 0.45

Tested by

no test coverage detected