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 Nov 23, 2023
1 parent 310963f commit 6d5e0b5
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions include/vclib/algorithms/create/cone.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ namespace vcl {

template<FaceMeshConcept MeshType>
MeshType createCone(
auto radiusBottom,
auto radiusTop,
auto height,
auto radiusBottom,
auto radiusTop,
auto height,
const uint subdivisions = 36)
{
using CoordType = MeshType::VertexType::CoordType;
using CoordType = MeshType::VertexType::CoordType;
using ScalarType = CoordType::ScalarType;

uint vn, fn;
Expand All @@ -54,8 +54,8 @@ MeshType createCone(
mesh.reserveVertices(vn);
mesh.reserveFaces(fn);

mesh.addVertex(CoordType(0, -height/2.0, 0));
mesh.addVertex(CoordType(0, height/2.0, 0));
mesh.addVertex(CoordType(0, -height / 2.0, 0));
mesh.addVertex(CoordType(0, height / 2.0, 0));

uint b1 = 2;
uint b2 = 2;
Expand All @@ -65,7 +65,7 @@ MeshType createCone(
ScalarType a = vcl::toRad(i * 360.0 / subdivisions);
mesh.addVertex(CoordType(
radiusBottom * std::cos(a),
-height/2.0,
-height / 2.0,
radiusBottom * std::sin(a)));
}

Expand All @@ -77,7 +77,7 @@ MeshType createCone(
ScalarType a = vcl::toRad(i * 360.0 / subdivisions);
mesh.addVertex(CoordType(
radiusTop * std::cos(a),
height/2.0,
height / 2.0,
radiusTop * std::sin(a)));
}
}
Expand Down Expand Up @@ -119,10 +119,7 @@ MeshType createCone(
}

template<FaceMeshConcept MeshType>
MeshType createCylinder(
auto radius,
auto height,
const uint subdivisions = 36)
MeshType createCylinder(auto radius, auto height, const uint subdivisions = 36)
{
return createCone<MeshType>(radius, radius, height, subdivisions);
}
Expand Down

0 comments on commit 6d5e0b5

Please sign in to comment.