cesium-native 0.43.0
Loading...
Searching...
No Matches
GlobeAnchor.h
1#pragma once
2
3#include "Library.h"
4
5#include <CesiumGeospatial/Ellipsoid.h>
6
7#include <glm/mat4x4.hpp>
8
9#include <optional>
10
11namespace CesiumGeospatial {
12
13class LocalHorizontalCoordinateSystem;
14
26class CESIUMGEOSPATIAL_API GlobeAnchor final {
27public:
42 const LocalHorizontalCoordinateSystem& localCoordinateSystem,
43 const glm::dmat4& anchorToLocal);
44
52 static GlobeAnchor
53 fromAnchorToFixedTransform(const glm::dmat4& anchorToFixed);
54
62 explicit GlobeAnchor(const glm::dmat4& anchorToFixed);
63
68 const glm::dmat4& getAnchorToFixedTransform() const;
69
90 const glm::dmat4& newAnchorToFixed,
91 bool adjustOrientation,
92 const Ellipsoid& ellipsoid CESIUM_DEFAULT_ELLIPSOID);
93
99 const LocalHorizontalCoordinateSystem& localCoordinateSystem) const;
100
128 const LocalHorizontalCoordinateSystem& localCoordinateSystem,
129 const glm::dmat4& newAnchorToLocal,
130 bool adjustOrientation,
131 const Ellipsoid& ellipsoid CESIUM_DEFAULT_ELLIPSOID);
132
133private:
134 glm::dmat4 _anchorToFixed;
135};
136
137} // namespace CesiumGeospatial
A quadratic surface defined in Cartesian coordinates.
Definition Ellipsoid.h:38
Anchors an object to the globe by defining a transformation from the object's coordinate to the globe...
Definition GlobeAnchor.h:26
static GlobeAnchor fromAnchorToLocalTransform(const LocalHorizontalCoordinateSystem &localCoordinateSystem, const glm::dmat4 &anchorToLocal)
Creates a new instance from a transformation to a local coordinate system.
GlobeAnchor(const glm::dmat4 &anchorToFixed)
Constructs a new instance with a given transformation to the globe-fixed coordinate system.
void setAnchorToLocalTransform(const LocalHorizontalCoordinateSystem &localCoordinateSystem, const glm::dmat4 &newAnchorToLocal, bool adjustOrientation, const Ellipsoid &ellipsoid=CesiumGeospatial::Ellipsoid::WGS84)
Sets the globe-fixed transformation based on a new transformation from anchor coordinates to a local-...
const glm::dmat4 & getAnchorToFixedTransform() const
Gets the transformation from the anchor's coordinate system to the globe-fixed coordinate system.
void setAnchorToFixedTransform(const glm::dmat4 &newAnchorToFixed, bool adjustOrientation, const Ellipsoid &ellipsoid=CesiumGeospatial::Ellipsoid::WGS84)
Sets the new transformation from the anchor's coordinate system to globe-fixed coordinates.
static GlobeAnchor fromAnchorToFixedTransform(const glm::dmat4 &anchorToFixed)
Creates a new instance from a transformation to the globe-fixed coordinate system.
glm::dmat4 getAnchorToLocalTransform(const LocalHorizontalCoordinateSystem &localCoordinateSystem) const
Gets the transformation from the anchor's coordinate system to the given local-horizontal coordinate ...
A coordinate system created from a local horizontal plane at a particular origin point on the globe.
Classes for geospatial computations in Cesium.