SCENE C++ API  2.0.22
lscamera.h
1 #pragma once
2 
3 #include <core_api/lsglobaldefinitions.h>
4 #include <core_api/lsinterface.h>
5 #include <core_api/lsreftype.h>
6 #include <core_api/lsresult.h>
7 #include <core_api/lsobject.h>
8 
9 namespace SCENE_API {
10 
11 // Forward declarations
12 class LSCamera_Implementation;
13 
16 class LSCamera : public LSInterface, public LSRefType
17 {
18  LS_UNCOPYABLE(LSCamera)
19 
20 public:
23  enum CameraMode {
24  ORTHOGRAPHIC, // Orthographic camera
25  PERSPECTIVE // Perspective camera
26  };
27 
28 
32  PLUGIN_API_EXPORT CameraMode getCameraMode() const;
36  PLUGIN_API_EXPORT void setCameraMode(CameraMode mode);
37 
41  PLUGIN_API_EXPORT Eigen::Vector3d getCamPosition() const;
45  PLUGIN_API_EXPORT void setCamPosition(const Eigen::Vector3d& pos);
46 
50  PLUGIN_API_EXPORT Eigen::Vector3d getCamDirection() const;
54  PLUGIN_API_EXPORT void setCamDirection(const Eigen::Vector3d& dir);
55 
59  PLUGIN_API_EXPORT Eigen::Vector3d getCamDirUp() const;
63  PLUGIN_API_EXPORT void setCamDirUp(const Eigen::Vector3d& dir) const;
64 
68  PLUGIN_API_EXPORT float getCamPitch() const;
72  PLUGIN_API_EXPORT void setCamPitch(float pitch);
73 
77  PLUGIN_API_EXPORT float getCamYaw() const;
81  PLUGIN_API_EXPORT void setCamYaw(float yaw);
82 
86  PLUGIN_API_EXPORT float getCamRoll() const;
90  PLUGIN_API_EXPORT void setCamRoll(float roll);
91 
95  PLUGIN_API_EXPORT double getCamAspectRatio() const;
99  PLUGIN_API_EXPORT void setCamAspectRatio(double aspectRatio);
100 
106  PLUGIN_API_EXPORT float getWidth(float distance) const;
112  PLUGIN_API_EXPORT void setWidth(float width, float distance);
113 
114 protected:
115  LS_INTERFACE(LSCamera, LSInterface)
116 };
117 
118 }