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
32c0c330
Commit
32c0c330
authored
4 years ago
by
TheNumbat
Browse files
Options
Downloads
Patches
Plain Diff
fix halfedge edge normals
parent
6c09f13a
Branches
Branches containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/geometry/util.cpp
+5
-0
5 additions, 0 deletions
src/geometry/util.cpp
src/geometry/util.h
+1
-0
1 addition, 0 deletions
src/geometry/util.h
src/gui/model.cpp
+1
-1
1 addition, 1 deletion
src/gui/model.cpp
with
7 additions
and
1 deletion
src/geometry/util.cpp
+
5
−
0
View file @
32c0c330
...
...
@@ -28,6 +28,11 @@ GL::Mesh cone_mesh(float bradius, float tradius, float height, int sides, bool c
return
Gen
::
dedup
({
std
::
move
(
cone
.
verts
),
std
::
move
(
cone
.
elems
)});
}
GL
::
Mesh
cyl_mesh_disjoint
(
float
radius
,
float
height
,
int
sides
)
{
Gen
::
Data
cone
=
Gen
::
cone
(
radius
,
radius
,
height
,
sides
,
false
);
return
GL
::
Mesh
(
std
::
move
(
cone
.
verts
),
std
::
move
(
cone
.
elems
));
}
GL
::
Mesh
torus_mesh
(
float
iradius
,
float
oradius
,
int
segments
,
int
sides
)
{
Gen
::
Data
torus
=
Gen
::
torus
(
iradius
,
oradius
,
segments
,
sides
);
return
Gen
::
dedup
({
std
::
move
(
torus
.
verts
),
std
::
move
(
torus
.
elems
)});
...
...
This diff is collapsed.
Click to expand it.
src/geometry/util.h
+
1
−
0
View file @
32c0c330
...
...
@@ -11,6 +11,7 @@ GL::Mesh cube_mesh(float radius);
GL
::
Mesh
square_mesh
(
float
radius
);
GL
::
Mesh
quad_mesh
(
float
x
,
float
y
);
GL
::
Mesh
cyl_mesh
(
float
radius
,
float
height
,
int
sides
=
12
,
bool
cap
=
true
);
GL
::
Mesh
cyl_mesh_disjoint
(
float
radius
,
float
height
,
int
sides
=
12
);
GL
::
Mesh
torus_mesh
(
float
iradius
,
float
oradius
,
int
segments
=
48
,
int
sides
=
24
);
GL
::
Mesh
sphere_mesh
(
float
r
,
int
subdivsions
);
GL
::
Mesh
hemi_mesh
(
float
r
);
...
...
This diff is collapsed.
Click to expand it.
src/gui/model.cpp
+
1
−
1
View file @
32c0c330
...
...
@@ -13,7 +13,7 @@
namespace
Gui
{
Model
::
Model
()
:
spheres
(
Util
::
sphere_mesh
(
0.05
f
,
1
)),
cylinders
(
Util
::
cyl_mesh
(
0.05
f
,
1.0
f
)),
:
spheres
(
Util
::
sphere_mesh
(
0.05
f
,
1
)),
cylinders
(
Util
::
cyl_mesh
_disjoint
(
0.05
f
,
1.0
f
)),
arrows
(
Util
::
arrow_mesh
(
0.05
f
,
0.1
f
,
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