Skip to content
This repository was archived by the owner on Oct 22, 2025. It is now read-only.

Commit 44c5e56

Browse files
committed
format files
1 parent a775902 commit 44c5e56

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1569
-1476
lines changed

src/ipc/broad_phase/broad_phase.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111

1212
namespace ipc {
1313

14-
std::shared_ptr<ipc::BroadPhase> build_broad_phase(const BroadPhaseMethod& broad_phase_method)
14+
std::shared_ptr<ipc::BroadPhase>
15+
build_broad_phase(const BroadPhaseMethod& broad_phase_method)
1516
{
16-
switch(broad_phase_method)
17-
{
17+
switch (broad_phase_method) {
1818
case BroadPhaseMethod::HASH_GRID:
1919
return std::make_shared<ipc::HashGrid>();
2020
case BroadPhaseMethod::BRUTE_FORCE:

src/ipc/broad_phase/broad_phase.hpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,13 @@ namespace ipc {
1515

1616
class Candidates; // Forward declaration
1717

18-
enum class BroadPhaseMethod { HASH_GRID, BRUTE_FORCE, SPATIAL_HASH, BVH, SWEEP_AND_TINIEST_QUEUE };
18+
enum class BroadPhaseMethod {
19+
HASH_GRID,
20+
BRUTE_FORCE,
21+
SPATIAL_HASH,
22+
BVH,
23+
SWEEP_AND_TINIEST_QUEUE
24+
};
1925

2026
class BroadPhase {
2127
public:
@@ -106,5 +112,6 @@ class BroadPhase {
106112
std::vector<AABB> face_boxes;
107113
};
108114

109-
std::shared_ptr<BroadPhase> build_broad_phase(const BroadPhaseMethod& broad_phase_method);
115+
std::shared_ptr<BroadPhase>
116+
build_broad_phase(const BroadPhaseMethod& broad_phase_method);
110117
} // namespace ipc

src/ipc/candidates/collision_stencil.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,14 +156,14 @@ class CollisionStencil {
156156
/// @param positions Stencil's vertex positions.
157157
/// @note positions can be computed as stencil.dof(vertices, edges, faces)
158158
/// @return Distance Hessian of the stencil w.r.t. the stencil's vertex positions.
159-
virtual MatrixMax<double, 12, 12>
160-
compute_distance_hessian(Eigen::ConstRef<Vector<double, -1, 12>> positions) const = 0;
159+
virtual MatrixMax<double, 12, 12> compute_distance_hessian(
160+
Eigen::ConstRef<Vector<double, -1, 12>> positions) const = 0;
161161

162162
/// @brief Compute the coefficients of the stencil s.t. d(x) = ‖∑ cᵢ xᵢ‖².
163163
/// @param positions Stencil's vertex positions.
164164
/// @return Coefficients of the stencil.
165-
virtual VectorMax4d
166-
compute_coefficients(Eigen::ConstRef<Vector<double, -1, 12>> positions) const = 0;
165+
virtual VectorMax4d compute_coefficients(
166+
Eigen::ConstRef<Vector<double, -1, 12>> positions) const = 0;
167167

168168
/// @brief Perform narrow-phase CCD on the candidate.
169169
/// @param[in] vertices_t0 Stencil vertices at the start of the time step.

src/ipc/collision_mesh.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ class CollisionMesh {
5151
Eigen::ConstRef<Eigen::MatrixXi> faces = Eigen::MatrixXi())
5252
{
5353
return CollisionMesh(
54-
construct_is_on_surface(full_rest_positions.rows(), edges), std::vector<bool>(full_rest_positions.rows(), false),
54+
construct_is_on_surface(full_rest_positions.rows(), edges),
55+
std::vector<bool>(full_rest_positions.rows(), false),
5556
full_rest_positions, edges, faces);
5657
}
5758

src/ipc/collisions/normal/normal_collision.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include <ipc/candidates/collision_stencil.hpp>
55
#include <ipc/utils/eigen_ext.hpp>
66
#include <ipc/utils/logger.hpp>
7+
78
#include <Eigen/Core>
89

910
#include <array>

src/ipc/collisions/normal/normal_collisions.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <ipc/distance/point_point.hpp>
99
#include <ipc/utils/local_to_global.hpp>
1010

11+
#include <igl/writePLY.h>
1112
#include <tbb/blocked_range.h>
1213
#include <tbb/enumerable_thread_specific.h>
1314
#include <tbb/parallel_for.h>
@@ -16,8 +17,6 @@
1617

1718
#include <stdexcept> // std::out_of_range
1819

19-
#include <igl/writePLY.h>
20-
2120
namespace ipc {
2221

2322
namespace {

src/ipc/collisions/tangential/edge_edge.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ EdgeEdgeTangentialCollision::EdgeEdgeTangentialCollision(
2121
const double normal_force)
2222
: EdgeEdgeTangentialCollision(collision)
2323
{
24-
TangentialCollision::init(
25-
collision, positions, normal_force);
24+
TangentialCollision::init(collision, positions, normal_force);
2625
}
2726

2827
EdgeEdgeTangentialCollision::EdgeEdgeTangentialCollision(

src/ipc/collisions/tangential/edge_vertex.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ EdgeVertexTangentialCollision::EdgeVertexTangentialCollision(
2121
const double normal_force)
2222
: EdgeVertexTangentialCollision(collision)
2323
{
24-
TangentialCollision::init(
25-
collision, positions, normal_force);
24+
TangentialCollision::init(collision, positions, normal_force);
2625
}
2726

2827
EdgeVertexTangentialCollision::EdgeVertexTangentialCollision(

src/ipc/collisions/tangential/face_vertex.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ FaceVertexTangentialCollision::FaceVertexTangentialCollision(
2121
const double normal_force)
2222
: FaceVertexTangentialCollision(collision)
2323
{
24-
TangentialCollision::init(
25-
collision, positions, normal_force);
24+
TangentialCollision::init(collision, positions, normal_force);
2625
}
2726

2827
FaceVertexTangentialCollision::FaceVertexTangentialCollision(

src/ipc/collisions/tangential/face_vertex.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ class FaceVertexTangentialCollision : public FaceVertexCandidate,
1212
using FaceVertexCandidate::FaceVertexCandidate;
1313

1414
FaceVertexTangentialCollision(const FaceVertexNormalCollision& collision);
15-
15+
1616
FaceVertexTangentialCollision(
1717
const FaceVertexNormalCollision& collision,
18-
Eigen::ConstRef<VectorMax12d> positions,
18+
Eigen::ConstRef<VectorMax12d> positions,
1919
const double normal_force);
2020

2121
FaceVertexTangentialCollision(

0 commit comments

Comments
 (0)