mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-11-22 08:57:34 +01:00
Now Basis::get_uniform_scale() returns a real_t instead of a float.
This commit is contained in:
parent
47e637b2b8
commit
0f6fb760ad
@ -216,6 +216,10 @@ Basis Basis::transposed() const {
|
||||
return tr;
|
||||
}
|
||||
|
||||
Basis Basis::from_scale(const Vector3 &p_scale) {
|
||||
return Basis(p_scale.x, 0, 0, 0, p_scale.y, 0, 0, 0, p_scale.z);
|
||||
}
|
||||
|
||||
// Multiplies the matrix from left by the scaling matrix: M -> S.M
|
||||
// See the comment for Basis::rotated for further explanation.
|
||||
void Basis::scale(const Vector3 &p_scale) {
|
||||
@ -267,7 +271,7 @@ Basis Basis::scaled_orthogonal(const Vector3 &p_scale) const {
|
||||
return m;
|
||||
}
|
||||
|
||||
float Basis::get_uniform_scale() const {
|
||||
real_t Basis::get_uniform_scale() const {
|
||||
return (rows[0].length() + rows[1].length() + rows[2].length()) / 3.0f;
|
||||
}
|
||||
|
||||
@ -1193,4 +1197,3 @@ Basis Basis::looking_at(const Vector3 &p_target, const Vector3 &p_up) {
|
||||
basis.set_columns(v_x, v_y, v_z);
|
||||
return basis;
|
||||
}
|
||||
|
||||
|
@ -122,7 +122,7 @@ struct _NO_DISCARD_CLASS_ Basis {
|
||||
Basis scaled_orthogonal(const Vector3 &p_scale) const;
|
||||
|
||||
void make_scale_uniform();
|
||||
float get_uniform_scale() const;
|
||||
real_t get_uniform_scale() const;
|
||||
|
||||
Vector3 get_scale() const;
|
||||
Vector3 get_scale_abs() const;
|
||||
|
Loading…
Reference in New Issue
Block a user