summaryrefslogtreecommitdiff
path: root/core/math
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2017-01-14 12:26:56 +0100
committerRémi Verschelde <rverschelde@gmail.com>2017-01-14 14:52:23 +0100
commit93ab45b6b5c4f8e0619e963156c983009d399a9d (patch)
tree80e55993f29ad7bf502ef7388eef78114b2dc4ab /core/math
parent78e90ac60b81f17fdf8c319357f16962e92e6106 (diff)
Style: Fix whole-line commented code
They do not play well with clang-format which aligns the `//` part with the rest of the code block, thus producing badly indented commented code.
Diffstat (limited to 'core/math')
-rw-r--r--core/math/bsp_tree.cpp8
-rw-r--r--core/math/geometry.h2
-rw-r--r--core/math/octree.h18
-rw-r--r--core/math/quick_hull.cpp2
-rw-r--r--core/math/triangle_mesh.cpp2
-rw-r--r--core/math/triangulator.cpp2
6 files changed, 20 insertions, 14 deletions
diff --git a/core/math/bsp_tree.cpp b/core/math/bsp_tree.cpp
index b888b6b56c..e2526f5134 100644
--- a/core/math/bsp_tree.cpp
+++ b/core/math/bsp_tree.cpp
@@ -390,8 +390,10 @@ static int _bsp_create_node(const Face3 *p_faces,const Vector<int>& p_indices,Ve
const Face3& f=p_faces[ indices[i] ];
- //if (f.get_plane().is_almost_like(divisor_plane))
- // continue;
+ /*
+ if (f.get_plane().is_almost_like(divisor_plane))
+ continue;
+ */
int over_count=0;
int under_count=0;
@@ -546,7 +548,7 @@ BSP_Tree::BSP_Tree(const Variant& p_variant) {
error_radius = d["error"];
aabb = d["aabb"];
-// int node_count = src_nodes.size();
+ //int node_count = src_nodes.size();
nodes.resize(src_nodes.size()/3);
PoolVector<int>::Read r = src_nodes.read();
diff --git a/core/math/geometry.h b/core/math/geometry.h
index 9800e5513c..d5b3a3068c 100644
--- a/core/math/geometry.h
+++ b/core/math/geometry.h
@@ -750,9 +750,7 @@ public:
return Vector<Vector3>(); //empty
}
-// long count = 0;
long previous = polygon.size() - 1;
-
Vector<Vector3> clipped;
for (int index = 0; index < polygon.size(); index++) {
diff --git a/core/math/octree.h b/core/math/octree.h
index 1a41413a76..483ba1d510 100644
--- a/core/math/octree.h
+++ b/core/math/octree.h
@@ -130,8 +130,10 @@ private:
~Octant() {
- //for (int i=0;i<8;i++)
- // memdelete_notnull(children[i]);
+ /*
+ for (int i=0;i<8;i++)
+ memdelete_notnull(children[i]);
+ */
}
};
@@ -250,8 +252,10 @@ private:
E->get().eA=p_A->pair_list.push_back(&E->get());
E->get().eB=p_B->pair_list.push_back(&E->get());
-// if (pair_callback)
-// pair_callback(pair_callback_userdata,p_A->userdata,p_B->userdata);
+ /*
+ if (pair_callback)
+ pair_callback(pair_callback_userdata,p_A->userdata,p_B->userdata);
+ */
} else {
E->get().refcount++;
@@ -970,8 +974,10 @@ void Octree<T,use_pairs,AL>::move(OctreeElementID p_id, const Rect3& p_aabb) {
Octant *o=E->get().octant;
typename List<typename Element::OctantOwner,AL>::Element *N=E->next();
-// if (!use_pairs)
-// o->elements.erase( E->get().E );
+ /*
+ if (!use_pairs)
+ o->elements.erase( E->get().E );
+ */
if (use_pairs && e.pairable)
o->pairable_elements.erase( E->get().E );
diff --git a/core/math/quick_hull.cpp b/core/math/quick_hull.cpp
index ab81a068d4..756e48d0b4 100644
--- a/core/math/quick_hull.cpp
+++ b/core/math/quick_hull.cpp
@@ -483,7 +483,7 @@ Error QuickHull::build(const Vector<Vector3>& p_points, Geometry::MeshData &r_me
//fill mesh
r_mesh.faces.clear();
r_mesh.faces.resize(ret_faces.size());
-// print_line("FACECOUNT: "+itos(r_mesh.faces.size()));
+ //print_line("FACECOUNT: "+itos(r_mesh.faces.size()));
int idx=0;
for (List<Geometry::MeshData::Face>::Element *E=ret_faces.front();E;E=E->next()) {
diff --git a/core/math/triangle_mesh.cpp b/core/math/triangle_mesh.cpp
index fc5f55066b..74c4656771 100644
--- a/core/math/triangle_mesh.cpp
+++ b/core/math/triangle_mesh.cpp
@@ -320,7 +320,7 @@ bool TriangleMesh::intersect_segment(const Vector3& p_begin,const Vector3& p_end
bool valid = b.aabb.intersects_segment(p_begin,p_end);
-// bool valid = b.aabb.intersects(ray_aabb);
+ //bool valid = b.aabb.intersects(ray_aabb);
if (!valid) {
diff --git a/core/math/triangulator.cpp b/core/math/triangulator.cpp
index 8f82d76823..75b2b064c4 100644
--- a/core/math/triangulator.cpp
+++ b/core/math/triangulator.cpp
@@ -1128,7 +1128,7 @@ int TriangulatorPartition::MonotonePartition(List<TriangulatorPoly> *inpolys, Li
//this makes deleting existing edges much faster
Set<ScanLineEdge>::Element **edgeTreeIterators,*edgeIter;
edgeTreeIterators = new Set<ScanLineEdge>::Element*[maxnumvertices];
-// Pair<Set<ScanLineEdge>::Element*,bool> edgeTreeRet;
+ //Pair<Set<ScanLineEdge>::Element*,bool> edgeTreeRet;
for(i = 0; i<numvertices; i++) edgeTreeIterators[i] = NULL;
//for each vertex