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

Method SetFace

Source/Engine/Graphics/RenderView.cpp:137–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135}
136
137void 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
170void RenderView::SetProjector(float nearPlane, float farPlane, const Float3& position, const Float3& direction, const Float3& up, float angle)
171{

Callers 4

RenderSkyboxMethod · 0.80
OnRenderMethod · 0.80
SetupLightMethod · 0.80
SceneRenderTaskMethod · 0.80

Calls 3

ViewProjectionFunction · 0.85
InvertFunction · 0.50
SetMatrixMethod · 0.45

Tested by

no test coverage detected