1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-15 13:51:40 +00:00

Bring that Whole New World to the Old Continent too

Applies the clang-format style to the 2.1 branch as done for master in
5dbf1809c6.
This commit is contained in:
Rémi Verschelde
2017-03-19 00:36:26 +01:00
parent 1d418afe86
commit f8db8a3faa
1308 changed files with 147754 additions and 174357 deletions

View File

@@ -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 {
OBJ_TYPE( TriangleMesh, Reference);
OBJ_TYPE(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);
DVector<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 AABB& 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 AABB &p_aabb) const;
DVector<Face3> get_faces() const;
void create(const DVector<Vector3>& p_faces);
void create(const DVector<Vector3> &p_faces);
TriangleMesh();
};