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
faf9e4cf
Commit
faf9e4cf
authored
Oct 08, 2020
by
TheNumbat
Browse files
fix macos build; add wrapper for erase
parent
9bc17c6e
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
src/geometry/halfedge.h
View file @
faf9e4cf
...
...
@@ -190,6 +190,14 @@ public:
// Student Local Operations | student/meshedit.cpp
//////////////////////////////////////////////////////////////////////////////////////////
// Note: if you erase elements in these methods, they will not be erased from the
// element lists until do_erase or validate are called. This is to facilitate checking
// for dangling references to elements that will be erased.
// The rest of the codebase will automatically call validate() after each op,
// but you may need to be aware of this when implementing global ops.
// Specifically, when you need to collapse an edge in iostropic_remesh() or simplify(),
// you should call collapse_edge_erase() instead of collapse_edge()
/*
Merge all faces incident on a given vertex, returning a
pointer to the merged face.
...
...
@@ -260,6 +268,16 @@ public:
void
bevel_face_positions
(
const
std
::
vector
<
Vec3
>
&
start_positions
,
FaceRef
face
,
float
tangent_offset
,
float
normal_offset
);
/*
Collapse an edge, returning a pointer to the collapsed vertex
** Also deletes the erased elements **
*/
std
::
optional
<
VertexRef
>
collapse_edge_erase
(
EdgeRef
e
)
{
auto
r
=
collapse_edge
(
e
);
do_erase
();
return
r
;
}
//////////////////////////////////////////////////////////////////////////////////////////
// Student Global Operations | student/meshedit.cpp
//////////////////////////////////////////////////////////////////////////////////////////
...
...
src/gui/model.cpp
View file @
faf9e4cf
...
...
@@ -226,7 +226,6 @@ void Model::vertex_viz(Halfedge_Mesh::VertexRef v, float &size, Mat4 &transform)
auto
he
=
v
->
halfedge
();
do
{
Vec3
n
=
he
->
twin
()
->
vertex
()
->
pos
;
float
len
=
he
->
edge
()
->
length
();
min
=
std
::
min
(
min
,
len
);
avg
+=
len
;
...
...
src/student/meshedit.cpp
View file @
faf9e4cf
This diff is collapsed.
Click to expand it.
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