Code-style consistency improvement:

Apply clang-format-all.sh using the _clang-format file through all the cpp/.h files.
make sure not to apply it to certain serialization structures, since some parser expects the * as part of the name, instead of type.
This commit contains no other changes aside from adding and applying clang-format-all.sh
This commit is contained in:
erwincoumans
2018-09-23 14:17:31 -07:00
parent b73b05e9fb
commit ab8f16961e
1773 changed files with 1081087 additions and 474249 deletions

View File

@@ -5,7 +5,6 @@
#include "LinearMath/btAabbUtil2.h"
#include "LinearMath/btAlignedObjectArray.h"
struct btMultiIndex
{
unsigned int ijk[3];
@@ -25,7 +24,6 @@ struct btAlignedBox3d
{
return m_max;
}
bool contains(const btVector3& x) const
{
@@ -33,8 +31,8 @@ struct btAlignedBox3d
}
btAlignedBox3d(const btVector3& mn, const btVector3& mx)
:m_min(mn),
m_max(mx)
: m_min(mn),
m_max(mx)
{
}
@@ -47,39 +45,38 @@ struct btShapeMatrix
{
double m_vec[32];
inline double& operator[](int i)
inline double& operator[](int i)
{
return m_vec[i];
}
inline const double& operator[](int i) const
inline const double& operator[](int i) const
{
return m_vec[i];
}
};
struct btShapeGradients
{
btVector3 m_vec[32];
btVector3 m_vec[32];
void topRowsDivide(int row, double denom)
{
for (int i=0;i<row;i++)
for (int i = 0; i < row; i++)
{
m_vec[i] /= denom;
}
}
void bottomRowsMul(int row, double val)
{
for (int i=32-row;i<32;i++)
for (int i = 32 - row; i < 32; i++)
{
m_vec[i] *= val;
}
}
inline btScalar& operator()(int i, int j)
inline btScalar& operator()(int i, int j)
{
return m_vec[i][j];
}
@@ -92,7 +89,6 @@ struct btCell32
struct btMiniSDF
{
btAlignedBox3d m_domain;
unsigned int m_resolution[3];
btVector3 m_cell_size;
@@ -101,13 +97,12 @@ struct btMiniSDF
std::size_t m_n_fields;
bool m_isValid;
btAlignedObjectArray<btAlignedObjectArray<double> > m_nodes;
btAlignedObjectArray<btAlignedObjectArray<btCell32 > > m_cells;
btAlignedObjectArray<btAlignedObjectArray<btCell32> > m_cells;
btAlignedObjectArray<btAlignedObjectArray<unsigned int> > m_cell_map;
btMiniSDF()
:m_isValid(false)
: m_isValid(false)
{
}
bool load(const char* data, int size);
@@ -115,20 +110,18 @@ struct btMiniSDF
{
return m_isValid;
}
unsigned int multiToSingleIndex(btMultiIndex const & ijk) const;
unsigned int multiToSingleIndex(btMultiIndex const& ijk) const;
btAlignedBox3d subdomain(btMultiIndex const& ijk) const;
btMultiIndex singleToMultiIndex(unsigned int l) const;
btAlignedBox3d subdomain(unsigned int l) const;
btShapeMatrix
shape_function_(btVector3 const& xi, btShapeGradients* gradient = 0) const;
bool interpolate(unsigned int field_id, double& dist, btVector3 const& x, btVector3* gradient) const;
};
#endif //MINISDF_H
#endif //MINISDF_H