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
6b34f7fb
Commit
6b34f7fb
authored
Jan 17, 2013
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Plain Diff
Merge cgogn:~untereiner/CGoGN
parents
95ea0467
ce1186a4
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
330 additions
and
380 deletions
+330
-380
Apps/Tuto/tuto_dual2.cpp
Apps/Tuto/tuto_dual2.cpp
+9
-83
include/Algo/Decimation/edgeSelector.h
include/Algo/Decimation/edgeSelector.h
+4
-4
include/Algo/Decimation/edgeSelector.hpp
include/Algo/Decimation/edgeSelector.hpp
+13
-13
include/Algo/Geometry/curvature.h
include/Algo/Geometry/curvature.h
+4
-4
include/Algo/Geometry/curvature.hpp
include/Algo/Geometry/curvature.hpp
+1
-1
include/Algo/Geometry/localFrame.h
include/Algo/Geometry/localFrame.h
+3
-3
include/Algo/Multiresolution/Map3MR/Filters/bertram.h
include/Algo/Multiresolution/Map3MR/Filters/bertram.h
+6
-6
include/Algo/Multiresolution/Map3MR/Filters/lerp.h
include/Algo/Multiresolution/Map3MR/Filters/lerp.h
+14
-12
include/Algo/Multiresolution/Map3MR/Filters/mcCrackenJoy.h
include/Algo/Multiresolution/Map3MR/Filters/mcCrackenJoy.h
+4
-4
include/Algo/Multiresolution/Map3MR/Filters/schaefer.h
include/Algo/Multiresolution/Map3MR/Filters/schaefer.h
+8
-8
include/Algo/Multiresolution/Map3MR/map3MR_PrimalRegular.hpp
include/Algo/Multiresolution/Map3MR/map3MR_PrimalRegular.hpp
+81
-81
include/Algo/ProgressiveMesh/pmesh.h
include/Algo/ProgressiveMesh/pmesh.h
+9
-9
include/Algo/ProgressiveMesh/pmesh.hpp
include/Algo/ProgressiveMesh/pmesh.hpp
+8
-9
include/Algo/Selection/collector.hpp
include/Algo/Selection/collector.hpp
+18
-18
include/Topology/generic/attributeHandler.h
include/Topology/generic/attributeHandler.h
+0
-1
include/Topology/generic/functor.h
include/Topology/generic/functor.h
+23
-0
include/Topology/map/map2.h
include/Topology/map/map2.h
+6
-11
include/Topology/map/map3.h
include/Topology/map/map3.h
+7
-1
src/Topology/map/map2.cpp
src/Topology/map/map2.cpp
+6
-74
src/Topology/map/map3.cpp
src/Topology/map/map3.cpp
+106
-38
No files found.
Apps/Tuto/tuto_dual2.cpp
View file @
6b34f7fb
...
...
@@ -67,89 +67,15 @@ int main(int argc, char **argv)
VertexAttribute
<
PFP
::
VEC3
>
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
,
VERTEX
>
(
attrNames
[
0
]);
//
// Dual
//
// FaceAttribute<PFP::VEC3> positionF = myMap.getAttribute<PFP::VEC3, FACE>("position") ;
// if(!positionF.isValid())
// positionF = myMap.addAttribute<PFP::VEC3, FACE>("position") ;
//
// Algo::Surface::Geometry::computeCentroidFaces<PFP>(myMap, position, positionF) ;
// myMap.computeDual();
// position = positionF ;
// AttributeHandler<PFP::VEC3, PFP::MAP::EDGE_OF_PARENT> positionE = myMap.getAttribute<PFP::VEC3, PFP::MAP::EDGE_OF_PARENT>("position") ;
// if(!positionE.isValid())
// positionE = myMap.addAttribute<PFP::VEC3, PFP::MAP::EDGE_OF_PARENT>("position") ;
//
// SelectorDartBoundary<PFP::MAP> sdb(myMap);
// TraversorE<PFP::MAP> te(myMap, sdb);
// for(Dart dit = te.begin() ; dit != te.end() ; dit = te.next())
// {
// positionE[dit] = (position[dit] + position[myMap.phi1(dit)]) * PFP::REAL(0.5);
// }
//
// std::cout << "boundary edges centroids : ok" << std::endl;
//
// //triangule old boundary faces
// std::vector<Dart> oldb;
//
// std::cout << "nb darts : " << myMap.getNbDarts() << std::endl;
//
// CellMarker<FACE> cmf(myMap);
// for(Dart d = myMap.begin(); d != myMap.end(); myMap.next(d))
// {
// if(!cmf.isMarked(d) && myMap.isBoundaryMarked2(d))
// {
// oldb.push_back(d);
// cmf.mark(d);
// std::cout << "d = " << d << std::endl;
// }
// }
//
// for(std::vector<Dart>::iterator it = oldb.begin() ; it != oldb.end() ; ++it)
// {
// Dart db = *it;
// Dart d1 = myMap.phi1(db);
// myMap.splitFace(db, d1) ;
// myMap.cutEdge(myMap.phi_1(db)) ;
// Dart x = myMap.phi2(myMap.phi_1(db)) ;
// Dart dd = myMap.phi1(myMap.phi1(myMap.phi1(x)));
// while(dd != x)
// {
// Dart next = myMap.phi1(dd) ;
// myMap.splitFace(dd, myMap.phi1(x)) ;
// dd = next ;
// }
//
// }
//
// std::cout << "boundary face triangulation : ok" << std::endl;
//
// myMap.swapEmbeddingContainers(FACE, PFP::MAP::EDGE_OF_PARENT) ;
//
// std::cout << "swap containers : ok" << std::endl;
//
// FaceAttribute<PFP::VEC3> positionF;
// positionF = positionE;
//
// Algo::Surface::Geometry::computeCentroidFaces<PFP>(myMap, position, positionF) ;
//
// for(std::vector<Dart>::iterator it = oldb.begin() ; it != oldb.end() ; ++it)
// {
// myMap.fillHole(*it);
// }
//
// std::cout << "fillHole : ok" << std::endl;
//
// myMap.computeDual();
//
// //myMap.closeMap();
//
// position = positionF ;
//
// myMap.check();
FaceAttribute
<
PFP
::
VEC3
>
positionF
=
myMap
.
getAttribute
<
PFP
::
VEC3
,
FACE
>
(
"position"
)
;
if
(
!
positionF
.
isValid
())
positionF
=
myMap
.
addAttribute
<
PFP
::
VEC3
,
FACE
>
(
"position"
)
;
Algo
::
Surface
::
Geometry
::
computeCentroidFaces
<
PFP
>
(
myMap
,
position
,
positionF
)
;
myMap
.
computeDual
();
position
=
positionF
;
Algo
::
Surface
::
Export
::
exportOFF
<
PFP
>
(
myMap
,
position
,
"result.off"
);
std
::
cout
<<
"Exported"
<<
std
::
endl
;
...
...
include/Algo/Decimation/edgeSelector.h
View file @
6b34f7fb
...
...
@@ -379,14 +379,14 @@ public:
if
(
!
normal
.
isValid
())
{
normal
=
m
.
template
addAttribute
<
VEC3
,
VERTEX
>(
"normal"
)
;
Algo
::
Geometry
::
computeNormalVertices
<
PFP
>
(
m
,
pos
,
normal
)
;
Algo
::
Surface
::
Geometry
::
computeNormalVertices
<
PFP
>
(
m
,
pos
,
normal
)
;
}
edgeangle
=
m
.
template
getAttribute
<
REAL
,
EDGE
>(
"edgeangle"
)
;
if
(
!
edgeangle
.
isValid
())
{
edgeangle
=
m
.
template
addAttribute
<
REAL
,
EDGE
>(
"edgeangle"
)
;
Algo
::
Geometry
::
computeAnglesBetweenNormalsOnEdges
<
PFP
>
(
m
,
pos
,
edgeangle
)
;
Algo
::
Surface
::
Geometry
::
computeAnglesBetweenNormalsOnEdges
<
PFP
>
(
m
,
pos
,
edgeangle
)
;
}
kmax
=
m
.
template
getAttribute
<
REAL
,
VERTEX
>(
"kmax"
)
;
...
...
@@ -403,7 +403,7 @@ public:
Kmax
=
m
.
template
addAttribute
<
VEC3
,
VERTEX
>(
"Kmax"
)
;
Kmin
=
m
.
template
addAttribute
<
VEC3
,
VERTEX
>(
"Kmin"
)
;
Knormal
=
m
.
template
addAttribute
<
VEC3
,
VERTEX
>(
"Knormal"
)
;
Algo
::
Geometry
::
computeCurvatureVertices_NormalCycles
<
PFP
>
(
m
,
radius
,
pos
,
normal
,
edgeangle
,
kmax
,
kmin
,
Kmax
,
Kmin
,
Knormal
)
;
Algo
::
Surface
::
Geometry
::
computeCurvatureVertices_NormalCycles
<
PFP
>
(
m
,
radius
,
pos
,
normal
,
edgeangle
,
kmax
,
kmin
,
Kmax
,
Kmin
,
Knormal
)
;
}
edgeInfo
=
m
.
template
addAttribute
<
EdgeInfo
,
EDGE
>(
"edgeInfo"
)
;
...
...
@@ -467,7 +467,7 @@ public:
if
(
!
edgeangle
.
isValid
())
{
edgeangle
=
m
.
template
addAttribute
<
REAL
,
EDGE
>(
"edgeangle"
)
;
Algo
::
Geometry
::
computeAnglesBetweenNormalsOnEdges
<
PFP
>
(
m
,
pos
,
edgeangle
)
;
Algo
::
Surface
::
Geometry
::
computeAnglesBetweenNormalsOnEdges
<
PFP
>
(
m
,
pos
,
edgeangle
)
;
}
edgeInfo
=
m
.
template
addAttribute
<
EdgeInfo
,
EDGE
>(
"edgeInfo"
)
;
...
...
include/Algo/Decimation/edgeSelector.hpp
View file @
6b34f7fb
...
...
@@ -300,7 +300,7 @@ void EdgeSelector_Length<PFP>::updateEdgeInfo(Dart d, bool recompute)
template <typename PFP>
void EdgeSelector_Length<PFP>::computeEdgeInfo(Dart d, EdgeInfo& einfo)
{
VEC3 vec = Algo::Geometry::vectorOutOfDart<PFP>(this->m_map, d, this->m_position) ;
VEC3 vec = Algo::
Surface::
Geometry::vectorOutOfDart<PFP>(this->m_map, d, this->m_position) ;
einfo.it = edges.insert(std::make_pair(vec.norm2(), d)) ;
einfo.valid = true ;
}
...
...
@@ -989,7 +989,7 @@ void EdgeSelector_NormalArea<PFP>::computeEdgeInfo(Dart d, EdgeInfo& einfo)
template <typename PFP>
void EdgeSelector_NormalArea<PFP>::computeEdgeMatrix(Dart d)
{
const typename PFP::VEC3 e = Algo::Geometry::vectorOutOfDart<PFP>(this->m_map, d, this->m_position) ;
const typename PFP::VEC3 e = Algo::
Surface::
Geometry::vectorOutOfDart<PFP>(this->m_map, d, this->m_position) ;
edgeMatrix[d].identity();
edgeMatrix[d] *= e.norm2();
edgeMatrix[d] -= Geom::transposed_vectors_mult(e,e) ;
...
...
@@ -1086,15 +1086,15 @@ void EdgeSelector_Curvature<PFP>::updateAfterCollapse(Dart d2, Dart dd2)
{
typename PFP::MAP& m = this->m_map ;
normal[d2] = Algo::Geometry::vertexNormal<PFP>(m, d2, this->m_position) ;
Algo::Geometry::computeCurvatureVertex_NormalCycles<PFP>(m, d2, radius, this->m_position, normal, edgeangle, kmax, kmin, Kmax, Kmin, Knormal) ;
normal[d2] = Algo::
Surface::
Geometry::vertexNormal<PFP>(m, d2, this->m_position) ;
Algo::
Surface::
Geometry::computeCurvatureVertex_NormalCycles<PFP>(m, d2, radius, this->m_position, normal, edgeangle, kmax, kmin, Kmax, Kmin, Knormal) ;
Dart vit = d2 ;
do
{
Dart nVert = m.phi1(vit) ;
normal[nVert] = Algo::Geometry::vertexNormal<PFP>(m, nVert, this->m_position) ;
Algo::Geometry::computeCurvatureVertex_NormalCycles<PFP>(m, nVert, radius, this->m_position, normal, edgeangle, kmax, kmin, Kmax, Kmin, Knormal) ;
normal[nVert] = Algo::
Surface::
Geometry::vertexNormal<PFP>(m, nVert, this->m_position) ;
Algo::
Surface::
Geometry::computeCurvatureVertex_NormalCycles<PFP>(m, nVert, radius, this->m_position, normal, edgeangle, kmax, kmin, Kmax, Kmin, Knormal) ;
updateEdgeInfo(m.phi1(vit), false) ; // must recompute some edge infos in the
if(vit == d2 || vit == dd2) // neighborhood of the collapsed edge
...
...
@@ -1193,8 +1193,8 @@ void EdgeSelector_Curvature<PFP>::computeEdgeInfo(Dart d, EdgeInfo& einfo)
this->m_position[newV] = m_positionApproximator->getApprox(d) ;
// compute things on the coarse version of the mesh
normal[newV] = Algo::Geometry::vertexNormal<PFP>(m, d2, this->m_position) ;
Algo::Geometry::computeCurvatureVertex_NormalCycles<PFP>(m, d2, radius, this->m_position, normal, edgeangle, kmax, kmin, Kmax, Kmin, Knormal) ;
normal[newV] = Algo::
Surface::
Geometry::vertexNormal<PFP>(m, d2, this->m_position) ;
Algo::
Surface::
Geometry::computeCurvatureVertex_NormalCycles<PFP>(m, d2, radius, this->m_position, normal, edgeangle, kmax, kmin, Kmax, Kmin, Knormal) ;
// VEC3 norm = normal[newV] ;
REAL mCurv = (kmax[newV] + kmin[newV]) / REAL(2) ;
...
...
@@ -1335,7 +1335,7 @@ void EdgeSelector_CurvatureTensor<PFP>::updateAfterCollapse(Dart d2, Dart dd2)
{
if (!eMark.isMarked(dit2))
{
edgeangle[dit2] = Algo::Geometry::computeAngleBetweenNormalsOnEdge<PFP>(m, dit2, this->m_position) ;
edgeangle[dit2] = Algo::
Surface::
Geometry::computeAngleBetweenNormalsOnEdge<PFP>(m, dit2, this->m_position) ;
eMark.mark(dit2);
}
}
...
...
@@ -1408,11 +1408,11 @@ void EdgeSelector_CurvatureTensor<PFP>::computeEdgeInfo(Dart d, EdgeInfo& einfo)
// compute tensor before collapse
MATRIX tens1;
Algo::Selection::Collector_OneRing_AroundEdge<PFP> col1 (m);
Algo::S
urface::S
election::Collector_OneRing_AroundEdge<PFP> col1 (m);
col1.collectAll(d);
col1.computeNormalCyclesTensor(this->m_position,edgeangle,tens1); // edgeangle is up to date here
tens1 *= col1.computeArea(this->m_position); // mean tensor * area = integral of the tensor
Algo::Geometry::normalCycles_SortTensor<PFP>(tens1);
Algo::
Surface::
Geometry::normalCycles_SortTensor<PFP>(tens1);
// temporary edge collapse
Dart d2 = m.phi2(m.phi_1(d)) ;
...
...
@@ -1423,11 +1423,11 @@ void EdgeSelector_CurvatureTensor<PFP>::computeEdgeInfo(Dart d, EdgeInfo& einfo)
// compute tensor after collapse
MATRIX tens2;
Algo::Selection::Collector_OneRing<PFP> col2 (m);
Algo::S
urface::S
election::Collector_OneRing<PFP> col2 (m);
col2.collectAll(d);
col2.computeNormalCyclesTensor(this->m_position,tens2); // edgeangle is not up to date here
tens2 *= col2.computeArea(this->m_position); // mean tensor * area = integral of the tensor
Algo::Geometry::normalCycles_SortTensor<PFP>(tens2);
Algo::
Surface::
Geometry::normalCycles_SortTensor<PFP>(tens2);
// vertex split to reset the initial connectivity and embeddings
m.insertTrianglePair(d, d2, dd2) ;
...
...
include/Algo/Geometry/curvature.h
View file @
6b34f7fb
...
...
@@ -181,7 +181,7 @@ void computeCurvatureVertex_NormalCycles_Projected(
template
<
typename
PFP
>
void
computeCurvatureVertices_NormalCycles
(
typename
PFP
::
MAP
&
map
,
Algo
::
Selection
::
Collector
<
PFP
>
&
neigh
,
Algo
::
S
urface
::
S
election
::
Collector
<
PFP
>
&
neigh
,
const
VertexAttribute
<
typename
PFP
::
VEC3
>&
position
,
const
VertexAttribute
<
typename
PFP
::
VEC3
>&
normal
,
const
EdgeAttribute
<
typename
PFP
::
REAL
>&
edgeangle
,
...
...
@@ -196,7 +196,7 @@ template <typename PFP>
void
computeCurvatureVertex_NormalCycles
(
typename
PFP
::
MAP
&
map
,
Dart
dart
,
Algo
::
Selection
::
Collector
<
PFP
>
&
neigh
,
Algo
::
S
urface
::
S
election
::
Collector
<
PFP
>
&
neigh
,
const
VertexAttribute
<
typename
PFP
::
VEC3
>&
position
,
const
VertexAttribute
<
typename
PFP
::
VEC3
>&
normal
,
const
EdgeAttribute
<
typename
PFP
::
REAL
>&
edgeangle
,
...
...
@@ -209,7 +209,7 @@ void computeCurvatureVertex_NormalCycles(
template
<
typename
PFP
>
void
computeCurvatureVertices_NormalCycles_Projected
(
typename
PFP
::
MAP
&
map
,
Algo
::
Selection
::
Collector
<
PFP
>
&
neigh
,
Algo
::
S
urface
::
S
election
::
Collector
<
PFP
>
&
neigh
,
const
VertexAttribute
<
typename
PFP
::
VEC3
>&
position
,
const
VertexAttribute
<
typename
PFP
::
VEC3
>&
normal
,
const
EdgeAttribute
<
typename
PFP
::
REAL
>&
edgeangle
,
...
...
@@ -224,7 +224,7 @@ template <typename PFP>
void
computeCurvatureVertex_NormalCycles_Projected
(
typename
PFP
::
MAP
&
map
,
Dart
dart
,
Algo
::
Selection
::
Collector
<
PFP
>
&
neigh
,
Algo
::
S
urface
::
S
election
::
Collector
<
PFP
>
&
neigh
,
const
VertexAttribute
<
typename
PFP
::
VEC3
>&
position
,
const
VertexAttribute
<
typename
PFP
::
VEC3
>&
normal
,
const
EdgeAttribute
<
typename
PFP
::
REAL
>&
edgeangle
,
...
...
include/Algo/Geometry/curvature.hpp
View file @
6b34f7fb
...
...
@@ -80,7 +80,7 @@ void computeCurvatureVertex_QuadraticFitting(
VEC3
n
=
normal
[
dart
]
;
MATRIX33
localFrame
=
Geometry
::
vertexLocalFrame
<
PFP
>
(
map
,
dart
,
position
,
n
)
;
MATRIX33
localFrame
=
Algo
::
Geometry
::
vertexLocalFrame
<
PFP
>
(
map
,
dart
,
position
,
n
)
;
MATRIX33
invLocalFrame
;
localFrame
.
invert
(
invLocalFrame
)
;
...
...
include/Algo/Geometry/localFrame.h
View file @
6b34f7fb
...
...
@@ -44,8 +44,8 @@ namespace Geometry
template
<
typename
PFP
>
void
vertexLocalFrame
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
const
VertexAttribute
<
typename
PFP
::
VEC3
>&
position
,
typename
PFP
::
VEC3
&
X
,
typename
PFP
::
VEC3
&
Y
,
typename
PFP
::
VEC3
&
Z
)
{
Z
=
vertexNormal
<
PFP
>
(
map
,
d
,
position
)
;
X
=
vectorOutOfDart
<
PFP
>
(
map
,
d
,
position
)
;
Z
=
Algo
::
Surface
::
Geometry
::
vertexNormal
<
PFP
>
(
map
,
d
,
position
)
;
X
=
Algo
::
Surface
::
Geometry
::
vectorOutOfDart
<
PFP
>
(
map
,
d
,
position
)
;
Y
=
Z
^
X
;
Y
.
normalize
()
;
X
=
Y
^
Z
;
...
...
@@ -70,7 +70,7 @@ template <typename PFP>
void
vertexLocalFrame
(
typename
PFP
::
MAP
&
map
,
Dart
d
,
const
VertexAttribute
<
typename
PFP
::
VEC3
>&
position
,
typename
PFP
::
VEC3
&
normal
,
typename
PFP
::
VEC3
&
X
,
typename
PFP
::
VEC3
&
Y
,
typename
PFP
::
VEC3
&
Z
)
{
Z
=
normal
;
X
=
vectorOutOfDart
<
PFP
>
(
map
,
d
,
position
)
;
X
=
Algo
::
Surface
::
Geometry
::
vectorOutOfDart
<
PFP
>
(
map
,
d
,
position
)
;
Y
=
Z
^
X
;
Y
.
normalize
()
;
X
=
Y
^
Z
;
...
...
include/Algo/Multiresolution/Map3MR/Filters/bertram.h
View file @
6b34f7fb
...
...
@@ -59,7 +59,7 @@ namespace Filters
//w-lift(a)
template
<
typename
PFP
>
class
Ber02OddSynthesisFilter
:
public
Filter
class
Ber02OddSynthesisFilter
:
public
Algo
::
MR
::
Filter
{
protected:
typename
PFP
::
MAP
&
m_map
;
...
...
@@ -154,7 +154,7 @@ public:
// s-lift(a)
template
<
typename
PFP
>
class
Ber02EvenSynthesisFilter
:
public
Filter
class
Ber02EvenSynthesisFilter
:
public
Algo
::
MR
::
Filter
{
protected:
typename
PFP
::
MAP
&
m_map
;
...
...
@@ -371,7 +371,7 @@ public:
// s-scale(a)
template
<
typename
PFP
>
class
Ber02ScaleSynthesisFilter
:
public
Filter
class
Ber02ScaleSynthesisFilter
:
public
Algo
::
MR
::
Filter
{
protected:
typename
PFP
::
MAP
&
m_map
;
...
...
@@ -426,7 +426,7 @@ public:
//w-lift(a)
template
<
typename
PFP
>
class
Ber02OddAnalysisFilter
:
public
Filter
class
Ber02OddAnalysisFilter
:
public
Algo
::
MR
::
Filter
{
protected:
typename
PFP
::
MAP
&
m_map
;
...
...
@@ -521,7 +521,7 @@ public:
// s-lift(a)
template
<
typename
PFP
>
class
Ber02EvenAnalysisFilter
:
public
Filter
class
Ber02EvenAnalysisFilter
:
public
Algo
::
MR
::
Filter
{
protected:
typename
PFP
::
MAP
&
m_map
;
...
...
@@ -738,7 +738,7 @@ public:
// s-scale(a)
template
<
typename
PFP
>
class
Ber02ScaleAnalysisFilter
:
public
Filter
class
Ber02ScaleAnalysisFilter
:
public
Algo
::
MR
::
Filter
{
protected:
typename
PFP
::
MAP
&
m_map
;
...
...
include/Algo/Multiresolution/Map3MR/Filters/lerp.h
View file @
6b34f7fb
...
...
@@ -58,7 +58,7 @@ namespace Filters
template
<
typename
PFP
>
class
LerpQuadOddSynthesisFilter
:
public
Filter
class
LerpQuadOddSynthesisFilter
:
public
Algo
::
MR
::
Filter
{
protected:
typename
PFP
::
MAP
&
m_map
;
...
...
@@ -73,7 +73,7 @@ public:
TraversorW
<
typename
PFP
::
MAP
>
travW
(
m_map
)
;
for
(
Dart
d
=
travW
.
begin
();
d
!=
travW
.
end
();
d
=
travW
.
next
())
{
typename
PFP
::
VEC3
vc
=
Algo
::
Geometry
::
volumeCentroid
<
PFP
>
(
m_map
,
d
,
m_position
);
typename
PFP
::
VEC3
vc
=
Algo
::
Surface
::
Geometry
::
volumeCentroid
<
PFP
>
(
m_map
,
d
,
m_position
);
unsigned
int
count
=
0
;
typename
PFP
::
VEC3
ec
(
0.0
);
...
...
@@ -169,7 +169,7 @@ public:
template
<
typename
PFP
>
class
LerpQuadOddAnalysisFilter
:
public
Filter
class
LerpQuadOddAnalysisFilter
:
public
Algo
::
MR
::
Filter
{
protected:
typename
PFP
::
MAP
&
m_map
;
...
...
@@ -222,7 +222,7 @@ public:
TraversorW
<
typename
PFP
::
MAP
>
travW
(
m_map
)
;
for
(
Dart
d
=
travW
.
begin
();
d
!=
travW
.
end
();
d
=
travW
.
next
())
{
typename
PFP
::
VEC3
vc
=
Algo
::
Geometry
::
volumeCentroid
<
PFP
>
(
m_map
,
d
,
m_position
);
typename
PFP
::
VEC3
vc
=
Algo
::
Surface
::
Geometry
::
volumeCentroid
<
PFP
>
(
m_map
,
d
,
m_position
);
unsigned
int
count
=
0
;
typename
PFP
::
VEC3
ec
(
0.0
);
...
...
@@ -275,7 +275,7 @@ public:
template
<
typename
PFP
>
class
LerpEdgeSynthesisFilter
:
public
Filter
class
LerpEdgeSynthesisFilter
:
public
Algo
::
MR
::
Filter
{
protected:
typename
PFP
::
MAP
&
m_map
;
...
...
@@ -303,7 +303,7 @@ public:
}
;
template
<
typename
PFP
>
class
LerpFaceSynthesisFilter
:
public
Filter
class
LerpFaceSynthesisFilter
:
public
Algo
::
MR
::
Filter
{
protected:
typename
PFP
::
MAP
&
m_map
;
...
...
@@ -332,7 +332,7 @@ public:
}
;
template
<
typename
PFP
>
class
LerpTriQuadFaceSynthesisFilter
:
public
Filter
class
LerpTriQuadFaceSynthesisFilter
:
public
Algo
::
MR
::
Filter
{
protected:
typename
PFP
::
MAP
&
m_map
;
...
...
@@ -349,7 +349,7 @@ public:
{
if
(
m_map
.
faceDegree
(
d
)
>
3
)
{
typename
PFP
::
VEC3
p
=
Algo
::
Geometry
::
faceCentroid
<
PFP
>
(
m_map
,
d
,
m_position
);
typename
PFP
::
VEC3
p
=
Algo
::
Surface
::
Geometry
::
faceCentroid
<
PFP
>
(
m_map
,
d
,
m_position
);
m_map
.
incCurrentLevel
()
;
...
...
@@ -364,7 +364,7 @@ public:
template
<
typename
PFP
>
class
LerpVolumeSynthesisFilter
:
public
Filter
class
LerpVolumeSynthesisFilter
:
public
Algo
::
MR
::
Filter
{
protected:
typename
PFP
::
MAP
&
m_map
;
...
...
@@ -379,9 +379,11 @@ public:
TraversorW
<
typename
PFP
::
MAP
>
trav
(
m_map
)
;
for
(
Dart
d
=
trav
.
begin
();
d
!=
trav
.
end
();
d
=
trav
.
next
())
{
if
(
!
Algo
::
Modelisation
::
Tetrahedralization
::
isTetrahedron
<
PFP
>
(
m_map
,
d
)
&&
!
Algo
::
Modelisation
::
isPrism
<
PFP
>
(
m_map
,
d
)
&&
!
Algo
::
Modelisation
::
isPyra
<
PFP
>
(
m_map
,
d
))
if
(
!
Algo
::
Volume
::
Modelisation
::
Tetrahedralization
::
isTetrahedron
<
PFP
>
(
m_map
,
d
)
&&
!
Algo
::
Surface
::
Modelisation
::
isPrism
<
PFP
>
(
m_map
,
d
)
&&
!
Algo
::
Surface
::
Modelisation
::
isPyra
<
PFP
>
(
m_map
,
d
))
{
typename
PFP
::
VEC3
p
=
Algo
::
Geometry
::
volumeCentroid
<
PFP
>
(
m_map
,
d
,
m_position
);
typename
PFP
::
VEC3
p
=
Algo
::
Surface
::
Geometry
::
volumeCentroid
<
PFP
>
(
m_map
,
d
,
m_position
);
m_map
.
incCurrentLevel
()
;
...
...
@@ -395,7 +397,7 @@ public:
}
;
template
<
typename
PFP
>
class
LerpSqrt3VolumeSynthesisFilter
:
public
Filter
class
LerpSqrt3VolumeSynthesisFilter
:
public
Algo
::
MR
::
Filter
{
protected:
typename
PFP
::
MAP
&
m_map
;
...
...
include/Algo/Multiresolution/Map3MR/Filters/mcCrackenJoy.h
View file @
6b34f7fb
...
...
@@ -50,7 +50,7 @@ namespace Filters
/* Catmull-clark on Boundary Vertices and MJ96 on Insides Vertices
*********************************************************************************/
template
<
typename
PFP
>
class
MJ96VertexSubdivision
:
public
Filter
class
MJ96VertexSubdivision
:
public
Algo
::
MR
::
Filter
{
protected:
typename
PFP
::
MAP
&
m_map
;
...
...
@@ -155,7 +155,7 @@ public:
};
template
<
typename
PFP
>
class
MJ96EdgeSubdivision
:
public
Filter
class
MJ96EdgeSubdivision
:
public
Algo
::
MR
::
Filter
{
protected:
typename
PFP
::
MAP
&
m_map
;
...
...
@@ -245,7 +245,7 @@ public:
};
template
<
typename
PFP
>
class
MJ96FaceSubdivision
:
public
Filter
class
MJ96FaceSubdivision
:
public
Algo
::
MR
::
Filter
{
protected:
typename
PFP
::
MAP
&
m_map
;
...
...
@@ -305,7 +305,7 @@ public:
};
template
<
typename
PFP
>
class
MJ96VolumeSubdivision
:
public
Filter
class
MJ96VolumeSubdivision
:
public
Algo
::
MR
::
Filter
{
protected:
typename
PFP
::
MAP
&
m_map
;
...
...
include/Algo/Multiresolution/Map3MR/Filters/schaefer.h
View file @
6b34f7fb
...
...
@@ -156,7 +156,7 @@ typename PFP::VEC3 SHW04Vertex(typename PFP::MAP& map, const VertexAttribute<typ
*********************************************************************************/
template
<
typename
PFP
>
class
LoopEvenAnalysisFilter
:
public
Filter
class
LoopEvenAnalysisFilter
:
public
Algo
::
MR
::
Filter
{
protected:
typename
PFP
::
MAP
&
m_map
;
...
...
@@ -182,7 +182,7 @@ public:
}
;
template
<
typename
PFP
>
class
LoopNormalisationAnalysisFilter
:
public
Filter
class
LoopNormalisationAnalysisFilter
:
public
Algo
::
MR
::
Filter
{
protected:
typename
PFP
::
MAP
&
m_map
;
...
...
@@ -212,7 +212,7 @@ public:
}
;
template
<
typename
PFP
>
class
LoopOddAnalysisFilter
:
public
Filter
class
LoopOddAnalysisFilter
:
public
Algo
::
MR
::
Filter
{
protected:
typename
PFP
::
MAP
&
m_map
;
...
...
@@ -263,7 +263,7 @@ public:
/* Loop on Boundary Vertices and SHW04 on Insides Vertices
*********************************************************************************/
template
<
typename
PFP
>
class
LoopOddSynthesisFilter
:
public
Filter
class
LoopOddSynthesisFilter
:
public
Algo
::
MR
::
Filter
{
protected:
typename
PFP
::
MAP
&
m_map
;
...
...
@@ -306,7 +306,7 @@ public:
}
;
template
<
typename
PFP
>
class
LoopNormalisationSynthesisFilter
:
public
Filter
class
LoopNormalisationSynthesisFilter
:
public
Algo
::
MR
::
Filter
{
protected:
typename
PFP
::
MAP
&
m_map
;
...
...
@@ -336,7 +336,7 @@ public:
}
;
template
<
typename
PFP
>
class
LoopEvenSynthesisFilter
:
public
Filter
class
LoopEvenSynthesisFilter
:
public
Algo
::
MR
::
Filter
{
protected:
typename
PFP
::
MAP
&
m_map
;
...
...
@@ -362,7 +362,7 @@ public:
}
;
template
<
typename
PFP
>
class
LoopVolumeSynthesisFilter
:
public
Filter
class
LoopVolumeSynthesisFilter
:
public
Algo
::
MR
::
Filter
{
protected:
typename
PFP
::
MAP
&
m_map
;
...
...
@@ -393,7 +393,7 @@ public:
}
;
template
<
typename
PFP
>
class
SHW04VolumeNormalisationSynthesisFilter
:
public
Filter
class
SHW04VolumeNormalisationSynthesisFilter
:
public
Algo
::
MR
::
Filter
{
protected:
typename
PFP
::
MAP
&
m_map
;
...
...
include/Algo/Multiresolution/Map3MR/map3MR_PrimalRegular.hpp
View file @
6b34f7fb
...
...
@@ -133,88 +133,88 @@ void Map3MR<PFP>::splitSurfaceInVolume(std::vector<Dart>& vd, bool firstSideClos
/************************************************************************
* Level creation *
************************************************************************/
template
<
typename
PFP
>
void
Map3MR
<
PFP
>::
addNewLevelSqrt3
(
bool
embedNewVertices
)
{
m_map
.
pushLevel
();
m_map
.
addLevelBack
();
m_map
.
duplicateDarts
(
m_map
.
getMaxLevel
());
m_map
.
setCurrentLevel
(
m_map
.
getMaxLevel
());
DartMarkerStore
m
(
m_map
);
//
// 1-4 flip of all tetrahedra
//
TraversorW
<
typename
PFP
::
MAP
>
tW
(
m_map
);
for
(
Dart
dit
=
tW
.
begin
()
;
dit
!=
tW
.
end
()
;
dit
=
tW
.
next
())
{
Traversor3WF
<
typename
PFP
::
MAP
>
tWF
(
m_map
,
dit
);
for
(
Dart
ditWF
=
tWF
.
begin
()
;
ditWF
!=
tWF
.
end
()
;
ditWF
=
tWF
.
next
())
{
if
(
!
m_map
.
isBoundaryFace
(
ditWF
))
m
.
markOrbit
<
FACE
>
(
ditWF
);
}
Algo
::
Volume
::
Modelisation
::
Tetrahedralization
::
flip1To4
<
PFP
>
(
m_map
,
dit
);
}
/*
//
// 2-3 swap of all old interior faces
//
TraversorF<typename PFP::MAP> tF(m_map);
for(Dart dit = tF.begin() ; dit != tF.end() ; dit = tF.next())
{
if(m.isMarked(dit))
{
m.unmarkOrbit<FACE>(dit);
Algo::Volume::Modelisation::Tetrahedralization::swap2To3<PFP>(m_map, dit);
}
}
//
// 1-3 flip of all boundary tetrahedra
//
TraversorW<typename PFP::MAP> tWb(m_map);
for(Dart dit = tWb.begin() ; dit != tWb.end() ; dit = tWb.next())
{
if(m_map.isBoundaryVolume(dit))
{
Traversor3WE<typename PFP::MAP> tWE(m_map, dit);
for(Dart ditWE = tWE.begin() ; ditWE != tWE.end() ; ditWE = tWE.next())
{
if(m_map.isBoundaryEdge(ditWE))
m.markOrbit<EDGE>(ditWE);
}
Algo::Volume::Modelisation::Tetrahedralization::flip1To3<PFP>(m_map, dit);
}
}
//
// edge-removal on all old boundary edges
//
TraversorE<typename PFP::MAP> tE(m_map);
for(Dart dit = tE.begin() ; dit != tE.end() ; dit = tE.next())
{
if(m.isMarked(dit))
{
m.unmarkOrbit<EDGE>(dit);
Dart d = m_map.phi2(m_map.phi3(m_map.findBoundaryFaceOfEdge(dit)));
Algo::Volume::Modelisation::Tetrahedralization::swapGen3To2<PFP>(m_map, d);
}
}
*/
m_map
.
setCurrentLevel
(
m_map
.
getMaxLevel
());
m_map
.
popLevel
()
;
}
//
template <typename PFP>
//
void Map3MR<PFP>::addNewLevelSqrt3(bool embedNewVertices)
//
{
//
m_map.pushLevel();
//
//
m_map.addLevelBack();