#include <scimesh/camera.h>
#include <scimesh/math_utils.h>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/constants.hpp>
#include <cmath>
#include <stdexcept>
Go to the source code of this file.
|
| ProjectedPoint | scimesh::world_to_screen (const Camera &camera, const Vec3 &world, int width, int height, ProjectionType projection, float near_plane, float far_plane) |
| | Project a world-space point to the pixel coordinates of a rendered image.
|
| |
| Camera | scimesh::camera_look_at (const Vec3 ¢er, float radius, const Vec3 &direction, const Vec3 &up, float fov_degrees, float margin=1.1f, ProjectionType projection=ProjectionType::PERSPECTIVE) |
| | Create a camera that looks at a point from a given distance and direction.
|
| |
| Camera | scimesh::camera_fit_scene (const Scene &scene, const Vec3 &direction, const Vec3 &up, float fov_degrees, float margin=1.1f, ProjectionType projection=ProjectionType::PERSPECTIVE) |
| | Create a camera that automatically frames an entire Scene.
|
| |
| Camera | scimesh::camera_fit_mesh (const Mesh &mesh, const Vec3 &direction, const Vec3 &up, float fov_degrees, float margin=1.1f, ProjectionType projection=ProjectionType::PERSPECTIVE) |
| | Create a camera that automatically frames a single Mesh.
|
| |
| Camera | scimesh::camera_orbit (const Camera &camera, const Vec3 &axis, float angle_degrees) |
| | Orbit the camera around its look-at point.
|
| |