MCPcopy Create free account
hub / github.com/NVIDIA-RTX/RTXNTC / SetViewport

Method SetViewport

tools/explorer/ModelView.cpp:495–508  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

493}
494
495void ModelView::SetViewport(dm::float2 origin, dm::float2 size)
496{
497 if (m_view.GetViewport().width() == 0)
498 m_splitPosition = int(origin.x + size.x * 0.5f);
499
500 m_view.SetViewport(nvrhi::Viewport(
501 origin.x, origin.x + size.x,
502 origin.y, origin.y + size.y,
503 0.f, 1.f));
504
505 m_view.UpdateCache();
506
507 m_projectionMatrix = perspProjD3DStyle(radians(c_verticalFov), size.x / size.y, 0.01f, 100.f);
508}
509
510void ModelView::SetImageName(bool right, const std::string& name)
511{

Callers 2

RenderMethod · 0.45
SetupViewMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected