1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Updated copyright year in all headers

This commit is contained in:
Juan Linietsky
2015-04-18 14:38:54 -03:00
parent 6b3cd13c8d
commit fdaa2920eb
1109 changed files with 3362 additions and 3362 deletions

View File

@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -26,74 +26,74 @@
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#ifndef TRIANGLE_MESH_H
#define TRIANGLE_MESH_H
#include "reference.h"
#include "face3.h"
class TriangleMesh : public Reference {
OBJ_TYPE( TriangleMesh, Reference);
struct Triangle {
Vector3 normal;
int indices[3];
};
DVector<Triangle> triangles;
DVector<Vector3> vertices;
struct BVH {
AABB aabb;
Vector3 center; //used for sorting
int left;
int right;
int face_index;
};
struct BVHCmpX {
bool operator()(const BVH* p_left, const BVH* p_right) const {
return p_left->center.x < p_right->center.x;
}
};
struct BVHCmpY {
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 {
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);
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;
DVector<Face3> get_faces() const;
void create(const DVector<Vector3>& p_faces);
TriangleMesh();
};
#endif // TRIANGLE_MESH_H
#ifndef TRIANGLE_MESH_H
#define TRIANGLE_MESH_H
#include "reference.h"
#include "face3.h"
class TriangleMesh : public Reference {
OBJ_TYPE( TriangleMesh, Reference);
struct Triangle {
Vector3 normal;
int indices[3];
};
DVector<Triangle> triangles;
DVector<Vector3> vertices;
struct BVH {
AABB aabb;
Vector3 center; //used for sorting
int left;
int right;
int face_index;
};
struct BVHCmpX {
bool operator()(const BVH* p_left, const BVH* p_right) const {
return p_left->center.x < p_right->center.x;
}
};
struct BVHCmpY {
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 {
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);
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;
DVector<Face3> get_faces() const;
void create(const DVector<Vector3>& p_faces);
TriangleMesh();
};
#endif // TRIANGLE_MESH_H