1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
// Copyright 2009 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
#pragma once
#include "camera/Camera.h"
#include "rkcommon/math/box.h"
// ispc shared
#include "PerspectiveCameraShared.h"
namespace ospray {
struct OSPRAY_SDK_INTERFACE PerspectiveCamera
: public AddStructShared<Camera, ispc::PerspectiveCamera>
{
PerspectiveCamera(api::ISPCDevice &device);
virtual ~PerspectiveCamera() override = default;
virtual std::string toString() const override;
virtual void commit() override;
box3f projectBox(const box3f &b) const override;
// Data members //
float fovy{60.f};
float aspect{1.f};
float apertureRadius{0.f};
float focusDistance{1.f};
bool architectural{false}; // orient image plane to be parallel to 'up' and
// shift the lens
OSPStereoMode stereoMode{OSP_STEREO_NONE};
float interpupillaryDistance{
0.0635f}; // distance between the two cameras (stereo)
};
} // namespace ospray
|