Skip to content

Commit

Permalink
Committing clang-format changes
Browse files Browse the repository at this point in the history
  • Loading branch information
alemuntoni authored and actions-user committed Jan 25, 2024
1 parent 15ae3e9 commit ce4cf5f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
15 changes: 7 additions & 8 deletions include/vclib/algorithms/update/normal.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ void normalizeNoThrow(auto& elem, LogType& log = nullLogger)
catch (const std::exception& e) {
log.log(
log.WARNING,
elementEnumString<ELEM_ID>() + " " +
std::to_string(elem.index()) + ": " + e.what());
elementEnumString<ELEM_ID>() + " " + std::to_string(elem.index()) +
": " + e.what());
}
}

} // namespace vcl::detail
} // namespace detail

/**
* @brief Sets to zero the normals of all the <ELEM_ID> elements of the mesh,
Expand All @@ -75,8 +75,7 @@ void clearPerElementNormals(MeshConcept auto& mesh, LogType& log = nullLogger)
e.normal().setZero();
});

log.log(
100, "Per-" + elementEnumString<ELEM_ID>() + " normals cleared.");
log.log(100, "Per-" + elementEnumString<ELEM_ID>() + " normals cleared.");
}

/**
Expand Down Expand Up @@ -380,12 +379,12 @@ void updatePerFaceNormals(
{
vcl::requirePerFaceNormal(mesh);

using FaceType = std::remove_reference_t<decltype(mesh)>::FaceType;
using FaceType = std::remove_reference_t<decltype(mesh)>::FaceType;
using ScalarType = FaceType::NormalType::ScalarType;

log.log(0, "Updating per-Face normals...");

parallelFor(mesh.faces(), [](auto& f){
parallelFor(mesh.faces(), [](auto& f) {
f.normal() = faceNormal(f).template cast<ScalarType>();
});

Expand Down Expand Up @@ -421,7 +420,7 @@ void updatePerVertexNormals(
bool normalize = true,
LogType& log = nullLogger)
{
using VertexType = std::remove_reference_t<decltype(mesh)>::VertexType;
using VertexType = std::remove_reference_t<decltype(mesh)>::VertexType;
using NScalar = VertexType::NormalType::ScalarType;

log.log(0, "Updating per-Vertex normals...");
Expand Down
11 changes: 10 additions & 1 deletion include/vclib/misc/logger/null_logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,29 +44,38 @@ class NullLogger
NullLogger() = default;

void enableIndentation() {}

void disableIndentation() {}

void reset() {}

void setMaxLineWidth(uint) {}

void setPrintTimer(bool) {}

void startTimer() {}

void startNewTask(double, double, std::string) {}

void endTask(std::string) {}

double percentage() const { return 0; }

void setPercentage(uint) {}

void log(std::string) {}

void log(LogLevel, std::string) {}

void log(uint, std::string) {}

void log(uint, LogLevel, std::string) {}

void startProgress(std::string, uint, uint = 0, uint = 0, uint = 0) {}

void endProgress() {}
void progress(uint) {}

void progress(uint) {}
};

/**
Expand Down

0 comments on commit ce4cf5f

Please sign in to comment.