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
09aaaf4e
Commit
09aaaf4e
authored
Dec 03, 2014
by
Sylvain Thery
Browse files
resolve bug of leaving markers after removing darts
parent
51206dcd
Changes
6
Hide whitespace changes
Inline
Side-by-side
include/Container/attributeContainer.h
View file @
09aaaf4e
...
...
@@ -378,6 +378,11 @@ public:
*/
void
initLine
(
unsigned
int
index
);
/**
* initialize all markers of a line of the container
*/
void
initMarkersOfLine
(
unsigned
int
index
);
/**
* copy the content of line src in line dst
*/
...
...
include/Container/attributeContainer.hpp
View file @
09aaaf4e
...
...
@@ -338,6 +338,16 @@ inline void AttributeContainer::initLine(unsigned int index)
}
}
inline
void
AttributeContainer
::
initMarkersOfLine
(
unsigned
int
index
)
{
for
(
unsigned
int
i
=
0
;
i
<
m_tableAttribs
.
size
();
++
i
)
{
if
((
m_tableAttribs
[
i
]
!=
NULL
)
&&
(
m_tableAttribs
[
i
]
->
isMarkerBool
()))
m_tableAttribs
[
i
]
->
initElt
(
index
);
}
}
inline
void
AttributeContainer
::
copyLine
(
unsigned
int
dstIndex
,
unsigned
int
srcIndex
)
{
for
(
unsigned
int
i
=
0
;
i
<
m_tableAttribs
.
size
();
++
i
)
...
...
include/Container/attributeMultiVector.h
View file @
09aaaf4e
...
...
@@ -195,6 +195,8 @@ public:
* @param fs filestream
*/
virtual
void
dump
(
unsigned
int
i
)
const
=
0
;
virtual
bool
isMarkerBool
()
=
0
;
};
...
...
@@ -322,6 +324,8 @@ public:
*/
virtual
void
dump
(
unsigned
int
i
)
const
;
inline
bool
isMarkerBool
();
};
}
// namespace CGoGN
...
...
include/Container/attributeMultiVector.hpp
View file @
09aaaf4e
...
...
@@ -418,6 +418,11 @@ void AttributeMultiVector<T>::dump(unsigned int i) const
CGoGNout
<<
this
->
operator
[](
i
);
}
template
<
typename
T
>
inline
bool
AttributeMultiVector
<
T
>::
isMarkerBool
()
{
return
false
;
}
template
<
typename
T
>
inline
void
AttributeMultiVector
<
T
>::
setTypeCode
()
...
...
include/Container/attributeMultiVectorBool.hpp
View file @
09aaaf4e
...
...
@@ -400,6 +400,12 @@ public:
{
CGoGNout
<<
this
->
operator
[](
i
);
}
inline
bool
isMarkerBool
()
{
return
true
;
}
};
...
...
include/Topology/generic/genericmap.hpp
View file @
09aaaf4e
...
...
@@ -142,6 +142,7 @@ inline void GenericMap::releaseUIntBuffer(std::vector<unsigned int>* vui) const
inline
Dart
GenericMap
::
newDart
()
{
unsigned
int
di
=
m_attribs
[
DART
].
insertLine
();
// insert a new dart line
m_attribs
[
DART
].
initMarkersOfLine
(
di
);
for
(
unsigned
int
i
=
0
;
i
<
NB_ORBITS
;
++
i
)
{
if
(
m_embeddings
[
i
])
// set all its embeddings
...
...
@@ -206,7 +207,11 @@ template <unsigned int ORBIT>
inline
unsigned
int
GenericMap
::
newCell
()
{
assert
(
isOrbitEmbedded
<
ORBIT
>
()
||
!
"Invalid parameter: orbit not embedded"
);
return
m_attribs
[
ORBIT
].
insertLine
();
unsigned
int
c
=
m_attribs
[
ORBIT
].
insertLine
();
m_attribs
[
ORBIT
].
initMarkersOfLine
(
c
);
return
c
;
// return m_attribs[ORBIT].insertLine();
}
template
<
unsigned
int
ORBIT
>
...
...
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