Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dmitri Naumov
ogs
Commits
f85e0ed3
Commit
f85e0ed3
authored
11 years ago
by
Karsten Rink
Browse files
Options
Downloads
Patches
Plain Diff
changed getMatBounds() to getValueBounds(), changed copies of bounding box points to references
parent
1e215502
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Gui/DataView/ElementTreeModel.cpp
+3
-3
3 additions, 3 deletions
Gui/DataView/ElementTreeModel.cpp
MeshLib/MeshInformation.cpp
+1
-1
1 addition, 1 deletion
MeshLib/MeshInformation.cpp
MeshLib/MeshInformation.h
+1
-1
1 addition, 1 deletion
MeshLib/MeshInformation.h
with
5 additions
and
5 deletions
Gui/DataView/ElementTreeModel.cpp
+
3
−
3
View file @
f85e0ed3
...
...
@@ -141,8 +141,8 @@ void ElementTreeModel::setMesh(MeshLib::Mesh const*const mesh)
_rootItem
->
appendChild
(
aabb_item
);
const
GeoLib
::
AABB
<
MeshLib
::
Node
>
aabb
(
MeshInformation
::
getBoundingBox
(
mesh
));
const
MeshLib
::
Node
min
=
aabb
.
getMinPoint
();
const
MeshLib
::
Node
max
=
aabb
.
getMaxPoint
();
const
MeshLib
::
Node
&
min
=
aabb
.
getMinPoint
();
const
MeshLib
::
Node
&
max
=
aabb
.
getMaxPoint
();
QList
<
QVariant
>
min_aabb
;
min_aabb
<<
"Min:"
<<
QString
::
number
(
min
[
0
],
'f'
)
<<
QString
::
number
(
min
[
1
],
'f'
)
<<
QString
::
number
(
min
[
2
],
'f'
);
...
...
@@ -154,7 +154,7 @@ void ElementTreeModel::setMesh(MeshLib::Mesh const*const mesh)
TreeItem
*
max_item
=
new
TreeItem
(
max_aabb
,
aabb_item
);
aabb_item
->
appendChild
(
max_item
);
std
::
pair
<
unsigned
,
unsigned
>
mat_bounds
(
MeshInformation
::
get
Mat
Bounds
(
mesh
));
std
::
pair
<
unsigned
,
unsigned
>
mat_bounds
(
MeshInformation
::
get
Value
Bounds
(
mesh
));
QList
<
QVariant
>
materials
;
materials
<<
"MaterialIDs: "
<<
"["
+
QString
::
number
(
mat_bounds
.
first
)
<<
QString
::
number
(
mat_bounds
.
second
)
+
"]"
<<
""
;
TreeItem
*
mat_item
=
new
TreeItem
(
materials
,
_rootItem
);
...
...
This diff is collapsed.
Click to expand it.
MeshLib/MeshInformation.cpp
+
1
−
1
View file @
f85e0ed3
...
...
@@ -17,7 +17,7 @@
#include
"Elements/Element.h"
const
std
::
pair
<
unsigned
,
unsigned
>
MeshInformation
::
get
Mat
Bounds
(
MeshLib
::
Mesh
const
*
const
mesh
)
const
std
::
pair
<
unsigned
,
unsigned
>
MeshInformation
::
get
Value
Bounds
(
MeshLib
::
Mesh
const
*
const
mesh
)
{
const
std
::
vector
<
MeshLib
::
Element
*>
elements
(
mesh
->
getElements
());
const
auto
minmax
=
std
::
minmax_element
(
elements
.
cbegin
(),
elements
.
cend
(),
...
...
This diff is collapsed.
Click to expand it.
MeshLib/MeshInformation.h
+
1
−
1
View file @
f85e0ed3
...
...
@@ -31,7 +31,7 @@ class MeshInformation
{
public:
/// Returns the smallest and largest MaterialID of the mesh.
static
const
std
::
pair
<
unsigned
,
unsigned
>
get
Mat
Bounds
(
MeshLib
::
Mesh
const
*
const
mesh
);
static
const
std
::
pair
<
unsigned
,
unsigned
>
get
Value
Bounds
(
MeshLib
::
Mesh
const
*
const
mesh
);
/// Returns the bounding box of the mesh.
static
const
GeoLib
::
AABB
<
MeshLib
::
Node
>
getBoundingBox
(
MeshLib
::
Mesh
const
*
const
mesh
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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