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

Method SetOrthoProjection

trinity/Tr2Renderer.cpp:425–440  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

423}
424
425void Tr2Renderer::SetOrthoProjection( float width, float height, float front, float back, const Matrix& viewportAdjustment )
426{
427 s_currentProjectionType = PT_ORTHOGONAL;
428
429 s_projectionTransform = OrthoMatrix( width, height, front, back );
430 s_viewport2projectionAdjustment = viewportAdjustment;
431
432 s_orthoWidth = width;
433 s_orthoHeight = height;
434 s_aspectRatio = ( height ? width / height : 1.0f );
435 s_fieldOfView = 1.0f;
436 s_frontClip = front;
437 s_backClip = back;
438
439 SetProjectionDerivedValues();
440}
441
442void Tr2Renderer::SetOrthoProjection( float left, float right, float bottom, float top, float front, float back, const Matrix& viewportAdjustment )
443{

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected