MCPcopy Create free account
hub / github.com/carbonengine/trinity / SetPerspectiveProjection

Method SetPerspectiveProjection

trinity/Tr2Renderer.cpp:400–412  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

398
399
400void Tr2Renderer::SetPerspectiveProjection( float fov, float front, float back, float asp, const Matrix& viewportAdjustment )
401{
402 s_currentProjectionType = PT_PERSPECTIVE;
403 s_fieldOfView = fov;
404 s_frontClip = front;
405 s_backClip = back;
406 s_aspectRatio = asp;
407
408 s_projectionTransform = PerspectiveFovMatrix( s_fieldOfView, s_aspectRatio, s_frontClip, s_backClip );
409 s_viewport2projectionAdjustment = viewportAdjustment;
410
411 SetProjectionDerivedValues();
412}
413
414void Tr2Renderer::SetPerspectiveProjection( float left, float right, float bottom, float top, float front, float back, const Matrix& viewportAdjustment )
415{

Callers

nothing calls this directly

Calls 2

Tested by

no test coverage detected