Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
OpenMesh
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
13
Issues
13
List
Boards
Labels
Service Desk
Milestones
Merge Requests
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenMesh
OpenMesh
Commits
3179316c
Commit
3179316c
authored
Jan 11, 2017
by
Janis Born
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add calc_edge_midpoint methods for meshes
parent
3b906e51
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
src/OpenMesh/Core/Mesh/PolyMeshT.hh
src/OpenMesh/Core/Mesh/PolyMeshT.hh
+16
-0
No files found.
src/OpenMesh/Core/Mesh/PolyMeshT.hh
View file @
3179316c
...
...
@@ -409,6 +409,22 @@ public:
return
edge_vec
.
sqrnorm
();
}
/** Calculates the midpoint of the halfedge _heh, defined by the positions of
the two incident vertices */
Point
calc_edge_midpoint
(
HalfedgeHandle
_heh
)
const
{
auto
vh0
=
this
->
from_vertex_handle
(
_heh
);
auto
vh1
=
this
->
to_vertex_handle
(
_heh
);
return
0.5
*
(
this
->
point
(
vh0
)
+
this
->
point
(
vh1
));
}
/** Calculates the midpoint of the edge _eh, defined by the positions of the
two incident vertices */
Point
calc_edge_midpoint
(
EdgeHandle
_eh
)
const
{
return
calc_edge_midpoint
(
this
->
halfedge_handle
(
_eh
,
0
));
}
/** defines a consistent representation of a sector geometry:
the halfedge _in_heh defines the sector orientation
the vertex pointed by _in_heh defines the sector center
...
...
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