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

Method SetCurrentCameraPosDirUp

Rtxpt/Sample.cpp:904–917  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

902}
903
904bool Sample::SetCurrentCameraPosDirUp(const std::string & val)
905{
906 if (val=="")
907 return false;
908 bool ok = true;
909 float3 worldPos, worldDir, worldUp;
910 std::string temp = val;
911 ok &= ParseFloat3Consume( temp, worldPos );
912 ok &= ParseFloat3Consume( temp, worldDir );
913 ok &= ParseFloat3Consume( temp, worldUp );
914 if (ok)
915 m_camera.LookAt( worldPos, worldPos + worldDir, worldUp );
916 return ok;
917}
918
919void Sample::SaveCurrentCamera() const
920{

Callers 1

buildUIMethod · 0.80

Calls 1

ParseFloat3ConsumeFunction · 0.85

Tested by

no test coverage detected