diff options
| author | Rémi Verschelde | 2017-03-05 16:44:50 +0100 |
|---|---|---|
| committer | Rémi Verschelde | 2017-03-05 16:44:50 +0100 |
| commit | 5dbf1809c6e3e905b94b8764e99491e608122261 (patch) | |
| tree | 5e5a5360db15d86d59ec8c6e4f7eb511388c5a9a /core/math/triangle_mesh.h | |
| parent | 45438e9918d421b244bfd7776a30e67dc7f2d3e3 (diff) | |
| download | godot-5dbf180.tar.gz godot-5dbf180.tar.zst godot-5dbf180.zip | |
A Whole New World (clang-format edition)
I can show you the code
Pretty, with proper whitespace
Tell me, coder, now when did
You last write readable code?
I can open your eyes
Make you see your bad indent
Force you to respect the style
The core devs agreed upon
A whole new world
A new fantastic code format
A de facto standard
With some sugar
Enforced with clang-format
A whole new world
A dazzling style we all dreamed of
And when we read it through
It's crystal clear
That now we're in a whole new world of code
Diffstat (limited to 'core/math/triangle_mesh.h')
| -rw-r--r-- | core/math/triangle_mesh.h | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/core/math/triangle_mesh.h b/core/math/triangle_mesh.h index 65250c023..7f81e5461 100644 --- a/core/math/triangle_mesh.h +++ b/core/math/triangle_mesh.h @@ -29,11 +29,11 @@ #ifndef TRIANGLE_MESH_H #define TRIANGLE_MESH_H -#include "reference.h" #include "face3.h" +#include "reference.h" class TriangleMesh : public Reference { - GDCLASS( TriangleMesh, Reference); + GDCLASS(TriangleMesh, Reference); struct Triangle { @@ -56,7 +56,7 @@ class TriangleMesh : public Reference { struct BVHCmpX { - bool operator()(const BVH* p_left, const BVH* p_right) const { + bool operator()(const BVH *p_left, const BVH *p_right) const { return p_left->center.x < p_right->center.x; } @@ -64,35 +64,33 @@ class TriangleMesh : public Reference { struct BVHCmpY { - bool operator()(const BVH* p_left, const BVH* p_right) const { + bool operator()(const BVH *p_left, const BVH *p_right) const { return p_left->center.y < p_right->center.y; } }; struct BVHCmpZ { - bool operator()(const BVH* p_left, const BVH* p_right) const { + bool operator()(const BVH *p_left, const BVH *p_right) const { return p_left->center.z < p_right->center.z; } }; - int _create_bvh(BVH*p_bvh,BVH** p_bb,int p_from,int p_size,int p_depth,int&max_depth,int&max_alloc); + int _create_bvh(BVH *p_bvh, BVH **p_bb, int p_from, int p_size, int p_depth, int &max_depth, int &max_alloc); PoolVector<BVH> bvh; int max_depth; bool valid; public: - bool is_valid() const; - bool intersect_segment(const Vector3& p_begin,const Vector3& p_end,Vector3 &r_point, Vector3 &r_normal) const; - bool intersect_ray(const Vector3& p_begin,const Vector3& p_dir,Vector3 &r_point, Vector3 &r_normal) const; - Vector3 get_area_normal(const Rect3& p_aabb) const; + bool intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_point, Vector3 &r_normal) const; + bool intersect_ray(const Vector3 &p_begin, const Vector3 &p_dir, Vector3 &r_point, Vector3 &r_normal) const; + Vector3 get_area_normal(const Rect3 &p_aabb) const; PoolVector<Face3> get_faces() const; - - void create(const PoolVector<Vector3>& p_faces); + void create(const PoolVector<Vector3> &p_faces); TriangleMesh(); }; |
