Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
Scotty3D
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Courses
Scotty3D
Commits
2f64ad2c
Commit
2f64ad2c
authored
4 years ago
by
TheNumbat
Browse files
Options
Downloads
Patches
Plain Diff
change halfedge placement
parent
c2535f0f
Branches
Branches containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMakeLists.txt
+1
-1
1 addition, 1 deletion
CMakeLists.txt
src/gui/model.cpp
+3
-3
3 additions, 3 deletions
src/gui/model.cpp
with
4 additions
and
4 deletions
CMakeLists.txt
+
1
−
1
View file @
2f64ad2c
cmake_minimum_required
(
VERSION
3.17
)
cmake_minimum_required
(
VERSION
2.8
)
# define project
# define project
...
...
This diff is collapsed.
Click to expand it.
src/gui/model.cpp
+
3
−
3
View file @
2f64ad2c
...
@@ -283,11 +283,11 @@ void Model::halfedge_viz(Halfedge_Mesh::HalfedgeRef h, Mat4 &transform) {
...
@@ -283,11 +283,11 @@ void Model::halfedge_viz(Halfedge_Mesh::HalfedgeRef h, Mat4 &transform) {
float
v0s
=
vert_sizes
[
v_0
->
id
()],
v1s
=
vert_sizes
[
v_1
->
id
()];
float
v0s
=
vert_sizes
[
v_0
->
id
()],
v1s
=
vert_sizes
[
v_1
->
id
()];
float
s
=
0.3
f
*
(
v0s
<
v1s
?
v0s
:
v1s
);
float
s
=
0.3
f
*
(
v0s
<
v1s
?
v0s
:
v1s
);
// Move to center of edge and
towards center of fac
e
// Move to center of edge and
away from edg
e
Vec3
offset
=
(
v1
-
v0
)
*
0.2
f
;
Vec3
offset
=
(
v1
-
v0
)
*
0.2
f
;
Vec3
face
=
h
->
face
()
->
center
();
Vec3
face
_n
=
h
->
face
()
->
normal
();
Vec3
avg
=
0.5
f
*
(
v0
+
v1
);
Vec3
avg
=
0.5
f
*
(
v0
+
v1
);
offset
+=
(
face
-
avg
).
unit
()
*
s
*
0.2
f
;
offset
+=
cross
(
face_n
,
dir
).
unit
()
*
s
*
0.2
f
+
face_n
*
s
*
0.05
f
;
// Align edge
// Align edge
if
(
dir
.
y
==
1.0
f
||
dir
.
y
==
-
1.0
f
)
{
if
(
dir
.
y
==
1.0
f
||
dir
.
y
==
-
1.0
f
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment