Skip to content

Commit 82a43d9

Browse files
committed
camera - ortho zoom property
1 parent 777268c commit 82a43d9

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/ofbx.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1855,6 +1855,7 @@ struct CameraImpl : public Camera
18551855

18561856
double nearPlane = 0.1;
18571857
double farPlane = 1000.0;
1858+
double orthoZoom = 1.f;
18581859
bool autoComputeClipPanes = true;
18591860

18601861
GateFit gateFit = GateFit::HORIZONTAL;
@@ -1879,6 +1880,7 @@ struct CameraImpl : public Camera
18791880

18801881
double getNearPlane() const override { return nearPlane; }
18811882
double getFarPlane() const override { return farPlane; }
1883+
double getOrthoZoom() const override { return orthoZoom; }
18821884
bool doesAutoComputeClipPanes() const override { return autoComputeClipPanes; }
18831885

18841886
GateFit getGateFit() const override { return gateFit; }
@@ -2522,6 +2524,10 @@ struct OptionalError<Object*> parseCamera(Scene& scene, const Element& element,
25222524
{
25232525
camera->farPlane = prop->getProperty(4)->getValue().toDouble();
25242526
}
2527+
else if (prop->first_property->value == "OrthoZoom" || prop->first_property->value == "CameraOrthoZoom")
2528+
{
2529+
camera->orthoZoom = prop->getProperty(4)->getValue().toDouble();
2530+
}
25252531
}
25262532
prop = prop->sibling;
25272533
}

src/ofbx.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,7 @@ struct Camera : Object
394394

395395
virtual double getNearPlane() const = 0;
396396
virtual double getFarPlane() const = 0;
397+
virtual double getOrthoZoom() const = 0;
397398
virtual bool doesAutoComputeClipPanes() const = 0;
398399

399400
virtual GateFit getGateFit() const = 0;

0 commit comments

Comments
 (0)