clang-format: Various fixes to comments alignment from clang-format 13
All reviewed manually and occasionally rewritten to avoid bad auto formatting.
This commit is contained in:
parent
3b11e33a09
commit
3a6be64c12
43 changed files with 368 additions and 485 deletions
|
|
@ -42,24 +42,24 @@ BVHABB_CLASS _logic_abb_merge(const BVHABB_CLASS &a, const BVHABB_CLASS &b) {
|
|||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
@file q3DynamicAABBTree.h
|
||||
@author Randy Gaul
|
||||
@date 10/10/2014
|
||||
Copyright (c) 2014 Randy Gaul http://www.randygaul.net
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not
|
||||
be misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
* @file q3DynamicAABBTree.h
|
||||
* @author Randy Gaul
|
||||
* @date 10/10/2014
|
||||
* Copyright (c) 2014 Randy Gaul http://www.randygaul.net
|
||||
* This software is provided 'as-is', without any express or implied
|
||||
* warranty. In no event will the authors be held liable for any damages
|
||||
* arising from the use of this software.
|
||||
* Permission is granted to anyone to use this software for any purpose,
|
||||
* including commercial applications, and to alter it and redistribute it
|
||||
* freely, subject to the following restrictions:
|
||||
* 1. The origin of this software must not be misrepresented; you must not
|
||||
* claim that you wrote the original software. If you use this software
|
||||
* in a product, an acknowledgment in the product documentation would be
|
||||
* appreciated but is not required.
|
||||
* 2. Altered source versions must be plainly marked as such, and must not
|
||||
* be misrepresented as being the original software.
|
||||
* 3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
// This function is based on the 'Balance' function from Randy Gaul's qu3e
|
||||
|
|
@ -67,7 +67,7 @@ BVHABB_CLASS _logic_abb_merge(const BVHABB_CLASS &a, const BVHABB_CLASS &b) {
|
|||
// It is MODIFIED from qu3e version.
|
||||
// This is the only function used (and _logic_abb_merge helper function).
|
||||
int32_t _logic_balance(int32_t iA, uint32_t p_tree_id) {
|
||||
// return iA; // uncomment this to bypass balance
|
||||
//return iA; // uncomment this to bypass balance
|
||||
|
||||
TNode *A = &_nodes[iA];
|
||||
|
||||
|
|
@ -75,12 +75,12 @@ int32_t _logic_balance(int32_t iA, uint32_t p_tree_id) {
|
|||
return iA;
|
||||
}
|
||||
|
||||
/* A
|
||||
/ \
|
||||
B C
|
||||
/ \ / \
|
||||
D E F G
|
||||
*/
|
||||
/* A
|
||||
* / \
|
||||
* B C
|
||||
* / \ / \
|
||||
* D E F G
|
||||
*/
|
||||
|
||||
CRASH_COND(A->num_children != 2);
|
||||
int32_t iB = A->children[0];
|
||||
|
|
|
|||
|
|
@ -735,8 +735,6 @@ int32_t ConvexHullInternal::Rational64::compare(const Rational64 &b) const {
|
|||
return 0;
|
||||
}
|
||||
|
||||
// return (numerator * b.denominator > b.numerator * denominator) ? sign : (numerator * b.denominator < b.numerator * denominator) ? -sign : 0;
|
||||
|
||||
#ifdef USE_X86_64_ASM
|
||||
|
||||
int32_t result;
|
||||
|
|
@ -757,10 +755,9 @@ int32_t ConvexHullInternal::Rational64::compare(const Rational64 &b) const {
|
|||
: "=&b"(result), [tmp] "=&r"(tmp), "=a"(dummy)
|
||||
: "a"(denominator), [bn] "g"(b.numerator), [tn] "g"(numerator), [bd] "g"(b.denominator)
|
||||
: "%rdx", "cc");
|
||||
return result ? result ^ sign // if sign is +1, only bit 0 of result is inverted, which does not change the sign of result (and cannot result in zero)
|
||||
// if sign is -1, all bits of result are inverted, which changes the sign of result (and again cannot result in zero)
|
||||
:
|
||||
0;
|
||||
// if sign is +1, only bit 0 of result is inverted, which does not change the sign of result (and cannot result in zero)
|
||||
// if sign is -1, all bits of result are inverted, which changes the sign of result (and again cannot result in zero)
|
||||
return result ? result ^ sign : 0;
|
||||
|
||||
#else
|
||||
|
||||
|
|
|
|||
|
|
@ -48,13 +48,13 @@ public:
|
|||
Vector3 vertex[3];
|
||||
|
||||
/**
|
||||
*
|
||||
* @param p_plane plane used to split the face
|
||||
* @param p_res array of at least 3 faces, amount used in function return
|
||||
* @param p_is_point_over array of at least 3 booleans, determining which face is over the plane, amount used in function return
|
||||
* @param _epsilon constant used for numerical error rounding, to add "thickness" to the plane (so coplanar points can happen)
|
||||
* @return amount of faces generated by the split, either 0 (means no split possible), 2 or 3
|
||||
*/
|
||||
*
|
||||
* @param p_plane plane used to split the face
|
||||
* @param p_res array of at least 3 faces, amount used in function return
|
||||
* @param p_is_point_over array of at least 3 booleans, determining which face is over the plane, amount used in function return
|
||||
* @param _epsilon constant used for numerical error rounding, to add "thickness" to the plane (so coplanar points can happen)
|
||||
* @return amount of faces generated by the split, either 0 (means no split possible), 2 or 3
|
||||
*/
|
||||
|
||||
int split_by_plane(const Plane &p_plane, Face3 *p_res, bool *p_is_point_over) const;
|
||||
|
||||
|
|
|
|||
|
|
@ -116,10 +116,10 @@ enum Corner {
|
|||
};
|
||||
|
||||
/**
|
||||
* The "Real" type is an abstract type used for real numbers, such as 1.5,
|
||||
* in contrast to integer numbers. Precision can be controlled with the
|
||||
* presence or absence of the REAL_T_IS_DOUBLE define.
|
||||
*/
|
||||
* The "Real" type is an abstract type used for real numbers, such as 1.5,
|
||||
* in contrast to integer numbers. Precision can be controlled with the
|
||||
* presence or absence of the REAL_T_IS_DOUBLE define.
|
||||
*/
|
||||
#ifdef REAL_T_IS_DOUBLE
|
||||
typedef double real_t;
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -42,18 +42,13 @@ real_t Triangulate::get_area(const Vector<Vector2> &contour) {
|
|||
return A * 0.5;
|
||||
}
|
||||
|
||||
/*
|
||||
is_inside_triangle decides if a point P is Inside of the triangle
|
||||
defined by A, B, C.
|
||||
*/
|
||||
|
||||
/* `is_inside_triangle` decides if a point P is inside the triangle
|
||||
* defined by A, B, C. */
|
||||
bool Triangulate::is_inside_triangle(real_t Ax, real_t Ay,
|
||||
real_t Bx, real_t By,
|
||||
real_t Cx, real_t Cy,
|
||||
real_t Px, real_t Py,
|
||||
bool include_edges)
|
||||
|
||||
{
|
||||
bool include_edges) {
|
||||
real_t ax, ay, bx, by, cx, cy, apx, apy, bpx, bpy, cpx, cpy;
|
||||
real_t cCROSSap, bCROSScp, aCROSSbp;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue