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>
16BEGIN_NAMESPACE_GMGRAPHICS;
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;
133END_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 setPosition(Eigen::Vector3f p)
Explicitly sets the position of the Viewpoint.
Definition Viewpoint.cpp:60
virtual Eigen::Quaternionf getOrientation(Eye eye=Eye::MONO)
Returns the orientation of the viewpoint.
Definition Viewpoint.cpp:53
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 Eigen::Vector3f getPosition(Eye eye=Eye::MONO)
Returns the position of the viewpoint.
Definition Viewpoint.cpp:17
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
static const Eye MONO
Pre-defined Eye for monoscopic rendering.
Definition Eye.hh:68