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
P
Plugin-AlignMeshes
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
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
OpenFlipper-Free
Plugin-AlignMeshes
Commits
e153998d
Commit
e153998d
authored
Oct 30, 2020
by
Jan Möbius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use ranges for Object Iteration to simplify code
parent
bb622d2e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
PluginAlignMeshes.cc
PluginAlignMeshes.cc
+3
-5
No files found.
PluginAlignMeshes.cc
View file @
e153998d
...
...
@@ -71,13 +71,11 @@ void PluginAlignMeshes::initializePlugin() {
void
PluginAlignMeshes
::
alignMeshes
()
{
for
(
PluginFunctions
::
ObjectIterator
o_it
(
PluginFunctions
::
TARGET_OBJECTS
,
DATA_TRIANGLE_MESH
);
o_it
!=
PluginFunctions
::
objectsEnd
();
++
o_it
)
{
for
(
auto
*
o_it
:
PluginFunctions
::
objects
(
PluginFunctions
::
TARGET_OBJECTS
,
DATA_TRIANGLE_MESH
)
)
{
if
(
o_it
->
dataType
()
==
DATA_TRIANGLE_MESH
)
{
TriMesh
&
mesh
=
*
PluginFunctions
::
triMesh
(
*
o_it
);
TriMesh
&
mesh
=
*
PluginFunctions
::
triMesh
(
o_it
);
align
::
moveToCOG
(
mesh
);
align
::
rotate
(
mesh
);
...
...
@@ -86,7 +84,7 @@ void PluginAlignMeshes::alignMeshes() {
}
else
if
(
o_it
->
dataType
()
==
DATA_POLY_MESH
)
{
PolyMesh
&
mesh
=
*
PluginFunctions
::
polyMesh
(
*
o_it
);
PolyMesh
&
mesh
=
*
PluginFunctions
::
polyMesh
(
o_it
);
align
::
moveToCOG
(
mesh
);
align
::
rotate
(
mesh
);
...
...
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