2 #ifndef GRAMODS_GRAPHICS_VIEWPOINT
3 #define GRAMODS_GRAPHICS_VIEWPOINT
5 #include <gmGraphics/config.hh>
6 #include <gmGraphics/Eye.hh>
9 #include <gmCore/io_eigen.hh>
11 #include <gmCore/Object.hh>
12 #include <gmCore/OFactory.hh>
16 BEGIN_NAMESPACE_GMGRAPHICS;
38 virtual Eigen::Vector3f getPosition(
Eye eye = Eye::MONO);
48 virtual Eigen::Quaternionf getOrientation(
Eye eye = Eye::MONO);
59 virtual void setPosition(Eigen::Vector3f p);
82 virtual void setOrientation(Eigen::Quaternionf q);
92 virtual void setUpDirection(Eigen::Vector3f up);
105 virtual void setLookAt(Eigen::Vector3f p) { look_at = p; }
123 Eigen::Vector3f position = Eigen::Vector3f::Zero();
124 Eigen::Quaternionf orientation = Eigen::Quaternionf::Identity();
126 Eigen::Vector3f up_direction = Eigen::Vector3f(0, 1, 0);
127 std::optional<Eigen::Vector3f> look_at;
129 float eye_separation = 0.06f;
133 END_NAMESPACE_GMGRAPHICS;
Base type for objects in the Gramods package for standardized handling of construction,...
Definition: Object.hh:42
The viewpoint represents a point in space from which the view is to be rendered, and an orientation.
Definition: Viewpoint.hh:28
virtual void unsetLookAt()
Unsets the look-at point so that the viewpoint orientation is no longer automatically rotated.
Definition: Viewpoint.hh:111
virtual std::string getDefaultKey() override
Returns the default key, in Configuration, for the Object.
Definition: Viewpoint.hh:117
virtual void setLookAt(Eigen::Vector3f p)
Sets a point that the viewpoint should be rotated towards.
Definition: Viewpoint.hh:105
void setEyeSeparation(float e)
Sets the distance between the eyes for stereoscopic (or multiscopic) rendering, in internal units,...
Definition: Viewpoint.hh:68
An indexed eye that can be rendered.
Definition: Eye.hh:20