mirror of
https://github.com/orange-cpp/omath.git
synced 2026-06-09 08:44:35 +00:00
added improvement
This commit is contained in:
@@ -36,6 +36,27 @@ namespace omath::opengl_engine
|
||||
* mat_rotation_axis_y<float, MatStoreType::COLUMN_MAJOR>(angles.yaw)
|
||||
* mat_rotation_axis_x<float, MatStoreType::COLUMN_MAJOR>(angles.pitch);
|
||||
}
|
||||
|
||||
Vector3<float> extract_origin(const Mat4X4& mat) noexcept
|
||||
{
|
||||
return mat_extract_origin(mat);
|
||||
}
|
||||
|
||||
Vector3<float> extract_scale(const Mat4X4& mat) noexcept
|
||||
{
|
||||
return mat_extract_scale(mat);
|
||||
}
|
||||
|
||||
ViewAngles extract_rotation_angles(const Mat4X4& mat) noexcept
|
||||
{
|
||||
const auto angles = mat_extract_rotation_zyx(mat);
|
||||
return {
|
||||
PitchAngle::from_degrees(angles.x),
|
||||
YawAngle::from_degrees(angles.y),
|
||||
RollAngle::from_degrees(angles.z),
|
||||
};
|
||||
}
|
||||
|
||||
Mat4X4 calc_perspective_projection_matrix(const float field_of_view, const float aspect_ratio, const float near,
|
||||
const float far, const NDCDepthRange ndc_depth_range) noexcept
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user