cesium-native 0.43.0
Loading...
Searching...
No Matches
Transforms.h
1#pragma once
2
3#include "Axis.h"
4#include "Library.h"
5
6#include <glm/fwd.hpp>
7
8namespace CesiumGeometry {
9
13struct CESIUMGEOMETRY_API Transforms final {
14
19 static const glm::dmat4 Y_UP_TO_Z_UP;
20
25 static const glm::dmat4 Z_UP_TO_Y_UP;
26
31 static const glm::dmat4 X_UP_TO_Z_UP;
32
37 static const glm::dmat4 Z_UP_TO_X_UP;
38
43 static const glm::dmat4 X_UP_TO_Y_UP;
44
49 static const glm::dmat4 Y_UP_TO_X_UP;
50
61 const glm::dvec3& translation,
62 const glm::dquat& rotation,
63 const glm::dvec3& scale);
64
83 const glm::dmat4& matrix,
84 glm::dvec3* pTranslation,
85 glm::dquat* pRotation,
86 glm::dvec3* pScale);
87
96 static const glm::dmat4&
98};
99
100} // namespace CesiumGeometry
Basic geometry classes for Cesium.
Axis
An enum describing the x, y, and z axes.
Definition Axis.h:10
Coordinate system matrix constructions helpers.
Definition Transforms.h:13
static const glm::dmat4 Z_UP_TO_X_UP
A matrix to convert from z-up to x-up orientation, by rotating about PI/2 around the y-axis.
Definition Transforms.h:37
static glm::dmat4 createTranslationRotationScaleMatrix(const glm::dvec3 &translation, const glm::dquat &rotation, const glm::dvec3 &scale)
Creates a translation-rotation-scale matrix, equivalent to translation * rotation * scale....
static const glm::dmat4 Y_UP_TO_X_UP
A matrix to convert from y-up to x-up orientation, by rotating about -PI/2 around the z-axis.
Definition Transforms.h:49
static void computeTranslationRotationScaleFromMatrix(const glm::dmat4 &matrix, glm::dvec3 *pTranslation, glm::dquat *pRotation, glm::dvec3 *pScale)
Decomposes a matrix into translation, rotation, and scale components. This is the reverse of createTr...
static const glm::dmat4 X_UP_TO_Y_UP
A matrix to convert from x-up to y-up orientation, by rotating about PI/2 around the z-axis.
Definition Transforms.h:43
static const glm::dmat4 Z_UP_TO_Y_UP
A matrix to convert from z-up to y-up orientation, by rotating about -PI/2 around the x-axis.
Definition Transforms.h:25
static const glm::dmat4 & getUpAxisTransform(CesiumGeometry::Axis from, CesiumGeometry::Axis to)
Gets a transform that converts from one up axis to another.
static const glm::dmat4 X_UP_TO_Z_UP
A matrix to convert from x-up to z-up orientation, by rotating about -PI/2 around the y-axis.
Definition Transforms.h:31
static const glm::dmat4 Y_UP_TO_Z_UP
A matrix to convert from y-up to z-up orientation, by rotating about PI/2 around the x-axis.
Definition Transforms.h:19