38 if (this->
GetVec3f({
"position" }, &pos))
40 this->camera->SetPosition(pos);
44 if (this->
GetVec3f({
"direction" }, &dir))
46 this->camera->SetDirection(dir);
52 this->camera->SetUp(up);
55 VisRTX::Vec2f imageBegin, imageEnd;
56 if (this->
GetVec2f({
"imageStart" }, &imageBegin) && this->
GetVec2f({
"imageEnd" }, &imageEnd))
58 this->camera->SetImageRegion(imageBegin, imageEnd);
61 if (this->camera->GetType() == VisRTX::CameraType::PERSPECTIVE)
63 VisRTX::PerspectiveCamera* pc =
dynamic_cast<VisRTX::PerspectiveCamera*
>(this->camera);
66 if (this->
GetFloat({
"fovy" }, &fovy))
72 if (this->
GetFloat({
"aspect" }, &aspect))
74 pc->SetAspect(aspect);
78 if (this->
GetFloat({
"focusDistance" }, &focalDistance))
80 pc->SetFocalDistance(focalDistance);
84 if (this->
GetFloat({
"apertureRadius" }, &apertureRadius))
86 pc->SetApertureRadius(apertureRadius);
90 else if (this->camera->GetType() == VisRTX::CameraType::ORTHOGRAPHIC)
92 VisRTX::OrthographicCamera* oc =
dynamic_cast<VisRTX::OrthographicCamera*
>(this->camera);
95 if (this->
GetFloat({
"height" }, &height))
97 oc->SetHeight(height);
101 if (this->
GetFloat({
"aspect" }, &aspect))
103 oc->SetAspect(aspect);