Merge pull request #25727 from aaronfranke/matrix3-basis
[Core] Rename Matrix3 file to Basis
This commit is contained in:
commit
b6e03d927e
11 changed files with 15 additions and 15 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* matrix3.cpp */
|
/* basis.cpp */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* This file is part of: */
|
/* This file is part of: */
|
||||||
/* GODOT ENGINE */
|
/* GODOT ENGINE */
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
#include "matrix3.h"
|
#include "basis.h"
|
||||||
|
|
||||||
#include "core/math/math_funcs.h"
|
#include "core/math/math_funcs.h"
|
||||||
#include "core/os/copymem.h"
|
#include "core/os/copymem.h"
|
|
@ -1,5 +1,5 @@
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* matrix3.h */
|
/* basis.h */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* This file is part of: */
|
/* This file is part of: */
|
||||||
/* GODOT ENGINE */
|
/* GODOT ENGINE */
|
||||||
|
@ -31,8 +31,8 @@
|
||||||
// Circular dependency between Vector3 and Basis :/
|
// Circular dependency between Vector3 and Basis :/
|
||||||
#include "core/math/vector3.h"
|
#include "core/math/vector3.h"
|
||||||
|
|
||||||
#ifndef MATRIX3_H
|
#ifndef BASIS_H
|
||||||
#define MATRIX3_H
|
#define BASIS_H
|
||||||
|
|
||||||
#include "core/math/quat.h"
|
#include "core/math/quat.h"
|
||||||
|
|
||||||
|
@ -341,4 +341,4 @@ real_t Basis::determinant() const {
|
||||||
elements[1][0] * (elements[0][1] * elements[2][2] - elements[2][1] * elements[0][2]) +
|
elements[1][0] * (elements[0][1] * elements[2][2] - elements[2][1] * elements[0][2]) +
|
||||||
elements[2][0] * (elements[0][1] * elements[1][2] - elements[1][1] * elements[0][2]);
|
elements[2][0] * (elements[0][1] * elements[1][2] - elements[1][1] * elements[0][2]);
|
||||||
}
|
}
|
||||||
#endif
|
#endif // BASIS_H
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
#include "quat.h"
|
#include "quat.h"
|
||||||
|
|
||||||
#include "core/math/matrix3.h"
|
#include "core/math/basis.h"
|
||||||
#include "core/print_string.h"
|
#include "core/print_string.h"
|
||||||
|
|
||||||
// set_euler_xyz expects a vector containing the Euler angles in the format
|
// set_euler_xyz expects a vector containing the Euler angles in the format
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
#define TRANSFORM_H
|
#define TRANSFORM_H
|
||||||
|
|
||||||
#include "core/math/aabb.h"
|
#include "core/math/aabb.h"
|
||||||
#include "core/math/matrix3.h"
|
#include "core/math/basis.h"
|
||||||
#include "core/math/plane.h"
|
#include "core/math/plane.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
#include "vector3.h"
|
#include "vector3.h"
|
||||||
|
|
||||||
#include "core/math/matrix3.h"
|
#include "core/math/basis.h"
|
||||||
|
|
||||||
void Vector3::rotate(const Vector3 &p_axis, real_t p_phi) {
|
void Vector3::rotate(const Vector3 &p_axis, real_t p_phi) {
|
||||||
|
|
||||||
|
|
|
@ -151,7 +151,7 @@ struct Vector3 {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Should be included after class definition, otherwise we get circular refs
|
// Should be included after class definition, otherwise we get circular refs
|
||||||
#include "core/math/matrix3.h"
|
#include "core/math/basis.h"
|
||||||
|
|
||||||
Vector3 Vector3::cross(const Vector3 &p_b) const {
|
Vector3 Vector3::cross(const Vector3 &p_b) const {
|
||||||
|
|
||||||
|
|
|
@ -41,8 +41,8 @@
|
||||||
#include "core/dvector.h"
|
#include "core/dvector.h"
|
||||||
#include "core/io/ip_address.h"
|
#include "core/io/ip_address.h"
|
||||||
#include "core/math/aabb.h"
|
#include "core/math/aabb.h"
|
||||||
|
#include "core/math/basis.h"
|
||||||
#include "core/math/face3.h"
|
#include "core/math/face3.h"
|
||||||
#include "core/math/matrix3.h"
|
|
||||||
#include "core/math/plane.h"
|
#include "core/math/plane.h"
|
||||||
#include "core/math/quat.h"
|
#include "core/math/quat.h"
|
||||||
#include "core/math/transform.h"
|
#include "core/math/transform.h"
|
||||||
|
|
|
@ -30,9 +30,9 @@
|
||||||
|
|
||||||
#include "test_math.h"
|
#include "test_math.h"
|
||||||
|
|
||||||
|
#include "core/math/basis.h"
|
||||||
#include "core/math/camera_matrix.h"
|
#include "core/math/camera_matrix.h"
|
||||||
#include "core/math/math_funcs.h"
|
#include "core/math/math_funcs.h"
|
||||||
#include "core/math/matrix3.h"
|
|
||||||
#include "core/math/transform.h"
|
#include "core/math/transform.h"
|
||||||
#include "core/os/file_access.h"
|
#include "core/os/file_access.h"
|
||||||
#include "core/os/keyboard.h"
|
#include "core/os/keyboard.h"
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
#ifndef BULLET_TYPES_CONVERTER_H
|
#ifndef BULLET_TYPES_CONVERTER_H
|
||||||
#define BULLET_TYPES_CONVERTER_H
|
#define BULLET_TYPES_CONVERTER_H
|
||||||
|
|
||||||
#include "core/math/matrix3.h"
|
#include "core/math/basis.h"
|
||||||
#include "core/math/transform.h"
|
#include "core/math/transform.h"
|
||||||
#include "core/math/vector3.h"
|
#include "core/math/vector3.h"
|
||||||
#include "core/typedefs.h"
|
#include "core/typedefs.h"
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
#include "gdnative/basis.h"
|
#include "gdnative/basis.h"
|
||||||
|
|
||||||
#include "core/math/matrix3.h"
|
#include "core/math/basis.h"
|
||||||
#include "core/variant.h"
|
#include "core/variant.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -652,7 +652,7 @@ void BodySW::simulate_motion(const Transform& p_xform,real_t p_step) {
|
||||||
linear_velocity=(p_xform.origin - get_transform().origin)/p_step;
|
linear_velocity=(p_xform.origin - get_transform().origin)/p_step;
|
||||||
|
|
||||||
//compute a FAKE angular velocity, not so easy
|
//compute a FAKE angular velocity, not so easy
|
||||||
Matrix3 rot=get_transform().basis.orthonormalized().transposed() * p_xform.basis.orthonormalized();
|
Basis rot=get_transform().basis.orthonormalized().transposed() * p_xform.basis.orthonormalized();
|
||||||
Vector3 axis;
|
Vector3 axis;
|
||||||
real_t angle;
|
real_t angle;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue