cmvr-es/include/utils/math/geometry.h

57 lines
988 B
C
Raw Normal View History

//
// Created by xtkuang on 2025/7/7.
//
#ifndef GEOMETRY_H
#define GEOMETRY_H
namespace cmvr::math {
typedef struct {
double x;
double y;
} Vec2;
typedef struct {
double x;
double y;
double z;
} Vec3;
/// quat
typedef struct {
double w;
double x;
double y;
double z;
} Quat;
/// position 3d
typedef struct {
double x; //* unit: m
double y;
double z;
} Position;
/// euler angel
typedef struct {
double rx; //* unit: rad
double ry;
double rz;
} Euler;
/// pose 3d
typedef struct {
Position position; ///< 位置单位m
Quat quaternion; ///< 四元数
Euler euler; ///< 欧拉角单位rad
} Pose3d;
typedef struct {
double x; //* unit: m
double y;
double theta;
} Pose2d;
}
#endif //GEOMETRY_H