Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Courses
Scotty3D
Commits
8ddfb4bf
Commit
8ddfb4bf
authored
Mar 21, 2021
by
TheNumbat
Browse files
render edges within a single boundary face
parent
9f1961d7
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/gui/model.cpp
View file @
8ddfb4bf
...
...
@@ -381,8 +381,17 @@ void Model::rebuild() {
// Create cylinder for each edge
cylinders
.
clear
();
for
(
auto
e
=
mesh
.
edges_begin
();
e
!=
mesh
.
edges_end
();
e
++
)
{
// We don't want to render edges between two boundary faces, since the boundaries
// should look contiguous
if
(
e
->
halfedge
()
->
is_boundary
()
&&
e
->
halfedge
()
->
twin
()
->
is_boundary
())
{
// Unless both surrounding boundaries are the same face, in which case we should
// render this edge to show that the next vertex is connected
if
(
e
->
halfedge
()
->
face
()
!=
e
->
halfedge
()
->
twin
()
->
face
())
continue
;
}
if
(
e
->
halfedge
()
->
is_boundary
()
&&
e
->
halfedge
()
->
twin
()
->
is_boundary
())
continue
;
Mat4
transform
;
edge_viz
(
e
,
transform
);
id_to_info
[
e
->
id
()]
=
{
e
,
cylinders
.
add
(
transform
,
e
->
id
())};
...
...
Write
Preview
Markdown
is supported
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