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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thomas Pitiot
CGoGN
Commits
a55f60bf
Commit
a55f60bf
authored
Dec 13, 2012
by
untereiner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modifying subdivision filters
parent
411513f7
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
223 additions
and
24 deletions
+223
-24
include/Algo/Modelisation/primitives3d.h
include/Algo/Modelisation/primitives3d.h
+2
-0
include/Algo/Modelisation/primitives3d.hpp
include/Algo/Modelisation/primitives3d.hpp
+33
-2
include/Algo/Multiresolution/Map2MR/Filters/bertram.h
include/Algo/Multiresolution/Map2MR/Filters/bertram.h
+40
-4
include/Algo/Multiresolution/Map2MR/Filters/catmullClark.h
include/Algo/Multiresolution/Map2MR/Filters/catmullClark.h
+49
-0
include/Algo/Multiresolution/Map2MR/Filters/lerp.h
include/Algo/Multiresolution/Map2MR/Filters/lerp.h
+20
-0
include/Algo/Multiresolution/Map2MR/Filters/loop.h
include/Algo/Multiresolution/Map2MR/Filters/loop.h
+30
-0
include/Algo/Multiresolution/Map2MR/Filters/sqrt2.h
include/Algo/Multiresolution/Map2MR/Filters/sqrt2.h
+5
-0
include/Algo/Multiresolution/Map2MR/Filters/sqrt3.h
include/Algo/Multiresolution/Map2MR/Filters/sqrt3.h
+20
-0
include/Algo/Multiresolution/Map2MR/map2MR_PrimalRegular.hpp
include/Algo/Multiresolution/Map2MR/map2MR_PrimalRegular.hpp
+17
-11
include/Algo/Multiresolution/Map3MR/Filters/lerp.h
include/Algo/Multiresolution/Map3MR/Filters/lerp.h
+6
-6
include/Algo/Multiresolution/filter.h
include/Algo/Multiresolution/filter.h
+1
-1
No files found.
include/Algo/Modelisation/primitives3d.h
View file @
a55f60bf
...
...
@@ -156,6 +156,8 @@ public:
*/
void
embedHexaGrid
(
float
x
,
float
y
,
float
z
);
void
embedHexaGrid
(
typename
PFP
::
VEC3
origin
,
float
x
,
float
y
,
float
z
);
/**
* Create a 3D grid
* @param nx nb of cubes in x
...
...
include/Algo/Modelisation/primitives3d.hpp
View file @
a55f60bf
...
...
@@ -37,14 +37,14 @@ template <typename PFP>
Dart
Primitive3D
<
PFP
>::
HexaGrid1Topo
(
unsigned
int
nx
)
{
// first cube
Dart
d0
=
createHexahedron
<
PFP
>
(
m_map
);
Dart
d0
=
createHexahedron
<
PFP
>
(
m_map
,
false
);
m_tableVertDarts
.
push_back
(
d0
);
Dart
d1
=
m_map
.
template
phi
<
2112
>(
d0
);
for
(
unsigned
int
i
=
1
;
i
<
nx
;
++
i
)
{
Dart
d2
=
createHexahedron
<
PFP
>
(
m_map
);
Dart
d2
=
createHexahedron
<
PFP
>
(
m_map
,
false
);
m_tableVertDarts
.
push_back
(
d2
);
m_map
.
sewVolumes
(
d1
,
d2
,
false
);
d1
=
m_map
.
template
phi
<
2112
>(
d2
);
...
...
@@ -183,6 +183,37 @@ void Primitive3D<PFP>::embedHexaGrid(float x, float y, float z)
}
}
template
<
typename
PFP
>
void
Primitive3D
<
PFP
>::
embedHexaGrid
(
typename
PFP
::
VEC3
origin
,
float
x
,
float
y
,
float
z
)
{
if
(
m_kind
!=
HEXAGRID
)
{
CGoGNerr
<<
"Warning try to embedHexaGrid something that is not a grid of hexahedron"
<<
CGoGNendl
;
return
;
}
float
dx
=
x
/
float
(
m_nx
);
float
dy
=
y
/
float
(
m_ny
);
float
dz
=
z
/
float
(
m_nz
);
unsigned
int
nbs
=
(
m_nx
+
1
)
*
(
m_ny
+
1
);
for
(
unsigned
int
i
=
0
;
i
<=
m_nz
;
++
i
)
{
for
(
unsigned
int
j
=
0
;
j
<=
m_ny
;
++
j
)
{
for
(
unsigned
int
k
=
0
;
k
<=
m_nx
;
++
k
)
{
typename
PFP
::
VEC3
pos
(
-
x
/
2.0
f
+
dx
*
float
(
k
),
-
y
/
2.0
f
+
dy
*
float
(
j
),
-
z
/
2.0
f
+
dz
*
float
(
i
));
Dart
d
=
m_tableVertDarts
[
i
*
nbs
+
j
*
(
m_nx
+
1
)
+
k
];
m_map
.
template
setOrbitEmbeddingOnNewCell
<
VERTEX
>(
d
);
m_positions
[
d
]
=
origin
+
pos
;
}
}
}
}
template
<
typename
PFP
>
void
Primitive3D
<
PFP
>::
transform
(
const
Geom
::
Matrix44f
&
matrice
)
{
...
...
include/Algo/Multiresolution/Map2MR/Filters/bertram.h
View file @
a55f60bf
...
...
@@ -133,7 +133,16 @@ public:
m_map
.
incCurrentLevel
()
;
Dart
midF
=
m_map
.
phi1
(
m_map
.
phi1
(
d
));
m_position
[
midF
]
+=
vf
+
ef
;
if
(
filtering
)
{
std
::
cout
<<
"sans +="
<<
std
::
endl
;
m_position
[
midF
]
=
vf
+
ef
;
}
else
{
std
::
cout
<<
"avec +="
<<
std
::
endl
;
m_position
[
midF
]
+=
vf
+
ef
;
}
m_map
.
decCurrentLevel
()
;
}
...
...
@@ -146,7 +155,16 @@ public:
m_map
.
incCurrentLevel
()
;
Dart
midV
=
m_map
.
phi1
(
d
)
;
m_position
[
midV
]
+=
ve
;
if
(
filtering
)
{
std
::
cout
<<
"sans +="
<<
std
::
endl
;
m_position
[
midV
]
=
ve
;
}
else
{
std
::
cout
<<
"avec +="
<<
std
::
endl
;
m_position
[
midV
]
+=
ve
;
}
m_map
.
decCurrentLevel
()
;
}
}
...
...
@@ -251,9 +269,15 @@ public:
ev
*=
2
*
m_a
;
if
(
filtering
)
{
std
::
cout
<<
"sans +="
<<
std
::
endl
;
m_position
[
db
]
=
ev
;
}
else
{
std
::
cout
<<
"avec +="
<<
std
::
endl
;
m_position
[
db
]
+=
ev
;
}
}
else
{
...
...
@@ -276,9 +300,15 @@ public:
ev
/=
count
;
ev
*=
4
*
m_a
;
if
(
filtering
)
m_position
[
d
]
=
fv
;
// + ev;
{
std
::
cout
<<
"sans +="
<<
std
::
endl
;
m_position
[
d
]
=
fv
+
ev
;
}
else
{
std
::
cout
<<
"avec +="
<<
std
::
endl
;
m_position
[
d
]
+=
fv
+
ev
;
}
}
}
...
...
@@ -306,9 +336,15 @@ public:
m_map
.
incCurrentLevel
()
;
Dart
midF
=
m_map
.
phi1
(
d
);
if
(
filtering
)
m_position
[
midF
]
+=
fe
;
{
std
::
cout
<<
"sans +="
<<
std
::
endl
;
m_position
[
midF
]
=
fe
;
}
else
{
std
::
cout
<<
"avec +="
<<
std
::
endl
;
m_position
[
midF
]
+=
fe
;
}
m_map
.
decCurrentLevel
()
;
}
}
...
...
include/Algo/Multiresolution/Map2MR/Filters/catmullClark.h
View file @
a55f60bf
...
...
@@ -90,6 +90,11 @@ public:
first
=
false
;
}
}
void
operator
()
(
bool
filtering
)
{
}
}
;
template
<
typename
PFP
>
...
...
@@ -118,6 +123,11 @@ public:
first
=
false
;
}
}
void
operator
()
(
bool
filtering
)
{
}
}
;
template
<
typename
PFP
>
...
...
@@ -144,6 +154,11 @@ public:
m_map
.
decCurrentLevel
()
;
}
}
void
operator
()
(
bool
filtering
)
{
}
}
;
template
<
typename
PFP
>
...
...
@@ -192,6 +207,11 @@ public:
}
}
void
operator
()
(
bool
filtering
)
{
}
}
;
template
<
typename
PFP
>
...
...
@@ -244,6 +264,11 @@ public:
m_map
.
decCurrentLevel
()
;
}
}
void
operator
()
(
bool
filtering
)
{
}
}
;
template
<
typename
PFP
>
...
...
@@ -277,6 +302,11 @@ public:
m_map
.
decCurrentLevel
()
;
}
}
void
operator
()
(
bool
filtering
)
{
}
}
;
template
<
typename
PFP
>
...
...
@@ -310,6 +340,11 @@ public:
m_map
.
decCurrentLevel
()
;
}
}
void
operator
()
(
bool
filtering
)
{
}
}
;
template
<
typename
PFP
>
...
...
@@ -364,6 +399,11 @@ public:
}
}
void
operator
()
(
bool
filtering
)
{
}
}
;
template
<
typename
PFP
>
...
...
@@ -411,6 +451,10 @@ public:
m_position
[
m_map
.
phi2
(
m_map
.
phi1
(
d
))]
=
m_position
[
m_map
.
phi2
(
m_map
.
phi1
(
d
))]
-
v
-
e
;
m_map
.
decCurrentLevel
()
;
}
}
void
operator
()
(
bool
filtering
)
{
}
}
;
...
...
@@ -439,6 +483,11 @@ public:
m_map
.
decCurrentLevel
()
;
}
}
void
operator
()
(
bool
filtering
)
{
}
}
;
}
// namespace Filters
...
...
include/Algo/Multiresolution/Map2MR/Filters/lerp.h
View file @
a55f60bf
...
...
@@ -99,6 +99,11 @@ public:
m_map
.
decCurrentLevel
()
;
}
}
void
operator
()
(
bool
filtering
)
{
}
};
// Tri/quad refinement
...
...
@@ -156,6 +161,11 @@ public:
m_map
.
decCurrentLevel
()
;
}
}
void
operator
()
(
bool
filtering
)
{
}
};
/*********************************************************************************
...
...
@@ -214,6 +224,11 @@ public:
m_map
.
decCurrentLevel
()
;
}
}
void
operator
()
(
bool
filtering
)
{
}
};
// Tri/quad refinement
...
...
@@ -271,6 +286,11 @@ public:
}
}
}
void
operator
()
(
bool
filtering
)
{
}
};
}
// namespace Filters
...
...
include/Algo/Multiresolution/Map2MR/Filters/loop.h
View file @
a55f60bf
...
...
@@ -121,6 +121,11 @@ public:
m_map
.
decCurrentLevel
()
;
}
}
void
operator
()
(
bool
filtering
)
{
}
}
;
template
<
typename
PFP
>
...
...
@@ -143,6 +148,11 @@ public:
m_position
[
d
]
-=
p
;
}
}
void
operator
()
(
bool
filtering
)
{
}
}
;
template
<
typename
PFP
>
...
...
@@ -168,6 +178,11 @@ public:
m_position
[
d
]
/=
n
;
}
}
void
operator
()
(
bool
filtering
)
{
}
}
;
/*********************************************************************************
...
...
@@ -200,6 +215,11 @@ public:
m_map
.
decCurrentLevel
()
;
}
}
void
operator
()
(
bool
filtering
)
{
}
}
;
template
<
typename
PFP
>
...
...
@@ -222,6 +242,11 @@ public:
m_position
[
d
]
+=
p
;
}
}
void
operator
()
(
bool
filtering
)
{
}
}
;
template
<
typename
PFP
>
...
...
@@ -247,6 +272,11 @@ public:
m_position
[
d
]
*=
n
;
}
}
void
operator
()
(
bool
filtering
)
{
}
}
;
}
// namespace Filters
...
...
include/Algo/Multiresolution/Map2MR/Filters/sqrt2.h
View file @
a55f60bf
...
...
@@ -80,6 +80,11 @@ public:
}
}
void
operator
()
(
bool
filtering
)
{
}
}
;
...
...
include/Algo/Multiresolution/Map2MR/Filters/sqrt3.h
View file @
a55f60bf
...
...
@@ -141,6 +141,11 @@ public:
m_map
.
decCurrentLevel
()
;
}
}
void
operator
()
(
bool
filtering
)
{
}
}
;
template
<
typename
PFP
>
...
...
@@ -225,6 +230,11 @@ public:
}
}
}
void
operator
()
(
bool
filtering
)
{
}
}
;
template
<
typename
PFP
>
...
...
@@ -275,6 +285,11 @@ public:
}
}
void
operator
()
(
bool
filtering
)
{
}
}
;
template
<
typename
PFP
>
...
...
@@ -312,6 +327,11 @@ public:
}
}
void
operator
()
(
bool
filtering
)
{
}
}
;
/*********************************************************************************
...
...
include/Algo/Multiresolution/Map2MR/map2MR_PrimalRegular.hpp
View file @
a55f60bf
...
...
@@ -258,18 +258,24 @@ void Map2MR<PFP>::synthesis()
{
assert
(
m_map
.
getCurrentLevel
()
<
m_map
.
getMaxLevel
()
||
!
"synthesis : called on max level"
)
;
for
(
unsigned
int
i
=
0
;
i
<
synthesisFilters
.
size
();
++
i
)
(
*
synthesisFilters
[
i
])()
;
// for(unsigned int i = 0; i < synthesisFilters.size(); ++i)
// {
// if((filter == F_LowPass && m_map.getCurrentLevel() <= thresholdHigh) ||
// (filter == F_HighPass && m_map.getCurrentLevel() >= thresholdLow) ||
// (filter == F_BandPass && (thresholdLow >= m_map.getCurrentLevel() && m_map.getCurrentLevel() <= thresholdHigh)))
// (*synthesisFilters[i])(true) ;
// else
// (*synthesisFilters[i])(false) ;
// }
// (*synthesisFilters[i])() ;
for
(
unsigned
int
i
=
0
;
i
<
synthesisFilters
.
size
();
++
i
)
{
if
((
filter
==
F_LowPass
&&
m_map
.
getCurrentLevel
()
<=
thresholdHigh
)
||
(
filter
==
F_HighPass
&&
m_map
.
getCurrentLevel
()
>=
thresholdLow
)
||
(
filter
==
F_BandPass
&&
(
thresholdLow
>=
m_map
.
getCurrentLevel
()
&&
m_map
.
getCurrentLevel
()
<=
thresholdHigh
)))
{
std
::
cout
<<
"without details"
<<
std
::
endl
;
(
*
synthesisFilters
[
i
])(
true
)
;
}
else
{
std
::
cout
<<
"with details"
<<
std
::
endl
;
(
*
synthesisFilters
[
i
])(
false
)
;
}
}
m_map
.
incCurrentLevel
()
;
}
...
...
include/Algo/Multiresolution/Map3MR/Filters/lerp.h
View file @
a55f60bf
...
...
@@ -67,8 +67,8 @@ public:
void
operator
()
()
{
TraversorE
<
typename
PFP
::
MAP
>
trav
(
m_map
)
;
for
(
Dart
d
=
trav
.
begin
();
d
!=
trav
.
end
();
d
=
trav
.
next
())
TraversorE
<
typename
PFP
::
MAP
>
trav
E
(
m_map
)
;
for
(
Dart
d
=
trav
E
.
begin
();
d
!=
travE
.
end
();
d
=
travE
.
next
())
{
typename
PFP
::
VEC3
p
=
(
m_position
[
d
]
+
m_position
[
m_map
.
phi2
(
d
)])
*
typename
PFP
::
REAL
(
0.5
);
...
...
@@ -80,8 +80,8 @@ public:
m_map
.
decCurrentLevel
()
;
}
TraversorF
<
typename
PFP
::
MAP
>
trav
(
m_map
)
;
for
(
Dart
d
=
trav
.
begin
();
d
!=
trav
.
end
();
d
=
trav
.
next
())
TraversorF
<
typename
PFP
::
MAP
>
trav
F
(
m_map
)
;
for
(
Dart
d
=
trav
F
.
begin
();
d
!=
travF
.
end
();
d
=
travF
.
next
())
{
typename
PFP
::
VEC3
p
=
Algo
::
Geometry
::
faceCentroid
<
PFP
>
(
m_map
,
d
,
m_position
);
...
...
@@ -94,8 +94,8 @@ public:
}
TraversorW
<
typename
PFP
::
MAP
>
trav
(
m_map
)
;
for
(
Dart
d
=
trav
.
begin
();
d
!=
trav
.
end
();
d
=
trav
.
next
())
TraversorW
<
typename
PFP
::
MAP
>
trav
W
(
m_map
)
;
for
(
Dart
d
=
trav
W
.
begin
();
d
!=
travW
.
end
();
d
=
travW
.
next
())
{
if
(
!
Algo
::
Modelisation
::
Tetrahedralization
::
isTetrahedron
<
PFP
>
(
m_map
,
d
)
&&
!
Algo
::
Modelisation
::
isPrism
<
PFP
>
(
m_map
,
d
)
&&
!
Algo
::
Modelisation
::
isPyra
<
PFP
>
(
m_map
,
d
))
{
...
...
include/Algo/Multiresolution/filter.h
View file @
a55f60bf
...
...
@@ -43,7 +43,7 @@ public:
Filter
()
{}
virtual
~
Filter
()
{}
virtual
void
operator
()
()
=
0
;
//virtual void operator() (bool filtering) = 0 ;
virtual
void
operator
()
(
bool
filtering
)
{
}
}
;
...
...
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