cesium-native 0.43.0
|
The state of the view that is used during the traversal of a tileset. More...
#include <Cesium3DTilesSelection/ViewState.h>
Public Member Functions | |
const glm::dvec3 & | getPosition () const noexcept |
Gets the position of the camera in Earth-centered, Earth-fixed coordinates. | |
const glm::dvec3 & | getDirection () const noexcept |
Gets the look direction of the camera in Earth-centered, Earth-fixed coordinates. | |
const glm::dvec3 & | getUp () const noexcept |
Gets the up direction of the camera in Earth-centered, Earth-fixed coordinates. | |
const std::optional< CesiumGeospatial::Cartographic > & | getPositionCartographic () const noexcept |
Gets the position of the camera as a longitude / latitude / height. | |
const glm::dvec2 & | getViewportSize () const noexcept |
Gets the size of the viewport in pixels. | |
double | getHorizontalFieldOfView () const noexcept |
Gets the horizontal field-of-view angle in radians. | |
double | getVerticalFieldOfView () const noexcept |
Gets the vertical field-of-view angle in radians. | |
bool | isBoundingVolumeVisible (const BoundingVolume &boundingVolume) const noexcept |
Returns whether the given BoundingVolume is visible for this camera. | |
double | computeDistanceSquaredToBoundingVolume (const BoundingVolume &boundingVolume) const noexcept |
Computes the squared distance to the given BoundingVolume . | |
double | computeScreenSpaceError (double geometricError, double distance) const noexcept |
Computes the screen space error from a given geometric error. | |
Static Public Member Functions | |
static ViewState | create (const glm::dvec3 &position, const glm::dvec3 &direction, const glm::dvec3 &up, const glm::dvec2 &viewportSize, double horizontalFieldOfView, double verticalFieldOfView, const CesiumGeospatial::Ellipsoid &ellipsoid=CesiumGeospatial::Ellipsoid::WGS84) |
Creates a new instance of a view state. | |
The state of the view that is used during the traversal of a tileset.
An instance of a view state can be created with the create
function.
Definition at line 24 of file ViewState.h.
|
noexcept |
Computes the squared distance to the given BoundingVolume
.
Computes the squared euclidean distance from the position of this camera to the closest point of the given bounding volume.
boundingVolume | The bounding volume |
|
noexcept |
Computes the screen space error from a given geometric error.
Computes the screen space error (SSE) that results from the given geometric error, when it is viewed with this camera from the given distance.
The given distance will be clamped to a small positive value if it is negative or too close to zero.
geometricError | The geometric error |
distance | The viewing distance |
|
static |
Creates a new instance of a view state.
position | The position of the eye point of the camera. |
direction | The view direction vector of the camera. |
up | The up vector of the camera. |
viewportSize | The size of the viewport, in pixels. |
horizontalFieldOfView | The horizontal field-of-view (opening) angle of the camera, in radians. |
verticalFieldOfView | The vertical field-of-view (opening) angle of the camera, in radians. |
ellipsoid | The ellipsoid that will be used to compute the cartographic position from the cartesian position. Default value: CesiumGeospatial::Ellipsoid::WGS84 . |
|
inlinenoexcept |
Gets the look direction of the camera in Earth-centered, Earth-fixed coordinates.
Definition at line 63 of file ViewState.h.
|
inlinenoexcept |
Gets the horizontal field-of-view angle in radians.
Definition at line 92 of file ViewState.h.
|
inlinenoexcept |
Gets the position of the camera in Earth-centered, Earth-fixed coordinates.
Definition at line 57 of file ViewState.h.
|
inlinenoexcept |
Gets the position of the camera as a longitude / latitude / height.
The result may be std::nullopt
if the Cartesian position is very near the center of the Ellipsoid.
Definition at line 78 of file ViewState.h.
|
inlinenoexcept |
Gets the up direction of the camera in Earth-centered, Earth-fixed coordinates.
Definition at line 69 of file ViewState.h.
|
inlinenoexcept |
Gets the vertical field-of-view angle in radians.
Definition at line 99 of file ViewState.h.
|
inlinenoexcept |
Gets the size of the viewport in pixels.
Definition at line 85 of file ViewState.h.
|
noexcept |
Returns whether the given BoundingVolume
is visible for this camera.
Returns whether the given bounding volume is visible for this camera, meaning that the given volume is at least partially contained in the frustum of this camera.