10 #include <Eigen/Geometry>
15 class AxisAlignedBoundingBox;
18 namespace visualization {
25 using Transform = Eigen::Transform<float, 3, Eigen::Affine>;
72 virtual void LookAt(
const Eigen::Vector3f& center,
73 const Eigen::Vector3f& eye,
74 const Eigen::Vector3f& up) = 0;
79 const Eigen::Vector3f& left,
80 const Eigen::Vector3f& up) = 0;
105 float view_height)
const = 0;
111 virtual Eigen::Vector2f
GetNDC(
const Eigen::Vector3f& pt)
const = 0;
159 const Eigen::Matrix3d& intrinsic,
160 const Eigen::Matrix4d& extrinsic,
161 int intrinsic_width_px,
162 int intrinsic_height_px,
A bounding box that is aligned along the coordinate axes.
Definition: BoundingVolume.h:159
Eigen::Transform< float, 3, Eigen::Projective > ProjectionMatrix
Definition: Camera.h:26
virtual void CopyFrom(const Camera *camera)=0
virtual const ProjectionInfo & GetProjection() const =0
virtual void LookAt(const Eigen::Vector3f ¢er, const Eigen::Vector3f &eye, const Eigen::Vector3f &up)=0
virtual Eigen::Vector3f GetForwardVector() const =0
virtual FovType GetFieldOfViewType() const =0
only valid if fov was passed to SetProjection()
static float CalcFarPlane(const rendering::Camera &camera, const geometry::AxisAlignedBoundingBox &scene_bounds)
Definition: Camera.cpp:50
virtual Transform GetModelMatrix() const =0
virtual ~Camera()=default
FovType
Definition: Camera.h:23
Eigen::Transform< float, 3, Eigen::Affine > Transform
Definition: Camera.h:25
virtual Eigen::Vector3f Unproject(float x, float y, float z, float view_width, float view_height) const =0
static void SetupCameraAsPinholeCamera(rendering::Camera &camera, const Eigen::Matrix3d &intrinsic, const Eigen::Matrix4d &extrinsic, int intrinsic_width_px, int intrinsic_height_px, const geometry::AxisAlignedBoundingBox &scene_bounds)
Definition: Camera.cpp:35
virtual double GetViewZ(float z_buffer) const =0
virtual void SetProjection(const Eigen::Matrix3d &intrinsics, double near, double far, double width, double height)=0
virtual void SetModelMatrix(const Eigen::Vector3f &forward, const Eigen::Vector3f &left, const Eigen::Vector3f &up)=0
static float CalcNearPlane()
Returns a good value for the near plane.
Definition: Camera.cpp:48
virtual ProjectionMatrix GetProjectionMatrix() const =0
virtual void FromExtrinsics(const Eigen::Matrix4d &extrinsics)
Definition: Camera.cpp:19
virtual Transform GetViewMatrix() const =0
virtual Eigen::Vector3f GetPosition() const =0
Projection
Definition: Camera.h:24
virtual double GetNear() const =0
virtual double GetFieldOfView() const =0
only valid if fov was passed to SetProjection()
virtual void SetProjection(double fov, double aspect, double near, double far, FovType fov_type)=0
virtual Eigen::Vector2f GetNDC(const Eigen::Vector3f &pt) const =0
virtual Eigen::Vector3f GetUpVector() const =0
virtual void SetProjection(Projection projection, double left, double right, double bottom, double top, double near, double far)=0
virtual Transform GetCullingProjectionMatrix() const =0
virtual double GetFar() const =0
virtual void SetModelMatrix(const Transform &view)=0
virtual Eigen::Vector3f GetLeftVector() const =0
Definition: PinholeCameraIntrinsic.cpp:16
double bottom
Definition: Camera.h:125
bool is_intrinsic
Definition: Camera.h:119
bool is_ortho
Definition: Camera.h:118
union open3d::visualization::rendering::Camera::ProjectionInfo::@7 proj
Projection projection
Definition: Camera.h:122
double top
Definition: Camera.h:126
struct open3d::visualization::rendering::Camera::ProjectionInfo::@7::@10 intrinsics
FovType fov_type
Definition: Camera.h:131
double cy
Definition: Camera.h:141
double fov
Definition: Camera.h:132
double aspect
Definition: Camera.h:133
double cx
Definition: Camera.h:140
double left
Definition: Camera.h:123
double far_plane
Definition: Camera.h:128
double width
Definition: Camera.h:144
double near_plane
Definition: Camera.h:127
double height
Definition: Camera.h:145
double right
Definition: Camera.h:124
struct open3d::visualization::rendering::Camera::ProjectionInfo::@7::@9 perspective
struct open3d::visualization::rendering::Camera::ProjectionInfo::@7::@8 ortho
double fx
Definition: Camera.h:138
double fy
Definition: Camera.h:139