Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
David Cazier
CGoGN
Commits
7dd93bed
Commit
7dd93bed
authored
May 05, 2014
by
Pierre Kraemer
Browse files
Merge branch 'develop' of cgogn:~untereiner/CGoGN into develop
parents
c4af2be3
9e8736d8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Apps/Examples/volumeExplorer.cpp
View file @
7dd93bed
...
...
@@ -171,16 +171,19 @@ void MyQT::cb_Open()
float
maxV
=
0.0
f
;
for
(
Dart
d
=
tra
.
begin
();
d
!=
tra
.
end
();
d
=
tra
.
next
())
{
float
v
=
Algo
::
Geometry
::
tetrahedronVolume
<
PFP
>
(
myMap
,
d
,
position
);
color
[
d
]
=
PFP
::
VEC3
(
v
,
0
,
0
);
if
(
v
>
maxV
)
maxV
=
v
;
}
for
(
unsigned
int
i
=
color
.
begin
();
i
!=
color
.
end
();
color
.
next
(
i
))
{
color
[
i
][
0
]
/=
maxV
;
color
[
i
][
2
]
=
1.0
f
-
color
[
i
][
0
];
// float v = Algo::Geometry::tetrahedronVolume<PFP>(myMap, d, position);
// color[d] = PFP::VEC3(v,0,0);
// if (v>maxV)
// maxV=v;
if
(
myMap
.
isBoundaryAdjacentVolume
(
d
))
color
[
d
]
=
PFP
::
VEC3
(
0
,
0
,
0
);
}
// for (unsigned int i = color.begin(); i != color.end(); color.next(i))
// {
// color[i][0] /= maxV;
// color[i][2] = 1.0f - color[i][0];
// }
// SelectorDartNoBoundary<PFP::MAP> nb(myMap);
m_topo_render
->
updateData
(
myMap
,
position
,
0.8
f
,
0.8
f
,
0.8
f
);
...
...
@@ -414,20 +417,20 @@ int main(int argc, char **argv)
for
(
Dart
d
=
tra
.
begin
();
d
!=
tra
.
end
();
d
=
tra
.
next
())
{
float
v
=
Algo
::
Geometry
::
tetrahedronVolume
<
PFP
>
(
myMap
,
d
,
position
);
color
[
d
]
=
PFP
::
VEC3
(
v
,
0
,
0
);
if
(
v
>
maxV
)
maxV
=
v
;
}
for
(
unsigned
int
i
=
color
.
begin
();
i
!=
color
.
end
();
color
.
next
(
i
))
{
color
[
i
][
0
]
/=
maxV
;
color
[
i
][
2
]
=
1.0
f
-
color
[
i
][
0
]
;
//
color[d] = PFP::VEC3(v,0,0);
//
if (v>maxV)
//
maxV=v;
if
(
myMap
.
isBoundaryAdjacentVolume
(
d
))
color
[
d
]
=
PFP
::
VEC3
(
0
,
0
,
0
);
else
color
[
d
]
=
PFP
::
VEC3
(
v
,
0
,
0
)
;
}
//
Algo::Volume::Export::exportNAS<PFP>(myMap,position,"/tmp/test2.nas");
//
Algo::Volume::Export::exportMSH<PFP>(myMap,position,"/tmp/test2.msh");
//
Algo::Volume::Export::exportTet<PFP>(myMap,position,"/tmp/test2.tet")
;
//
Algo::Volume::Export::exportNodeEle<PFP>(myMap,position,"/tmp/test2")
;
//
Algo::Volume::Export::exportVTU<PFP>(myMap,position,"/tmp/test4.vtu");
//
for (unsigned int i = color.begin(); i != color.end(); color.next(i))
//
{
//
color[i][0] /= maxV
;
//
color[i][2] = 1.0f - color[i][0]
;
//
}
}
else
...
...
include/Topology/map/map3.hpp
View file @
7dd93bed
...
...
@@ -1029,7 +1029,7 @@ bool Map3<MAP_IMPL>::isVolumeIncidentToBoundary(Dart d) const
Traversor3WF
<
Map3
<
MAP_IMPL
>
>
tra
(
*
this
,
d
);
for
(
Dart
dit
=
tra
.
begin
()
;
dit
!=
tra
.
end
()
;
dit
=
tra
.
next
())
{
if
(
isBoundaryMarked
3
(
phi3
(
dit
)))
if
(
this
->
template
isBoundaryMarked
<
3
>
(
phi3
(
dit
)))
return
true
;
}
return
false
;
...
...
Write
Preview
Supports
Markdown
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!
Cancel
Please
register
or
sign in
to comment