Cogs.Core
CameraHelper.h
1#pragma once
2
3#include "Base.h"
4
5#include "Foundation/Geometry/BoundingBox.hpp"
6
18{
20 [[nodiscard]]
21 COGSCORE_DLL_API glm::dvec3 getCenter(const Cogs::Geometry::DBoundingBox& boundingBox);
22
24 [[nodiscard]]
25 COGSCORE_DLL_API float getFarDistance(const glm::dvec3& position, const Cogs::Geometry::DBoundingBox& boundingBox);
26
28 [[nodiscard]]
29 COGSCORE_DLL_API float getFocalDistance(const glm::dvec3& position, const Cogs::Geometry::DBoundingBox& boundingBox);
30
38 [[nodiscard]]
39 COGSCORE_DLL_API glm::quat getOrientation(float horizontalAngle, float verticalAngle);
40
42 [[nodiscard]]
43 COGSCORE_DLL_API float getOrthoHeight(const Cogs::Geometry::DBoundingBox& boundingBox);
44
46 [[nodiscard]]
47 COGSCORE_DLL_API float getRadius(const Cogs::Geometry::DBoundingBox& boundingBox);
48
57 [[nodiscard]]
58 COGSCORE_DLL_API glm::dvec3 getFocalPosition(const glm::dvec3& position, const glm::quat& orientation, float focalDistance);
59
72 [[nodiscard]]
73 COGSCORE_DLL_API glm::dvec3 getViewAllPosition(const Cogs::Geometry::DBoundingBox& boundingBox,
74 const glm::quat& orientation, float fieldOfView, glm::vec2 viewport);
75}
Contains common utility members for camera setup Other camera utilities: Interpolation utilities can ...
Definition: CameraHelper.h:18
COGSCORE_DLL_API float getOrthoHeight(const Cogs::Geometry::DBoundingBox &boundingBox)
Calculate Orthographic camera orthoHeight Field to view boundingbox.
COGSCORE_DLL_API glm::dvec3 getViewAllPosition(const Cogs::Geometry::DBoundingBox &boundingBox, const glm::quat &orientation, float fieldOfView, glm::vec2 viewport)
COGSCORE_DLL_API glm::dvec3 getFocalPosition(const glm::dvec3 &position, const glm::quat &orientation, float focalDistance)
COGSCORE_DLL_API glm::dvec3 getCenter(const Cogs::Geometry::DBoundingBox &boundingBox)
Gets center of non-empty bounding box.
COGSCORE_DLL_API float getFocalDistance(const glm::dvec3 &position, const Cogs::Geometry::DBoundingBox &boundingBox)
Gets distance from given position (camera position) to center of bounding box.
COGSCORE_DLL_API float getFarDistance(const glm::dvec3 &position, const Cogs::Geometry::DBoundingBox &boundingBox)
Gets camera far distance given bounding box.
COGSCORE_DLL_API float getRadius(const Cogs::Geometry::DBoundingBox &boundingBox)
Gets the radius of the bounding sphere.
COGSCORE_DLL_API glm::quat getOrientation(float horizontalAngle, float verticalAngle)
Gets the camera orientation from the horizontal and vertical angle values.