MCPcopy Create free account
hub / github.com/NVIDIA-RTX/RTXPT / LoadCurrentCamera

Method LoadCurrentCamera

Rtxpt/Sample.cpp:970–986  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

968}
969
970void Sample::LoadCurrentCamera()
971{
972 float3 worldPos;
973 float3 worldDir;
974 float3 worldUp;
975
976 std::ifstream file;
977 file.open(app::GetDirectoryWithExecutable( ) / "campos.txt", std::ios_base::in);
978 if (file.is_open())
979 {
980 file >> worldPos.x >> std::ws >> worldPos.y >> std::ws >> worldPos.z; file.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
981 file >> worldDir.x >> std::ws >> worldDir.y >> std::ws >> worldDir.z; file.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
982 file >> worldUp.x >> std::ws >> worldUp.y >> std::ws >> worldUp.z; file.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
983 file.close();
984 m_camera.LookAt( worldPos, worldPos + worldDir, worldUp );
985 }
986}
987
988void Sample::FillPTPipelineGlobalMacros(std::vector<donut::engine::ShaderMacro> & macros)
989{

Callers 1

buildUIMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected