1#ifndef SRC_COMMON_SPATIAL_CAMERA_HPP_
2#define SRC_COMMON_SPATIAL_CAMERA_HPP_
4#include "common/spatial/attitude-utils.hpp"
6#include "common/style.hpp"
176decimal FovToFocalLength(decimal xFov, decimal xResolution);
189decimal FocalLengthToFov(decimal focalLength, decimal xResolution, decimal pixelSize);
A Camera is a mutable object that represents a Camera.
Definition camera.hpp:22
bool InSensor(const Vec2 &vector) const
Evaluates whether a vector can be seen in the camera.
Definition camera.cpp:42
decimal yCenter
The y center (pixels)
Definition camera.hpp:155
int XResolution() const
Returns the X resolution of this camera.
Definition camera.hpp:106
int yResolution
The y resolution (pixels)
Definition camera.hpp:159
decimal PixelSize() const
Returns the pixel size of this camera.
Definition camera.hpp:127
int xResolution
The x resolution (pixels)
Definition camera.hpp:157
Camera(decimal focalLength, decimal pixelSize, int xResolution, int yResolution)
Creates a Camera object off of ideal Camera parameters.
Definition camera.hpp:56
Camera(const Camera &)=default
Copy Constructor for Camera.
decimal Fov() const
Provides the Field of View (FOV) of this Camera.
Definition camera.cpp:50
decimal xCenter
The x center (pixels)
Definition camera.hpp:153
decimal pixelSize
The pixel size (m)
Definition camera.hpp:151
decimal FocalLength() const
Returns the focal length of this camera.
Definition camera.hpp:120
Vec3 CameraToSpatial(const Vec2 &) const
Gives a point in 3d space that could correspond to the given vector, using the same coordinate system...
Definition camera.cpp:27
int YResolution() const
Returns the Y resolution of this camera.
Definition camera.hpp:113
Camera(decimal focalLength, decimal pixelSize, decimal xCenter, decimal yCenter, int xResolution, int yResolution)
Creates a Camera object off of real Camera parameters.
Definition camera.hpp:38
Vec2 SpatialToCamera(const Vec3 &) const
Converts from a 3D point in space to a 2D point on the camera sensor.
Definition camera.cpp:14
decimal focalLength
The focal length (m)
Definition camera.hpp:149
void SetFocalLength(decimal focalLength)
Sets the focal length of this.
Definition camera.hpp:144
A Vec3 is a mutable object that represents a 3D Vector.
Definition attitude-utils.hpp:98
A Vec2 is an immutable object that represents a 2D Vector.
Definition attitude-utils.hpp:22