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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
KennethVanhoey
CGoGN
Commits
cc7691b9
Commit
cc7691b9
authored
Feb 17, 2011
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
on avance sur le calcul du maillage dual
parent
c59d85ad
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
48 deletions
+19
-48
include/Algo/Modelisation/subdivision.hpp
include/Algo/Modelisation/subdivision.hpp
+18
-26
include/Topology/generic/attribmap.hpp
include/Topology/generic/attribmap.hpp
+1
-1
src/Topology/map/map2.cpp
src/Topology/map/map2.cpp
+0
-21
No files found.
include/Algo/Modelisation/subdivision.hpp
View file @
cc7691b9
...
...
@@ -437,32 +437,24 @@ void LoopSubdivision(typename PFP::MAP& map, typename PFP::TVEC3& position, cons
template
<
typename
PFP
>
void
computeDual
(
typename
PFP
::
MAP
&
map
,
typename
PFP
::
TVEC3
&
position
,
const
FunctorSelect
&
selected
)
{
// typedef typename PFP::MAP MAP ;
// typedef typename PFP::VEC3 VEC3 ;
// typedef typename PFP::REAL REAL ;
//
// AutoAttributeHandler<VEC3> faceCentroid(map, FACE_ORBIT, "faceCentroid") ;
// Algo::Geometry::computeCentroidFaces<PFP>(map, position, faceCentroid, selected) ;
//
// for(Dart d = map.begin(); d != map.end(); map.next(d))
// {
// if(m.isMarked(d))
// {
// unsigned int em = map.newCell(VERTEX_ORBIT) ;
// Dart dd = d ;
// do
// {
// map.setDartEmbedding(map.phi2(dd), VERTEX_ORBIT, em) ;
// m.unmark(dd) ;
// dd = map.phi1(dd) ;
// }
// while (dd != d) ;
// attributs[map.phi2(d)] = *itEmb ;
// ++itEmb ;
// }
// }
//
// map.computeDual() ;
typedef
typename
PFP
::
MAP
MAP
;
typedef
typename
PFP
::
VEC3
VEC3
;
typedef
typename
PFP
::
REAL
REAL
;
AttributeHandler
<
Dart
>
phi1
=
map
.
template
getAttribute
<
Dart
>(
DART_ORBIT
,
"phi1"
)
;
AttributeHandler
<
Dart
>
phi_1
=
map
.
template
getAttribute
<
Dart
>(
DART_ORBIT
,
"phi_1"
)
;
AttributeHandler
<
Dart
>
new_phi1
=
map
.
template
addAttribute
<
Dart
>(
DART_ORBIT
,
"new_phi1"
)
;
for
(
Dart
d
=
map
.
begin
();
d
!=
map
.
end
();
map
.
next
(
d
))
{
Dart
dd
=
map
.
alpha1
(
d
)
;
new_phi1
[
d
]
=
dd
;
phi_1
[
dd
]
=
d
;
}
map
.
template
swapAttributes
<
Dart
>(
phi1
,
new_phi1
)
;
map
.
template
removeAttribute
<
Dart
>(
new_phi1
)
;
}
template
<
typename
PFP
>
...
...
include/Topology/generic/attribmap.hpp
View file @
cc7691b9
...
...
@@ -56,8 +56,8 @@ template <typename T>
inline
bool
AttribMap
::
swapAttributes
(
AttributeHandler
<
T
>&
attr1
,
AttributeHandler
<
T
>&
attr2
)
{
assert
((
attr1
.
isValid
()
&&
attr2
.
isValid
())
||
!
"Invalid attribute handler"
)
;
assert
(
AttributeContainer
::
orbitAttr
(
attr1
.
id
())
==
AttributeContainer
::
orbitAttr
(
attr2
.
id
())
||
!
"Cannot swap attributes of different orbits"
)
;
unsigned
int
orbit
=
AttributeContainer
::
orbitAttr
(
attr1
.
id
())
;
assert
(
orbit
==
AttributeContainer
::
orbitAttr
(
attr2
.
id
())
||
!
"Cannot swap attributes of different orbits"
)
;
unsigned
int
index1
=
AttributeContainer
::
indexAttr
(
attr1
.
id
())
;
unsigned
int
index2
=
AttributeContainer
::
indexAttr
(
attr2
.
id
())
;
if
(
index1
!=
index2
)
...
...
src/Topology/map/map2.cpp
View file @
cc7691b9
...
...
@@ -393,27 +393,6 @@ void Map2::reverseOrientation()
}
}
//void Map2::computeDual()
//{
// AttributeContainer& cont = m_attribs[DART_ORBIT] ;
//
// unsigned int phi1_idx = cont.getAttribute("phi1") ;
// unsigned int new_phi1_idx = cont.addAttribute<Dart>("new_phi1") ;
//
// AttributeMultiVector<Dart>& new_phi1 = cont.getDataVector<Dart>(new_phi1_idx) ;
//
// for (Dart d = begin() ; d != end() ; next(d))
// {
// Dart dd = alpha1(d) ;
// new_phi1[d.index] = dd ;
// (*m_phi_1)[dd.index] = d ;
// }
//
// cont.swapAttributes(phi1_idx, new_phi1_idx) ;
//
// cont.removeAttribute(new_phi1_idx) ;
//}
/*! @name Topological Queries
* Return or set various topological information
*************************************************************************/
...
...
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