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
O
OpenFlipper
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
OpenFlipper-Free
OpenFlipper
Commits
2c9ac0d9
Commit
2c9ac0d9
authored
Dec 06, 2019
by
Max Lyon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add selectElements method in MeshTools for simpler template programming
parent
f2ebc879
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
4 deletions
+66
-4
libs_required/MeshTools/MeshSelectionT.hh
libs_required/MeshTools/MeshSelectionT.hh
+66
-4
No files found.
libs_required/MeshTools/MeshSelectionT.hh
View file @
2c9ac0d9
...
...
@@ -61,6 +61,7 @@
//== INCLUDES =================================================================
#include <OpenMesh/Core/Mesh/Handles.hh>
#include <vector>
//== FORWARDDECLARATIONS ======================================================
...
...
@@ -71,6 +72,7 @@ namespace MeshSelection {
//== DEFINITIONS ==============================================================
//===========================================================================
/** @name Vertex Selection
* @{ */
...
...
@@ -78,12 +80,24 @@ namespace MeshSelection {
/** \brief Select given vertices of a mesh
* @param _mesh Mesh to work on
* @param _vertices Vertex ind
ex
to select
* @param _vertices Vertex ind
ices
to select
*/
template
<
typename
MeshT
>
inline
void
selectVertices
(
MeshT
*
_mesh
,
const
std
::
vector
<
int
>&
_vertices
);
/** \brief Select given vertices of a mesh
* Same as selectVertices
* @param _mesh Mesh to work on
* @param _vertices Vertex index to select
*/
template
<
typename
MeshT
>
inline
void
selectElements
(
MeshT
*
_mesh
,
const
std
::
vector
<
int
>&
_vertices
,
OpenMesh
::
VertexHandle
/*_tag*/
)
{
selectVertices
(
_mesh
,
_vertices
);
}
/** \brief Unselect given vertices of a mesh
* @param _mesh Mesh to work on
...
...
@@ -293,11 +307,29 @@ std::vector< int > getArea(MeshT* _mesh, unsigned int _type , bool& _invert);
* @{ */
//===========================================================================
/// Select given edges of a mesh
/** \brief Select given edges of a mesh
* @param _mesh Mesh to work on
* @param _edges Edge indices to select
* @param _dihedral_angle_threshold If mesh has normals, dihedral angle must be greator than or equal to this threshold in order to be selected
*/
template
<
typename
MeshT
>
inline
void
selectEdges
(
MeshT
*
_mesh
,
const
std
::
vector
<
int
>&
_edges
,
const
double
_dihedral_angle_threshold
=
0.0
);
/** \brief Select given edges of a mesh
* Same as selectEdges
* @param _mesh Mesh to work on
* @param _edges Edge indices to select
* @param _dihedral_angle_threshold If mesh has normals, dihedral angle must be greator than or equal to this threshold in order to be selected
*/
template
<
typename
MeshT
>
inline
void
selectElements
(
MeshT
*
_mesh
,
const
std
::
vector
<
int
>&
_edges
,
OpenMesh
::
EdgeHandle
/*_tag*/
)
{
selectEdges
(
_mesh
,
_edges
);
}
/// Unselect given edges of a mesh
template
<
typename
MeshT
>
inline
...
...
@@ -409,11 +441,26 @@ void clearFeatureEdges(MeshT* _mesh);
* @{ */
//===========================================================================
/// Select given edges of a mesh
/** \brief Select given halfedges of a mesh
* @param _mesh Mesh to work on
* @param _halfedges face indices to select
*/
template
<
typename
MeshT
>
inline
void
selectHalfedges
(
MeshT
*
_mesh
,
const
std
::
vector
<
int
>&
_halfedges
);
/** \brief Select given halfedges of a mesh
* Same as selectHalfedges
* @param _mesh Mesh to work on
* @param _halfedges halfedge indices to select
*/
template
<
typename
MeshT
>
inline
void
selectElements
(
MeshT
*
_mesh
,
const
std
::
vector
<
int
>&
_halfedges
,
OpenMesh
::
HalfedgeHandle
/*_tag*/
)
{
selectHalfedges
(
_mesh
,
_halfedges
);
}
/// Unselect given edges of a mesh
template
<
typename
MeshT
>
inline
...
...
@@ -470,11 +517,26 @@ void convertHalfedgeToFaceSelection(MeshT* _mesh);
* @{ */
//===========================================================================
/// Select given faces of a mesh
/** \brief Select given faces of a mesh
* @param _mesh Mesh to work on
* @param _faces face indices to select
*/
template
<
typename
MeshT
>
inline
void
selectFaces
(
MeshT
*
_mesh
,
const
std
::
vector
<
int
>&
_faces
);
/** \brief Select given faces of a mesh
* Same as selectFaces
* @param _mesh Mesh to work on
* @param _faces face indices to select
*/
template
<
typename
MeshT
>
inline
void
selectElements
(
MeshT
*
_mesh
,
const
std
::
vector
<
int
>&
_faces
,
OpenMesh
::
FaceHandle
/*_tag*/
)
{
selectFaces
(
_mesh
,
_faces
);
}
/// Unselect given faces of a mesh
template
<
typename
MeshT
>
inline
...
...
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