/// @brief A camera class to perform frame transformations and projections.
classCamera{
public:
// Constructors
Camera();
// Accessors
Eigen::Vector3dconst&GetForward()const;
Eigen::Vector3dconst&GetUp()const;
Eigen::Matrix3dconst&GetR()const;
Eigen::Matrix3dconst&GetR_T()const;
doubleGetFOV()const;
// Setters following the Builder pattern. See https://en.wikipedia.org/wiki/Builder_pattern
Camera&SetForward(Eigen::Vector3dconst&fwd_);
Camera&SetUp(Eigen::Vector3dconst&up_);
Camera&SetR(Eigen::Matrix3dconst&R_);
Camera&SetFOV(doublefov);
// Methods
/// @brief Build the rotation matrix from the camera frame to the inertial frame from the fwd and up vectors.
Camera&BuildRotationMatrix();
/// @brief Orients the camera so that the forward vector points at the target. The position of the camera is (0,0,0).
Camera&SetTarget(Eigen::Vector3dconst&target);
/// @brief Computes the ray direction in camera frame for a point (x,y) on the surface of the camera's sensor. p_norm is in normalized coordinates [-1;1].
/// @param p_norm Normalized coordinates of the point on the sensor.
/// @return The ray direction in camera frame, cartesian coordinates.
/// @brief Computes the ray direction in inertial frame for a point (x,y) on the surface of the camera's sensor. p_norm is in normalized coordinates [-1;1].
/// @param p_norm Normalized coordinates of the point on the sensor.
/// @return The ray direction in inertial frame, cartesian coordinates.