diff options
author | Hein-Pieter van Braam <hp@tmm.cx> | 2017-09-07 08:57:09 +0200 |
---|---|---|
committer | Hein-Pieter van Braam <hp@tmm.cx> | 2017-09-08 00:20:16 +0200 |
commit | 5e18967d7730f162aa111b2972e3fdc80ee52579 (patch) | |
tree | 03dc5c7bec497370bc24a7254992a6e986495bf9 /core | |
parent | eedb39091aaa1dc0b8f204844bb1eb270b2349f6 (diff) |
Fix serveral recent new clang-format errors
Diffstat (limited to 'core')
-rw-r--r-- | core/math/camera_matrix.cpp | 28 | ||||
-rw-r--r-- | core/math/camera_matrix.h | 1 |
2 files changed, 13 insertions, 16 deletions
diff --git a/core/math/camera_matrix.cpp b/core/math/camera_matrix.cpp index 572a6c5239..b7a929c8e0 100644 --- a/core/math/camera_matrix.cpp +++ b/core/math/camera_matrix.cpp @@ -266,27 +266,26 @@ void CameraMatrix::get_viewport_size(real_t &r_width, real_t &r_height) const { bool CameraMatrix::get_endpoints(const Transform &p_transform, Vector3 *p_8points) const { Vector<Plane> planes = get_projection_planes(Transform()); - const Planes intersections[8][3]={ - {PLANE_FAR,PLANE_LEFT,PLANE_TOP}, - {PLANE_FAR,PLANE_LEFT,PLANE_BOTTOM}, - {PLANE_FAR,PLANE_RIGHT,PLANE_TOP}, - {PLANE_FAR,PLANE_RIGHT,PLANE_BOTTOM}, - {PLANE_NEAR,PLANE_LEFT,PLANE_TOP}, - {PLANE_NEAR,PLANE_LEFT,PLANE_BOTTOM}, - {PLANE_NEAR,PLANE_RIGHT,PLANE_TOP}, - {PLANE_NEAR,PLANE_RIGHT,PLANE_BOTTOM}, + const Planes intersections[8][3] = { + { PLANE_FAR, PLANE_LEFT, PLANE_TOP }, + { PLANE_FAR, PLANE_LEFT, PLANE_BOTTOM }, + { PLANE_FAR, PLANE_RIGHT, PLANE_TOP }, + { PLANE_FAR, PLANE_RIGHT, PLANE_BOTTOM }, + { PLANE_NEAR, PLANE_LEFT, PLANE_TOP }, + { PLANE_NEAR, PLANE_LEFT, PLANE_BOTTOM }, + { PLANE_NEAR, PLANE_RIGHT, PLANE_TOP }, + { PLANE_NEAR, PLANE_RIGHT, PLANE_BOTTOM }, }; - for(int i=0;i<8;i++) { + for (int i = 0; i < 8; i++) { Vector3 point; - bool res = planes[intersections[i][0]].intersect_3(planes[intersections[i][1]],planes[intersections[i][2]], &point); + bool res = planes[intersections[i][0]].intersect_3(planes[intersections[i][1]], planes[intersections[i][2]], &point); ERR_FAIL_COND_V(!res, false); - p_8points[i]=p_transform.xform(point); + p_8points[i] = p_transform.xform(point); } return true; - } Vector<Plane> CameraMatrix::get_projection_planes(const Transform &p_transform) const { @@ -564,10 +563,9 @@ int CameraMatrix::get_pixels_per_meter(int p_for_pixel_width) const { bool CameraMatrix::is_orthogonal() const { - return matrix[3][3]==1.0; + return matrix[3][3] == 1.0; } - real_t CameraMatrix::get_fov() const { const real_t *matrix = (const real_t *)this->matrix; diff --git a/core/math/camera_matrix.h b/core/math/camera_matrix.h index 87cc4b95b8..3145d73356 100644 --- a/core/math/camera_matrix.h +++ b/core/math/camera_matrix.h @@ -84,7 +84,6 @@ struct CameraMatrix { Plane xform4(const Plane &p_vec4) const; _FORCE_INLINE_ Vector3 xform(const Vector3 &p_vec3) const; - operator String() const; void scale_translate_to_fit(const Rect3 &p_aabb); |