Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Philip Trettner
polymesh
Commits
19115b64
Commit
19115b64
authored
Jun 05, 2020
by
Julius Nehring-Wirxel
Browse files
Return handle to first vertex of the newly added sphere.
parent
332c4ccd
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/polymesh/objects/ico_sphere.hh
View file @
19115b64
...
...
@@ -14,7 +14,7 @@ namespace polymesh::objects
/// Adds a (subdivided) ico_sphere to the given mesh
/// sf is called with (v, x, y, z), with vertex handle v and coordinates (x,y,z) on the unit sphere
template
<
class
SphereF
>
v
oid
add_ico_sphere
(
Mesh
&
m
,
SphereF
&&
sf
,
int
subdiv
=
0
)
v
ertex_handle
add_ico_sphere
(
Mesh
&
m
,
SphereF
&&
sf
,
int
subdiv
=
0
)
{
POLYMESH_ASSERT
(
subdiv
>=
0
);
...
...
@@ -25,5 +25,6 @@ void add_ico_sphere(Mesh& m, SphereF&& sf, int subdiv = 0)
{
sf
(
vertex_index
(
last_vertex_count
+
i
).
of
(
m
),
positions
[
i
].
x
,
positions
[
i
].
y
,
positions
[
i
].
z
);
}
return
vertex_index
(
last_vertex_count
).
of
(
m
);
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment