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
KennethVanhoey
CGoGN
Commits
ed815783
Commit
ed815783
authored
Jun 16, 2011
by
CGoGN GIT Supervisor
Browse files
Merge branch 'master' of /home/untereiner/CGoGN
* 'master' of /home/untereiner/CGoGN: ihm3 + stage_shader
parents
3a3f7966
3c4647fb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Apps/Tuto/stage_shader.cpp
View file @
ed815783
...
...
@@ -189,14 +189,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
)
;
...
...
@@ -316,6 +308,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 @
ed815783
...
...
@@ -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 @
ed815783
...
...
@@ -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
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