123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- import Check from "../Core/Check.js";
- import CesiumMath from "../Core/Math.js";
- import Matrix3 from "../Core/Matrix3.js";
- import Matrix4 from "../Core/Matrix4.js";
- var Axis = {
-
- X: 0,
-
- Y: 1,
-
- Z: 2,
- };
- Axis.Y_UP_TO_Z_UP = Matrix4.fromRotationTranslation(
- Matrix3.fromRotationX(CesiumMath.PI_OVER_TWO)
- );
- Axis.Z_UP_TO_Y_UP = Matrix4.fromRotationTranslation(
- Matrix3.fromRotationX(-CesiumMath.PI_OVER_TWO)
- );
- Axis.X_UP_TO_Z_UP = Matrix4.fromRotationTranslation(
- Matrix3.fromRotationY(-CesiumMath.PI_OVER_TWO)
- );
- Axis.Z_UP_TO_X_UP = Matrix4.fromRotationTranslation(
- Matrix3.fromRotationY(CesiumMath.PI_OVER_TWO)
- );
- Axis.X_UP_TO_Y_UP = Matrix4.fromRotationTranslation(
- Matrix3.fromRotationZ(CesiumMath.PI_OVER_TWO)
- );
- Axis.Y_UP_TO_X_UP = Matrix4.fromRotationTranslation(
- Matrix3.fromRotationZ(-CesiumMath.PI_OVER_TWO)
- );
- Axis.fromName = function (name) {
-
- Check.typeOf.string("name", name);
-
- return Axis[name];
- };
- export default Object.freeze(Axis);
|