Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Thomas Pitiot
CGoGN
Commits
3c4647fb
Commit
3c4647fb
authored
Jun 07, 2011
by
untereiner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ihm3 + stage_shader
parent
ca029cf5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
58 deletions
+9
-58
Apps/Tuto/stage_shader.cpp
Apps/Tuto/stage_shader.cpp
+7
-8
include/Algo/ImplicitHierarchicalMesh/ihm3.hpp
include/Algo/ImplicitHierarchicalMesh/ihm3.hpp
+2
-2
src/Algo/ImplicitHierarchicalMesh/ihm3.cpp
src/Algo/ImplicitHierarchicalMesh/ihm3.cpp
+0
-48
No files found.
Apps/Tuto/stage_shader.cpp
View file @
3c4647fb
...
...
@@ -172,14 +172,6 @@ void StageShader::importMesh(std::string& filename)
else
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
attrNames
[
0
])
;
}
else
{
position
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"position"
);
Algo
::
Modelisation
::
Primitive3D
<
PFP
>
prim
(
myMap
,
position
);
prim
.
hexaGrid_topo
(
10
,
10
,
10
);
prim
.
embedHexaGrid
(
1.0
f
,
1.0
f
,
1.0
f
);
}
updateVBOprimitives
(
Algo
::
Render
::
GL2
::
TRIANGLES
|
Algo
::
Render
::
GL2
::
LINES
|
Algo
::
Render
::
GL2
::
POINTS
)
;
...
...
@@ -299,6 +291,13 @@ int main(int argc, char** argv)
std
::
string
filename
(
argv
[
1
])
;
sqt
.
importMesh
(
filename
)
;
}
else
{
sqt
.
position
=
sqt
.
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"position"
);
Algo
::
Modelisation
::
Primitive3D
<
PFP
>
prim
(
sqt
.
myMap
,
sqt
.
position
);
prim
.
hexaGrid_topo
(
10
,
10
,
10
);
prim
.
embedHexaGrid
(
1.0
f
,
1.0
f
,
1.0
f
);
}
sqt
.
initGUI
()
;
...
...
include/Algo/ImplicitHierarchicalMesh/ihm3.hpp
View file @
3c4647fb
...
...
@@ -32,7 +32,7 @@ namespace IHM
{
/***************************************************
* ATTRIBUTES MANAGEMENT *
*
ATTRIBUTES MANAGEMENT
*
***************************************************/
template
<
typename
T
>
...
...
@@ -64,7 +64,7 @@ AttributeHandler_IHM<T> ImplicitHierarchicalMap3::getAttribute(unsigned int orbi
}
/***************************************************
*
MAP TRAVERSAL
*
*
MAP TRAVERSAL
*
***************************************************/
inline
Dart
ImplicitHierarchicalMap3
::
newDart
()
...
...
src/Algo/ImplicitHierarchicalMesh/ihm3.cpp
View file @
3c4647fb
...
...
@@ -166,40 +166,6 @@ unsigned int ImplicitHierarchicalMap3::faceLevel(Dart d)
return
fLevel
;
}
// Dart it = d ;
// Dart old = it ;
// unsigned int fLevel = edgeLevel(it) ;
// do
// {
// it = phi1(it) ;
// if(m_dartLevel[it] < m_dartLevel[old]) // in a first time, the level of a face
// old = it ; // is the minimum of the levels
// unsigned int l = edgeLevel(it) ; // of its edges
// fLevel = l < fLevel ? l : fLevel ;
// } while(it != d) ;
//
// unsigned int cur = m_curLevel ;
// m_curLevel = fLevel ;
//
// unsigned int nbSubd = 0 ;
// it = old ;
// unsigned int eId = m_edgeId[old] ; // the particular case of a face
// do // with all neighboring faces regularly subdivided
// { // but not the face itself
// ++nbSubd ; // is treated here
// it = phi1(it) ;
// } while(m_edgeId[it] == eId) ;
//
// while(nbSubd > 1)
// {
// nbSubd /= 2 ;
// --fLevel ;
// }
//
// m_curLevel = cur ;
//
// return fLevel ;
unsigned
int
ImplicitHierarchicalMap3
::
volumeLevel
(
Dart
d
)
{
...
...
@@ -231,8 +197,6 @@ unsigned int ImplicitHierarchicalMap3::volumeLevel(Dart d)
{
Dart
e
=
*
face
;
//std::cout << "dart from face = " << e << std::endl;
// in a first time, the level of a face
//the level of the volume is the minimum of the
//levels of its faces
...
...
@@ -298,7 +262,6 @@ unsigned int ImplicitHierarchicalMap3::volumeLevel(Dart d)
do
{
Dart
ee
=
phi2
(
e
)
;
//std::cout << "\t face a cote =" << ee << std::endl;
if
(
!
mark
.
isMarked
(
ee
))
// not already marked
{
visitedFaces
.
push_back
(
ee
)
;
...
...
@@ -308,7 +271,6 @@ unsigned int ImplicitHierarchicalMap3::volumeLevel(Dart d)
}
while
(
e
!=
*
face
)
;
}
//std::cout << "fin" << std::endl << std::endl;
//Second : the case of all faces regularly subdivided but not the volume itself
unsigned
int
cur
=
m_curLevel
;
...
...
@@ -336,16 +298,6 @@ unsigned int ImplicitHierarchicalMap3::volumeLevel(Dart d)
return
vLevel
;
}
// unsigned int fLevel = faceLevel(e) ;
// vLevel = fLevel < vLevel ? fLevel : vLevel ;
//
// Dart old = faceOldestDart(e);
// if(m_dartLevel[old] < m_dartLevel[oldest])
// oldest = old ;
Dart
ImplicitHierarchicalMap3
::
faceOldestDart
(
Dart
d
)
{
...
...
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