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
C
CGoGN
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
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
David Cazier
CGoGN
Commits
781c9c5a
Commit
781c9c5a
authored
Sep 29, 2014
by
Lionel Untereiner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modifs sur les IHM3 + correction attributs
parent
6e1d2b03
Changes
19
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
451 additions
and
429 deletions
+451
-429
Apps/Examples/volumeExplorer.cpp
Apps/Examples/volumeExplorer.cpp
+1
-1
apps_cmake.txt
apps_cmake.txt
+1
-1
include/Algo/Export/export.hpp
include/Algo/Export/export.hpp
+1
-1
include/Algo/Modelisation/tetrahedralization.h
include/Algo/Modelisation/tetrahedralization.h
+1
-1
include/Algo/Multiresolution/IHM2/ihm2_PrimalAdapt.hpp
include/Algo/Multiresolution/IHM2/ihm2_PrimalAdapt.hpp
+0
-2
include/Algo/Multiresolution/IHM3/ihm3_PrimalAdapt.h
include/Algo/Multiresolution/IHM3/ihm3_PrimalAdapt.h
+6
-4
include/Algo/Multiresolution/IHM3/ihm3_PrimalAdapt.hpp
include/Algo/Multiresolution/IHM3/ihm3_PrimalAdapt.hpp
+273
-320
include/Algo/Multiresolution/Map2MR/Masks/catmullClark.h
include/Algo/Multiresolution/Map2MR/Masks/catmullClark.h
+6
-6
include/Algo/Multiresolution/Map2MR/Masks/lerp.h
include/Algo/Multiresolution/Map2MR/Masks/lerp.h
+6
-6
include/Algo/Multiresolution/Map2MR/Masks/loop.h
include/Algo/Multiresolution/Map2MR/Masks/loop.h
+4
-4
include/Algo/Multiresolution/Map2MR/Masks/sqrt3.h
include/Algo/Multiresolution/Map2MR/Masks/sqrt3.h
+4
-4
include/Algo/Multiresolution/Map3MR/Filters/bertram.h
include/Algo/Multiresolution/Map3MR/Filters/bertram.h
+1
-1
include/Algo/Multiresolution/Map3MR/Masks/lerp.h
include/Algo/Multiresolution/Map3MR/Masks/lerp.h
+9
-9
include/Topology/ihmap/ihm2.h
include/Topology/ihmap/ihm2.h
+1
-1
include/Topology/ihmap/ihm2.hpp
include/Topology/ihmap/ihm2.hpp
+4
-8
include/Topology/ihmap/ihm3.h
include/Topology/ihmap/ihm3.h
+16
-7
include/Topology/ihmap/ihm3.hpp
include/Topology/ihmap/ihm3.hpp
+96
-47
src/Algo/ImplicitHierarchicalMesh/ihm3.cppxx
src/Algo/ImplicitHierarchicalMesh/ihm3.cppxx
+0
-0
src/Topology/ihmap/ihm3.cpp
src/Topology/ihmap/ihm3.cpp
+21
-6
No files found.
Apps/Examples/volumeExplorer.cpp
View file @
781c9c5a
...
...
@@ -407,7 +407,7 @@ int main(int argc, char **argv)
{
*/
if
(
extension
==
std
::
string
(
".map"
))
if
(
extension
==
std
::
string
(
".map
bin
"
))
{
myMap
.
loadMapBin
(
filename
);
position
=
myMap
.
getAttribute
<
VEC3
,
VERTEX
,
MAP
>
(
"position"
)
;
...
...
apps_cmake.txt
View file @
781c9c5a
...
...
@@ -78,7 +78,7 @@ IF(WIN32)
ELSE(WIN32)
find_package(SuiteSparse REQUIRED)
SET (COMMON_INCLUDES ${COMMON_INCLUDES} ${SUITESPARSE_INCLUDE_DIRS})
SET (COMMON_LIBS ${
COMMON_LIBS} ${SUITESPARSE_LIBRARIE
S})
SET (COMMON_LIBS ${
SUITESPARSE_LIBRARIES} lapack blas ${COMMON_LIB
S})
ENDIF(WIN32)
...
...
include/Algo/Export/export.hpp
View file @
781c9c5a
...
...
@@ -996,7 +996,7 @@ bool exportChoupi(typename PFP::MAP& map, const VertexAttribute<typename PFP::VE
return
false
;
}
out
<<
map
.
template
getNbOrbits
<
VERTEX
>()
<<
" "
<<
map
.
template
getNbOrbits
<
EDGE
>(
)
<<
std
::
endl
;
out
<<
Algo
::
Topo
::
getNbOrbits
<
VERTEX
>
(
map
)
<<
" "
<<
Algo
::
Topo
::
getNbOrbits
<
EDGE
>
(
map
)
<<
std
::
endl
;
TraversorV
<
MAP
>
travV
(
map
);
for
(
Dart
dit
=
travV
.
begin
()
;
dit
!=
travV
.
end
()
;
dit
=
travV
.
next
())
...
...
include/Algo/Modelisation/tetrahedralization.h
View file @
781c9c5a
...
...
@@ -103,7 +103,7 @@ public:
EarTriangulation
(
MAP
&
map
)
:
m_map
(
map
),
m_dartEars
(
map
)
{
m_position
=
map
.
template
getAttribute
<
VEC3
,
VERTEX
>(
"position"
);
m_position
=
map
.
template
getAttribute
<
VEC3
,
VERTEX
,
MAP
>(
"position"
);
}
// void trianguleFace(Dart d, DartMarker& mark);
...
...
include/Algo/Multiresolution/IHM2/ihm2_PrimalAdapt.hpp
View file @
781c9c5a
...
...
@@ -351,8 +351,6 @@ unsigned int IHM2<PFP>::subdivideFace(Dart d, bool triQuad, bool OneLevelDiffere
unsigned
int
fLevel
=
faceLevel
(
d
)
;
Dart
old
=
faceOldestDart
(
d
)
;
//std::cout << "faceLevel = " << fLevel << std::endl;
unsigned
int
cur
=
m_map
.
getCurrentLevel
()
;
m_map
.
setCurrentLevel
(
fLevel
)
;
// go to the level of the face to subdivide its edges
...
...
include/Algo/Multiresolution/IHM3/ihm3_PrimalAdapt.h
View file @
781c9c5a
...
...
@@ -137,7 +137,7 @@ protected:
/***************************************************
* SUBDIVISION *
***************************************************/
public:
/**
* subdivide the edge of d to the next level
*/
...
...
@@ -158,11 +158,11 @@ protected:
*/
void
coarsenFace
(
Dart
d
)
;
public:
//! Subdivide the volume of d to hexahedral cells
/*! @param d Dart from the volume
*/
unsigned
in
t
subdivideVolume
(
Dart
d
,
bool
triQuad
=
true
,
bool
OneLevelDifference
=
true
);
Dar
t
subdivideVolume
(
Dart
d
,
bool
triQuad
=
true
,
bool
OneLevelDifference
=
true
);
/*!
* \brief subdivideHexa
...
...
@@ -179,6 +179,8 @@ public:
*/
void
subdivideVolumeTetOcta
(
Dart
d
)
;
void
coarsenVolume
(
Dart
d
)
;
/**
* vertices attributes management
*/
...
...
@@ -201,6 +203,6 @@ public:
}
// namespace CGoGN
#include "Algo/Multiresolution/IHM
2/ihm2
_PrimalAdapt.hpp"
#include "Algo/Multiresolution/IHM
3/ihm3
_PrimalAdapt.hpp"
#endif
include/Algo/Multiresolution/IHM3/ihm3_PrimalAdapt.hpp
View file @
781c9c5a
This diff is collapsed.
Click to expand it.
include/Algo/Multiresolution/Map2MR/Masks/catmullClark.h
View file @
781c9c5a
...
...
@@ -47,10 +47,10 @@ class CCVertexVertexFunctor : public FunctorType
{
protected:
typename
PFP
::
MAP
&
m_map
;
VertexAttribute
<
typename
PFP
::
VEC3
>&
m_position
;
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
m_position
;
public:
CCVertexVertexFunctor
(
typename
PFP
::
MAP
&
m
,
VertexAttribute
<
typename
PFP
::
VEC3
>&
p
)
:
m_map
(
m
),
m_position
(
p
)
CCVertexVertexFunctor
(
typename
PFP
::
MAP
&
m
,
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
p
)
:
m_map
(
m
),
m_position
(
p
)
{}
bool
operator
()
(
Dart
d
)
...
...
@@ -99,10 +99,10 @@ class CCEdgeVertexFunctor : public FunctorType
{
protected:
typename
PFP
::
MAP
&
m_map
;
VertexAttribute
<
typename
PFP
::
VEC3
>&
m_position
;
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
m_position
;
public:
CCEdgeVertexFunctor
(
typename
PFP
::
MAP
&
m
,
VertexAttribute
<
typename
PFP
::
VEC3
>&
p
)
:
m_map
(
m
),
m_position
(
p
)
CCEdgeVertexFunctor
(
typename
PFP
::
MAP
&
m
,
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
p
)
:
m_map
(
m
),
m_position
(
p
)
{}
bool
operator
()
(
Dart
d
)
...
...
@@ -144,10 +144,10 @@ class CCFaceVertexFunctor : public FunctorType
{
protected:
typename
PFP
::
MAP
&
m_map
;
VertexAttribute
<
typename
PFP
::
VEC3
>&
m_position
;
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
m_position
;
public:
CCFaceVertexFunctor
(
typename
PFP
::
MAP
&
m
,
VertexAttribute
<
typename
PFP
::
VEC3
>&
p
)
:
m_map
(
m
),
m_position
(
p
)
CCFaceVertexFunctor
(
typename
PFP
::
MAP
&
m
,
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
p
)
:
m_map
(
m
),
m_position
(
p
)
{}
bool
operator
()
(
Dart
d
)
...
...
include/Algo/Multiresolution/Map2MR/Masks/lerp.h
View file @
781c9c5a
...
...
@@ -48,10 +48,10 @@ class LerpVertexVertexFunctor : public FunctorType
{
protected:
typename
PFP
::
MAP
&
m_map
;
VertexAttribute
<
typename
PFP
::
VEC3
>&
m_position
;
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
m_position
;
public:
LerpVertexVertexFunctor
(
typename
PFP
::
MAP
&
m
,
VertexAttribute
<
typename
PFP
::
VEC3
>&
p
)
:
m_map
(
m
),
m_position
(
p
)
LerpVertexVertexFunctor
(
typename
PFP
::
MAP
&
m
,
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
p
)
:
m_map
(
m
),
m_position
(
p
)
{}
bool
operator
()
(
Dart
d
)
...
...
@@ -74,10 +74,10 @@ class LerpEdgeVertexFunctor : public FunctorType
{
protected:
typename
PFP
::
MAP
&
m_map
;
VertexAttribute
<
typename
PFP
::
VEC3
>&
m_position
;
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
m_position
;
public:
LerpEdgeVertexFunctor
(
typename
PFP
::
MAP
&
m
,
VertexAttribute
<
typename
PFP
::
VEC3
>&
p
)
:
m_map
(
m
),
m_position
(
p
)
LerpEdgeVertexFunctor
(
typename
PFP
::
MAP
&
m
,
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
p
)
:
m_map
(
m
),
m_position
(
p
)
{}
bool
operator
()
(
Dart
d
)
...
...
@@ -100,10 +100,10 @@ class LerpFaceVertexFunctor : public FunctorType
{
protected:
typename
PFP
::
MAP
&
m_map
;
VertexAttribute
<
typename
PFP
::
VEC3
>&
m_position
;
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
m_position
;
public:
LerpFaceVertexFunctor
(
typename
PFP
::
MAP
&
m
,
VertexAttribute
<
typename
PFP
::
VEC3
>&
p
)
:
m_map
(
m
),
m_position
(
p
)
LerpFaceVertexFunctor
(
typename
PFP
::
MAP
&
m
,
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
p
)
:
m_map
(
m
),
m_position
(
p
)
{}
bool
operator
()
(
Dart
d
)
...
...
include/Algo/Multiresolution/Map2MR/Masks/loop.h
View file @
781c9c5a
...
...
@@ -47,10 +47,10 @@ class LoopVertexVertexFunctor : public FunctorType
{
protected:
typename
PFP
::
MAP
&
m_map
;
VertexAttribute
<
typename
PFP
::
VEC3
>&
m_position
;
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
m_position
;
public:
LoopVertexVertexFunctor
(
typename
PFP
::
MAP
&
m
,
VertexAttribute
<
typename
PFP
::
VEC3
>&
p
)
:
m_map
(
m
),
m_position
(
p
)
LoopVertexVertexFunctor
(
typename
PFP
::
MAP
&
m
,
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
p
)
:
m_map
(
m
),
m_position
(
p
)
{}
bool
operator
()
(
Dart
d
)
...
...
@@ -85,10 +85,10 @@ class LoopEdgeVertexFunctor : public FunctorType
{
protected:
typename
PFP
::
MAP
&
m_map
;
VertexAttribute
<
typename
PFP
::
VEC3
>&
m_position
;
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
m_position
;
public:
LoopEdgeVertexFunctor
(
typename
PFP
::
MAP
&
m
,
VertexAttribute
<
typename
PFP
::
VEC3
>&
p
)
:
m_map
(
m
),
m_position
(
p
)
LoopEdgeVertexFunctor
(
typename
PFP
::
MAP
&
m
,
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
p
)
:
m_map
(
m
),
m_position
(
p
)
{}
bool
operator
()
(
Dart
d
)
...
...
include/Algo/Multiresolution/Map2MR/Masks/sqrt3.h
View file @
781c9c5a
...
...
@@ -48,10 +48,10 @@ class Sqrt3VertexVertexFunctor : public FunctorType
{
protected:
typename
PFP
::
MAP
&
m_map
;
VertexAttribute
<
typename
PFP
::
VEC3
>&
m_position
;
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
m_position
;
public:
Sqrt3VertexVertexFunctor
(
typename
PFP
::
MAP
&
m
,
VertexAttribute
<
typename
PFP
::
VEC3
>&
p
)
:
m_map
(
m
),
m_position
(
p
)
Sqrt3VertexVertexFunctor
(
typename
PFP
::
MAP
&
m
,
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
p
)
:
m_map
(
m
),
m_position
(
p
)
{}
bool
operator
()
(
Dart
d
)
...
...
@@ -123,10 +123,10 @@ class Sqrt3FaceVertexFunctor : public FunctorType
{
protected:
typename
PFP
::
MAP
&
m_map
;
VertexAttribute
<
typename
PFP
::
VEC3
>&
m_position
;
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
m_position
;
public:
Sqrt3FaceVertexFunctor
(
typename
PFP
::
MAP
&
m
,
VertexAttribute
<
typename
PFP
::
VEC3
>&
p
)
:
m_map
(
m
),
m_position
(
p
)
Sqrt3FaceVertexFunctor
(
typename
PFP
::
MAP
&
m
,
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
p
)
:
m_map
(
m
),
m_position
(
p
)
{}
bool
operator
()
(
Dart
d
)
...
...
include/Algo/Multiresolution/Map3MR/Filters/bertram.h
View file @
781c9c5a
...
...
@@ -29,7 +29,7 @@
#include "Algo/Geometry/centroid.h"
#include "Algo/Modelisation/tetrahedralization.h"
#include "Algo/Multiresolution/filter.h"
#include "Topology/generic/traversor2_closed.h"
#include "Topology/generic/traversor
/traversor
2_closed.h"
namespace
CGoGN
{
...
...
include/Algo/Multiresolution/Map3MR/Masks/lerp.h
View file @
781c9c5a
...
...
@@ -53,10 +53,10 @@ class LerpVertexVertexFunctor : public FunctorType
{
protected:
typename
PFP
::
MAP
&
m_map
;
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>&
m_position
;
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
,
typename
PFP
::
MAP
>&
m_position
;
public:
LerpVertexVertexFunctor
(
typename
PFP
::
MAP
&
m
,
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>&
p
)
:
m_map
(
m
),
m_position
(
p
)
LerpVertexVertexFunctor
(
typename
PFP
::
MAP
&
m
,
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
,
typename
PFP
::
MAP
>&
p
)
:
m_map
(
m
),
m_position
(
p
)
{}
bool
operator
()
(
Dart
d
)
...
...
@@ -68,7 +68,7 @@ public:
// std::cout << " p du niv i+1 = " << p << std::endl;
m_position
[
d
]
=
p
;
//
m_position[d] = p;
// m_map.decCurrentLevel() ;
// std::cout << "dec = " << m_position[d] << std::endl;
...
...
@@ -84,10 +84,10 @@ class LerpEdgeVertexFunctor : public FunctorType
{
protected:
typename
PFP
::
MAP
&
m_map
;
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>&
m_position
;
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
,
typename
PFP
::
MAP
>&
m_position
;
public:
LerpEdgeVertexFunctor
(
typename
PFP
::
MAP
&
m
,
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>&
p
)
:
m_map
(
m
),
m_position
(
p
)
LerpEdgeVertexFunctor
(
typename
PFP
::
MAP
&
m
,
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
,
typename
PFP
::
MAP
>&
p
)
:
m_map
(
m
),
m_position
(
p
)
{}
bool
operator
()
(
Dart
d
)
...
...
@@ -110,10 +110,10 @@ class LerpFaceVertexFunctor : public FunctorType
{
protected:
typename
PFP
::
MAP
&
m_map
;
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>&
m_position
;
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
,
typename
PFP
::
MAP
>&
m_position
;
public:
LerpFaceVertexFunctor
(
typename
PFP
::
MAP
&
m
,
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>&
p
)
:
m_map
(
m
),
m_position
(
p
)
LerpFaceVertexFunctor
(
typename
PFP
::
MAP
&
m
,
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
,
typename
PFP
::
MAP
>&
p
)
:
m_map
(
m
),
m_position
(
p
)
{}
bool
operator
()
(
Dart
d
)
...
...
@@ -135,10 +135,10 @@ class LerpVolumeVertexFunctor : public FunctorType
{
protected:
typename
PFP
::
MAP
&
m_map
;
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>&
m_position
;
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
,
typename
PFP
::
MAP
>&
m_position
;
public:
LerpVolumeVertexFunctor
(
typename
PFP
::
MAP
&
m
,
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>&
p
)
:
m_map
(
m
),
m_position
(
p
)
LerpVolumeVertexFunctor
(
typename
PFP
::
MAP
&
m
,
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
,
typename
PFP
::
MAP
>&
p
)
:
m_map
(
m
),
m_position
(
p
)
{}
bool
operator
()
(
Dart
d
)
...
...
include/Topology/ihmap/ihm2.h
View file @
781c9c5a
...
...
@@ -32,11 +32,11 @@ namespace CGoGN
template
<
typename
T
,
unsigned
int
ORBIT
>
class
AttributeHandler_IHM
;
typedef
EmbeddedMap2
::
TOPO_MAP
TOPO_MAP
;
class
ImplicitHierarchicalMap2
:
public
EmbeddedMap2
{
template
<
typename
T
,
unsigned
int
ORBIT
>
friend
class
AttributeHandler_IHM
;
typedef
EmbeddedMap2
::
TOPO_MAP
TOPO_MAP
;
private:
unsigned
int
m_curLevel
;
...
...
include/Topology/ihmap/ihm2.hpp
View file @
781c9c5a
...
...
@@ -326,18 +326,14 @@ inline void ImplicitHierarchicalMap2::setCurrentLevel(unsigned int l)
inline
void
ImplicitHierarchicalMap2
::
incCurrentLevel
()
{
if
(
m_curLevel
<
m_maxLevel
)
++
m_curLevel
;
else
CGoGNout
<<
"incCurrentLevel : already at maximum resolution level"
<<
CGoGNendl
;
assert
(
m_curLevel
<
m_maxLevel
||
"incCurrentLevel : already at maximum resolution level"
);
++
m_curLevel
;
}
inline
void
ImplicitHierarchicalMap2
::
decCurrentLevel
()
{
if
(
m_curLevel
>
0
)
--
m_curLevel
;
else
CGoGNout
<<
"decCurrentLevel : already at minimum resolution level"
<<
CGoGNendl
;
assert
(
m_curLevel
>
0
||
"decCurrentLevel : already at minimum resolution level"
);
--
m_curLevel
;
}
inline
unsigned
int
ImplicitHierarchicalMap2
::
getMaxLevel
()
...
...
include/Topology/ihmap/ihm3.h
View file @
781c9c5a
...
...
@@ -32,12 +32,12 @@ namespace CGoGN
template
<
typename
T
,
unsigned
int
ORBIT
>
class
AttributeHandler_IHM
;
typedef
EmbeddedMap3
::
TOPO_MAP
TOPO_MAP
;
class
ImplicitHierarchicalMap3
:
public
EmbeddedMap3
{
template
<
typename
T
,
unsigned
int
ORBIT
>
friend
class
AttributeHandler_IHM
;
typedef
EmbeddedMap3
::
TOPO_MAP
TOPO_MAP
;
private:
unsigned
int
m_curLevel
;
...
...
@@ -80,11 +80,11 @@ public:
* ATTRIBUTES MANAGEMENT *
***************************************************/
template
<
typename
T
,
unsigned
int
ORBIT
>
AttributeHandler_IHM
<
T
,
ORBIT
>
addAttribute
(
const
std
::
string
&
nameAttr
)
;
// template <typename T, unsigned int ORBIT, typename MAP
>
// AttributeHandler_IHM<T, ORBIT, MAP
> addAttribute(const std::string& nameAttr) ;
template
<
typename
T
,
unsigned
int
ORBIT
>
AttributeHandler_IHM
<
T
,
ORBIT
>
getAttribute
(
const
std
::
string
&
nameAttr
)
;
// template <typename T, unsigned int ORBIT, typename MAP
>
// AttributeHandler_IHM<T, ORBIT, MAP
> getAttribute(const std::string& nameAttr) ;
/***************************************************
* MAP TRAVERSAL *
...
...
@@ -163,6 +163,8 @@ public:
* MAP MANIPULATION *
***************************************************/
Dart
cutEdge
(
Dart
d
);
/***************************************************
* LEVELS MANAGEMENT *
***************************************************/
...
...
@@ -201,8 +203,15 @@ public:
//! Set an edge id to all darts from an orbit of d
/*!
*/
void
setEdgeId
(
Dart
d
,
unsigned
int
i
,
unsigned
int
orbit
);
//TODO a virer
void
setEdgeId
(
Dart
d
,
unsigned
int
i
);
void
setEdgeId
(
Dart
d
,
unsigned
int
i
);
//TODO a virer
void
setDartEdgeId
(
Dart
d
,
unsigned
int
i
);
unsigned
int
getTriRefinementEdgeId
(
Dart
d
);
unsigned
int
getQuadRefinementEdgeId
(
Dart
d
);
//! Give a new unique id to all the faces of the map
/*!
...
...
include/Topology/ihmap/ihm3.hpp
View file @
781c9c5a
...
...
@@ -28,33 +28,33 @@ namespace CGoGN
/***************************************************
* ATTRIBUTES MANAGEMENT *
***************************************************/
template
<
typename
T
,
unsigned
int
ORBIT
>
AttributeHandler_IHM
<
T
,
ORBIT
>
ImplicitHierarchicalMap3
::
addAttribute
(
const
std
::
string
&
nameAttr
)
{
bool
addNextLevelCell
=
false
;
if
(
!
isOrbitEmbedded
<
ORBIT
>
())
addNextLevelCell
=
true
;
//template <typename T, unsigned int ORBIT, typename MAP
>
//AttributeHandler_IHM<T, ORBIT, MAP
> ImplicitHierarchicalMap3::addAttribute(const std::string& nameAttr)
//
{
//
bool addNextLevelCell = false ;
//
if(!isOrbitEmbedded<ORBIT>())
//
addNextLevelCell = true ;
AttributeHandler
<
T
,
ORBIT
,
ImplicitHierarchicalMap3
>
h
=
Map3
::
addAttribute
<
T
,
ORBIT
,
ImplicitHierarchicalMap3
>
(
nameAttr
)
;
//
AttributeHandler<T, ORBIT, ImplicitHierarchicalMap3> h = Map3::addAttribute<T, ORBIT, ImplicitHierarchicalMap3>(nameAttr) ;
if
(
addNextLevelCell
)
{
AttributeContainer
&
cellCont
=
m_attribs
[
ORBIT
]
;
AttributeMultiVector
<
unsigned
int
>*
amv
=
cellCont
.
addAttribute
<
unsigned
int
>
(
"nextLevelCell"
)
;
m_nextLevelCell
[
ORBIT
]
=
amv
;
for
(
unsigned
int
i
=
cellCont
.
begin
();
i
<
cellCont
.
end
();
cellCont
.
next
(
i
))
amv
->
operator
[](
i
)
=
EMBNULL
;
}
//
if(addNextLevelCell)
//
{
//
AttributeContainer& cellCont = m_attribs[ORBIT] ;
//
AttributeMultiVector<unsigned int>* amv = cellCont.addAttribute<unsigned int>("nextLevelCell") ;
//
m_nextLevelCell[ORBIT] = amv ;
//
for(unsigned int i = cellCont.begin(); i < cellCont.end(); cellCont.next(i))
//
amv->operator[](i) = EMBNULL ;
//
}
return
AttributeHandler_IHM
<
T
,
ORBIT
>
(
this
,
h
.
getDataVector
())
;
}
//
return AttributeHandler_IHM<T, ORBIT>(this, h.getDataVector()) ;
//
}
template
<
typename
T
,
unsigned
int
ORBIT
>
AttributeHandler_IHM
<
T
,
ORBIT
>
ImplicitHierarchicalMap3
::
getAttribute
(
const
std
::
string
&
nameAttr
)
{
AttributeHandler
<
T
,
ORBIT
,
ImplicitHierarchicalMap3
>
h
=
Map3
::
getAttribute
<
T
,
ORBIT
,
ImplicitHierarchicalMap3
>
(
nameAttr
)
;
return
AttributeHandler_IHM
<
T
,
ORBIT
>
(
this
,
h
.
getDataVector
())
;
}
//template <typename T, unsigned int ORBIT, typename MAP
>
//AttributeHandler_IHM<T, ORBIT, MAP
> ImplicitHierarchicalMap3::getAttribute(const std::string& nameAttr)
//
{
//
AttributeHandler<T, ORBIT, ImplicitHierarchicalMap3> h = Map3::getAttribute<T, ORBIT, ImplicitHierarchicalMap3>(nameAttr) ;
//
return AttributeHandler_IHM<T, ORBIT>(this, h.getDataVector()) ;
//
}
inline
void
ImplicitHierarchicalMap3
::
update_topo_shortcuts
()
{
...
...
@@ -72,7 +72,7 @@ inline void ImplicitHierarchicalMap3::update_topo_shortcuts()
***************************************************/
inline
Dart
ImplicitHierarchicalMap3
::
newDart
()
{
Dart
d
=
Map3
::
newDart
()
;
Dart
d
=
TOPO_MAP
::
newDart
()
;
m_dartLevel
[
d
]
=
m_curLevel
;
if
(
m_curLevel
>
m_maxLevel
)
// update max level
m_maxLevel
=
m_curLevel
;
// if needed
...
...
@@ -457,18 +457,14 @@ inline void ImplicitHierarchicalMap3::foreach_dart_of_cc(Dart d, FUNC& f, unsign
inline
void
ImplicitHierarchicalMap3
::
incCurrentLevel
()
{
if
(
m_curLevel
<
m_maxLevel
)
++
m_curLevel
;
else
CGoGNout
<<
"incCurrentLevel : already at maximum resolution level"
<<
CGoGNendl
;
assert
(
m_curLevel
<
m_maxLevel
||
"incCurrentLevel : already at maximum resolution level"
);
++
m_curLevel
;
}
inline
void
ImplicitHierarchicalMap3
::
decCurrentLevel
()
{
if
(
m_curLevel
>
0
)
--
m_curLevel
;
else
CGoGNout
<<
"decCurrentLevel : already at minimum resolution level"
<<
CGoGNendl
;
assert
(
m_curLevel
>
0
||
"decCurrentLevel : already at minimum resolution level"
);
--
m_curLevel
;
}
inline
unsigned
int
ImplicitHierarchicalMap3
::
getCurrentLevel
()
const
...
...
@@ -511,24 +507,57 @@ inline unsigned int ImplicitHierarchicalMap3::getEdgeId(Dart d)
return
m_edgeId
[
d
]
;
}
inline
void
ImplicitHierarchicalMap3
::
setEdgeId
(
Dart
d
,
unsigned
int
i
,
unsigned
int
orbit
)
inline
void
ImplicitHierarchicalMap3
::
setEdgeId
(
Dart
d
,
unsigned
int
i
)
{
if
(
orbit
==
EDGE
)
{
Dart
e
=
d
;
Dart
e
=
d
;
do
{
m_edgeId
[
e
]
=
i
;
m_edgeId
[
Map3
::
phi2
(
e
)]
=
i
;
do
{
m_edgeId
[
e
]
=
i
;
m_edgeId
[
Map3
::
phi2
(
e
)]
=
i
;
e
=
Map3
::
alpha2
(
e
);
}
while
(
e
!=
d
);
}
else
if
(
orbit
==
DART
)
{
m_edgeId
[
d
]
=
i
;
}
e
=
Map3
::
alpha2
(
e
);
}
while
(
e
!=
d
);
}
inline
void
ImplicitHierarchicalMap3
::
setDartEdgeId
(
Dart
d
,
unsigned
int
i
)
{
m_edgeId
[
d
]
=
i
;
}
inline
unsigned
int
ImplicitHierarchicalMap3
::
triRefinementEdgeId
(
Dart
d
)
{
unsigned
int
dId
=
getEdgeId
(
phi_1
(
d
));
unsigned
int
eId
=
getEdgeId
(
phi1
(
d
));
unsigned
int
id
=
dId
+
eId
;
if
(
id
==
0
)
return
1
;
else
if
(
id
==
1
)
return
2
;
else
if
(
id
==
2
)
{
if
(
dId
==
eId
)
return
0
;
else
return
1
;
}
//else if(id == 3)
return
0
;
}
inline
unsigned
int
ImplicitHierarchicalMap3
::
quadRefinementEdgeId
(
Dart
d
)
{
unsigned
int
eId
=
getEdgeId
(
phi1
(
d
));
if
(
eId
==
0
)
return
1
;
//else if(eId == 1)
return
0
;
}
/***************************************************
...
...
@@ -540,6 +569,26 @@ inline unsigned int ImplicitHierarchicalMap3::getNewFaceId()
return
m_faceIdCount
++
;
}
inline
unsigned
int
ImplicitHierarchicalMap3
::
faceId
(
Dart
d
)
{
unsigned
int
fId
=
getFaceId
(
phi2
(
d
));
if
(
fId
==
0
)
return
1
;
else
if
(
id
==
1
)
return
2
;
else
if
(
id
==
2
)
{
if
(
dId
==
eId
)
return
0
;
else
return
1
;
}
//else if(id == 3)
return
0
;
}
inline
unsigned
int
ImplicitHierarchicalMap3
::
getFaceId
(
Dart
d
)
{
return
m_faceId
[
d
]
;
...
...
src/Algo/ImplicitHierarchicalMesh/ihm3.cpp
→
src/Algo/ImplicitHierarchicalMesh/ihm3.cpp
xx
View file @
781c9c5a
File moved
src/Topology/ihmap/ihm3.cpp
View file @
781c9c5a
...
...
@@ -61,14 +61,14 @@ void ImplicitHierarchicalMap3::clear(bool removeAttrib)
void
ImplicitHierarchicalMap3
::
initImplicitProperties
()
{
initEdgeId
()
;
//
initEdgeId() ;
initFaceId
();
//
for(Dart d = Map3::begin(); d != Map3::end(); Map3::next(d))
//
{
//
m_edgeId[d] = 0;
//
m_faceId[d] = 0;
//
}
for
(
Dart
d
=
Map3
::
begin
();
d
!=
Map3
::
end
();
Map3
::
next
(
d
))
{
m_edgeId
[
d
]
=
0
;
//
m_faceId[d] = 0;
}
for
(
unsigned
int
orbit
=
0
;
orbit
<
NB_ORBITS
;
++
orbit
)
{
...
...
@@ -130,4 +130,19 @@ void ImplicitHierarchicalMap3::initFaceId()
}