Skip to content

Commit aa03c32

Browse files
committed
Add missing Projection constructor with 16 real_t values
1 parent 6f981b3 commit aa03c32

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

include/godot_cpp/variant/projection.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ struct [[nodiscard]] Projection {
152152

153153
Projection();
154154
Projection(const Vector4 &p_x, const Vector4 &p_y, const Vector4 &p_z, const Vector4 &p_w);
155+
Projection(real_t p_xx, real_t p_xy, real_t p_xz, real_t p_xw, real_t p_yx, real_t p_yy, real_t p_yz, real_t p_yw, real_t p_zx, real_t p_zy, real_t p_zz, real_t p_zw, real_t p_wx, real_t p_wy, real_t p_wz, real_t p_ww);
155156
Projection(const Transform3D &p_transform);
156157
~Projection();
157158
};

src/variant/projection.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -913,6 +913,13 @@ Projection::Projection(const Vector4 &p_x, const Vector4 &p_y, const Vector4 &p_
913913
columns[3] = p_w;
914914
}
915915

916+
Projection::Projection(real_t p_xx, real_t p_xy, real_t p_xz, real_t p_xw, real_t p_yx, real_t p_yy, real_t p_yz, real_t p_yw, real_t p_zx, real_t p_zy, real_t p_zz, real_t p_zw, real_t p_wx, real_t p_wy, real_t p_wz, real_t p_ww) {
917+
columns[0] = Vector4(p_xx, p_xy, p_xz, p_xw);
918+
columns[1] = Vector4(p_yx, p_yy, p_yz, p_yw);
919+
columns[2] = Vector4(p_zx, p_zy, p_zz, p_zw);
920+
columns[3] = Vector4(p_wx, p_wy, p_wz, p_ww);
921+
}
922+
916923
Projection::Projection(const Transform3D &p_transform) {
917924
const Transform3D &tr = p_transform;
918925
real_t *m = &columns[0][0];

0 commit comments

Comments
 (0)