41 if (this->
GetVec3f({
"position" }, &pos))
43 this->camera->SetPosition(pos);
47 if (this->
GetVec3f({
"direction" }, &dir))
49 this->camera->SetDirection(dir);
55 this->camera->SetUp(up);
58 VisRTX::Vec2f imageBegin, imageEnd;
59 if (this->
GetVec2f({
"imageStart" }, &imageBegin) && this->
GetVec2f({
"imageEnd" }, &imageEnd))
61 this->camera->SetImageRegion(imageBegin, imageEnd);
64 if (this->camera->GetType() == VisRTX::CameraType::PERSPECTIVE)
66 VisRTX::PerspectiveCamera* pc =
dynamic_cast<VisRTX::PerspectiveCamera*
>(this->camera);
69 if (this->
GetFloat({
"fovy" }, &fovy))
75 if (this->
GetFloat({
"aspect" }, &aspect))
77 pc->SetAspect(aspect);
81 if (this->
GetFloat({
"focusDistance" }, &focalDistance))
83 pc->SetFocalDistance(focalDistance);
87 if (this->
GetFloat({
"apertureRadius" }, &apertureRadius))
89 pc->SetApertureRadius(apertureRadius);
93 else if (this->camera->GetType() == VisRTX::CameraType::ORTHOGRAPHIC)
95 VisRTX::OrthographicCamera* oc =
dynamic_cast<VisRTX::OrthographicCamera*
>(this->camera);
98 if (this->
GetFloat({
"height" }, &height))
100 oc->SetHeight(height);
104 if (this->
GetFloat({
"aspect" }, &aspect))
106 oc->SetAspect(aspect);