mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-11-24 01:47:20 +01:00
Added non-static looking_at and from_scale helper methods to Basis.
This commit is contained in:
parent
6ac0c2bbc0
commit
010e1b51a8
@ -239,6 +239,13 @@ Basis Basis::create_from_scale(const Vector3 &p_scale) {
|
||||
return Basis(p_scale.x, 0, 0, 0, p_scale.y, 0, 0, 0, p_scale.z);
|
||||
}
|
||||
|
||||
Basis Basis::looking_at(const Vector3 &p_target, const Vector3 &p_up) {
|
||||
return Basis::create_looking_at(p_target, p_up);
|
||||
}
|
||||
Basis Basis::from_scale(const Vector3 &p_scale) {
|
||||
return Basis::create_from_scale(p_scale);
|
||||
}
|
||||
|
||||
// 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) {
|
||||
|
@ -289,6 +289,9 @@ struct _NO_DISCARD_CLASS_ Basis {
|
||||
static Basis create_looking_at(const Vector3 &p_target, const Vector3 &p_up = Vector3(0, 1, 0));
|
||||
static Basis create_from_scale(const Vector3 &p_scale);
|
||||
|
||||
Basis looking_at(const Vector3 &p_target, const Vector3 &p_up = Vector3(0, 1, 0));
|
||||
Basis from_scale(const Vector3 &p_scale);
|
||||
|
||||
operator Quaternion() const { return get_quaternion(); }
|
||||
|
||||
Basis(const Quaternion &p_quat) { set_quaternion(p_quat); }
|
||||
|
Loading…
Reference in New Issue
Block a user