Skip to content

Commit c63b1f4

Browse files
alemuntoniactions-user
authored andcommitted
Committing clang-format changes
1 parent e8947ac commit c63b1f4

File tree

3 files changed

+28
-33
lines changed

3 files changed

+28
-33
lines changed

include/vclib/algorithms/update/normal.h

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ void normalizePerElementNormals(
6262

6363
if constexpr (isLoggerValid<LogType>()) {
6464
log.log(
65-
100, "Per-" + elementEnumString<ELEM_ID>() + " normals normalized.");
65+
100,
66+
"Per-" + elementEnumString<ELEM_ID>() + " normals normalized.");
6667
}
6768
}
6869

@@ -78,9 +79,9 @@ void clearPerElementNormals(MeshType& mesh)
7879

7980
template<uint ELEM_ID, MeshConcept MeshType, typename MScalar>
8081
void multiplyPerElementNormalsByMatrix(
81-
MeshType& mesh,
82-
vcl::Matrix33<MScalar> mat,
83-
bool removeScalingFromMatrix = true)
82+
MeshType& mesh,
83+
vcl::Matrix33<MScalar> mat,
84+
bool removeScalingFromMatrix = true)
8485
{
8586
vcl::requirePerElementComponent<ELEM_ID, NORMAL>(mesh);
8687

@@ -252,8 +253,6 @@ void updatePerFaceNormals(MeshType& m, bool normalize = true)
252253
normalizePerFaceNormals(m);
253254
}
254255

255-
256-
257256
/**
258257
* @brief Sets to zero all the normals of vertices that are referenced by at
259258
* least one face, leaving unchanged all the normals of the unreferenced
@@ -282,8 +281,6 @@ void clearPerReferencedVertexNormals(MeshType& m)
282281
}
283282
}
284283

285-
286-
287284
/**
288285
* @brief Computes the vertex normal as the classic area weighted average.
289286
*

include/vclib/mesh/mesh.h

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1503,7 +1503,7 @@ class Mesh : public Args...
15031503
}
15041504

15051505
// this function is required in order to get msvc compile
1506-
template<typename Element, typename ...A>
1506+
template<typename Element, typename... A>
15071507
void updatePointers(
15081508
const Element* oldBase,
15091509
const Element* newBase,
@@ -1519,36 +1519,34 @@ class Mesh : public Args...
15191519

15201520
// this function is required in order to get msvc compile
15211521
template<typename Cont, typename Element>
1522-
void updatePointers(
1523-
const Element* oldBase,
1524-
const Element* newBase)
1522+
void updatePointers(const Element* oldBase, const Element* newBase)
15251523
{
15261524
updatePointers<Cont>(oldBase, newBase, std::array<std::size_t, 0>(), 0);
15271525
}
15281526

15291527
// this additional function is necessary because otherwise msvc jumps
15301528
// totally the pack expansion if called directly in the function
15311529
// updatePointersOfContainerTypeAfterAppend
1532-
template<typename Element, std::size_t N, typename ...A>
1530+
template<typename Element, std::size_t N, typename... A>
15331531
void updatePointers(
15341532
const Element* oldBase,
15351533
const Element* newBase,
15361534
TypeWrapper<A...>,
1537-
const std::array<std::size_t, N>& sizes = std::array<std::size_t, 0>(),
1538-
uint offset = 0)
1535+
const std::array<std::size_t, N>& sizes = std::array<std::size_t, 0>(),
1536+
uint offset = 0)
15391537
{
15401538
(updatePointers<A>(oldBase, newBase, sizes, offset), ...);
15411539
}
15421540

15431541
template<typename Cont, typename Element, std::size_t N>
15441542
void updatePointers(
1545-
const Element* oldBase,
1546-
const Element* newBase,
1547-
const std::array<std::size_t, N>& sizes = std::array<std::size_t, 0>(),
1548-
uint offset = 0)
1543+
const Element* oldBase,
1544+
const Element* newBase,
1545+
const std::array<std::size_t, N>& sizes = std::array<std::size_t, 0>(),
1546+
uint offset = 0)
15491547
{
15501548
if constexpr (mesh::ElementContainerConcept<Cont>) {
1551-
if constexpr(N > 0) {
1549+
if constexpr (N > 0) {
15521550
using Containers = Mesh<Args...>::Containers;
15531551
constexpr uint I = IndexInTypes<Cont, Containers>::value;
15541552
static_assert(I >= 0 && I != UINT_NULL);
@@ -1758,7 +1756,7 @@ class Mesh : public Args...
17581756
// old base is contained in the array bases, the new base is the
17591757
// base of the container
17601758
m.updatePointers(
1761-
reinterpret_cast<const ElType *>(bases[I]),
1759+
reinterpret_cast<const ElType*>(bases[I]),
17621760
m.Cont::vec.data(),
17631761
ContainerWrapper());
17641762
}
@@ -1789,7 +1787,7 @@ class Mesh : public Args...
17891787
// old base is contained in the array bases, the new base is the
17901788
// base of the container
17911789
m.updatePointers(
1792-
reinterpret_cast<const ElType *>(bases[I]),
1790+
reinterpret_cast<const ElType*>(bases[I]),
17931791
m.Cont::vec.data(),
17941792
ContainerWrapper(),
17951793
sizes,

test/examples/mesh_copy/main.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,19 @@
2828

2929
int main()
3030
{
31-
vcl::TriMesh yCyl = vcl::createCylinder<vcl::TriMesh>(0.02, 2);
32-
yCyl.enablePerVertexColor();
33-
vcl::setPerVertexColor(yCyl, vcl::Color::Green);
31+
vcl::TriMesh yCyl = vcl::createCylinder<vcl::TriMesh>(0.02, 2);
32+
yCyl.enablePerVertexColor();
33+
vcl::setPerVertexColor(yCyl, vcl::Color::Green);
3434

35-
vcl::TriMesh xCyl = yCyl;
36-
vcl::setPerVertexColor(xCyl, vcl::Color::Red);
37-
vcl::rotateDeg(xCyl, vcl::Point3d(0, 0, 1), 90.f);
35+
vcl::TriMesh xCyl = yCyl;
36+
vcl::setPerVertexColor(xCyl, vcl::Color::Red);
37+
vcl::rotateDeg(xCyl, vcl::Point3d(0, 0, 1), 90.f);
3838

39-
vcl::savePly(yCyl, VCLIB_TEST_RESULTS_PATH "/yasis.ply");
40-
vcl::savePly(xCyl, VCLIB_TEST_RESULTS_PATH "/xasis.ply");
39+
vcl::savePly(yCyl, VCLIB_TEST_RESULTS_PATH "/yasis.ply");
40+
vcl::savePly(xCyl, VCLIB_TEST_RESULTS_PATH "/xasis.ply");
4141

42-
vcl::TriMesh mesh = xCyl;
43-
mesh.append(yCyl);
42+
vcl::TriMesh mesh = xCyl;
43+
mesh.append(yCyl);
4444

45-
vcl::savePly(mesh, VCLIB_TEST_RESULTS_PATH "/axis.ply");
45+
vcl::savePly(mesh, VCLIB_TEST_RESULTS_PATH "/axis.ply");
4646
}

0 commit comments

Comments
 (0)