Merge pull request #99563 from akien-mga/fix-projection-stringification
Fix stringification of Projection
This commit is contained in:
@ -912,14 +912,10 @@ void Projection::set_light_atlas_rect(const Rect2 &p_rect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Projection::operator String() const {
|
Projection::operator String() const {
|
||||||
String str;
|
return "[X: " + columns[0].operator String() +
|
||||||
for (int i = 0; i < 4; i++) {
|
", Y: " + columns[1].operator String() +
|
||||||
for (int j = 0; j < 4; j++) {
|
", Z: " + columns[2].operator String() +
|
||||||
str += String((j > 0) ? ", " : "\n") + rtos(columns[i][j]);
|
", W: " + columns[3].operator String() + "]";
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return str;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
real_t Projection::get_aspect() const {
|
real_t Projection::get_aspect() const {
|
||||||
|
|||||||
@ -22,6 +22,7 @@ func test():
|
|||||||
print(AABB(Vector3.ZERO, Vector3.ONE))
|
print(AABB(Vector3.ZERO, Vector3.ONE))
|
||||||
print(Basis.from_euler(Vector3(0, 0, 0)))
|
print(Basis.from_euler(Vector3(0, 0, 0)))
|
||||||
print(Transform3D.IDENTITY)
|
print(Transform3D.IDENTITY)
|
||||||
|
print(Projection.IDENTITY)
|
||||||
|
|
||||||
print(Color(1, 2, 3, 4))
|
print(Color(1, 2, 3, 4))
|
||||||
print(StringName("hello"))
|
print(StringName("hello"))
|
||||||
|
|||||||
@ -17,6 +17,7 @@ hello world
|
|||||||
[P: (0.0, 0.0, 0.0), S: (1.0, 1.0, 1.0)]
|
[P: (0.0, 0.0, 0.0), S: (1.0, 1.0, 1.0)]
|
||||||
[X: (1.0, 0.0, 0.0), Y: (0.0, 1.0, 0.0), Z: (0.0, 0.0, 1.0)]
|
[X: (1.0, 0.0, 0.0), Y: (0.0, 1.0, 0.0), Z: (0.0, 0.0, 1.0)]
|
||||||
[X: (1.0, 0.0, 0.0), Y: (0.0, 1.0, 0.0), Z: (0.0, 0.0, 1.0), O: (0.0, 0.0, 0.0)]
|
[X: (1.0, 0.0, 0.0), Y: (0.0, 1.0, 0.0), Z: (0.0, 0.0, 1.0), O: (0.0, 0.0, 0.0)]
|
||||||
|
[X: (1.0, 0.0, 0.0, 0.0), Y: (0.0, 1.0, 0.0, 0.0), Z: (0.0, 0.0, 1.0, 0.0), W: (0.0, 0.0, 0.0, 1.0)]
|
||||||
(1.0, 2.0, 3.0, 4.0)
|
(1.0, 2.0, 3.0, 4.0)
|
||||||
hello
|
hello
|
||||||
hello/world
|
hello/world
|
||||||
|
|||||||
Reference in New Issue
Block a user