Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
KennethVanhoey
CGoGN
Commits
6698b410
Commit
6698b410
authored
Nov 15, 2011
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GenericMap destructor invalidates AttributeHandlers
parent
8402f715
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
include/Geometry/vector_gen.hpp
include/Geometry/vector_gen.hpp
+3
-2
src/Topology/generic/genericmap.cpp
src/Topology/generic/genericmap.cpp
+5
-0
No files found.
include/Geometry/vector_gen.hpp
View file @
6698b410
...
...
@@ -251,7 +251,7 @@ template <unsigned int DIM, typename T>
inline
double
Vector
<
DIM
,
T
>::
normalize
()
{
double
n
=
norm
()
;
if
(
n
!=
T
(
0
.0
))
if
(
n
!=
T
(
0
))
for
(
unsigned
int
i
=
0
;
i
<
DIM
;
++
i
)
m_data
[
i
]
/=
T
(
n
)
;
return
n
;
...
...
@@ -357,7 +357,8 @@ inline T tripleProduct(const Vector<DIM,T>& v1, const Vector<DIM,T>& v2, const V
}
template
<
unsigned
int
DIM
,
typename
T
>
inline
Vector
<
DIM
,
T
>
slerp
(
const
Vector
<
DIM
,
T
>
&
v1
,
const
Vector
<
DIM
,
T
>
&
v2
,
const
T
&
t
)
{
inline
Vector
<
DIM
,
T
>
slerp
(
const
Vector
<
DIM
,
T
>&
v1
,
const
Vector
<
DIM
,
T
>&
v2
,
const
T
&
t
)
{
Vector
<
DIM
,
T
>
res
;
T
omega
=
acos
(
v1
*
v2
)
;
// assume v1,v2 normalized
...
...
src/Topology/generic/genericmap.cpp
View file @
6698b410
...
...
@@ -87,6 +87,11 @@ GenericMap::~GenericMap()
if
(
isOrbitEmbedded
(
i
))
m_attribs
[
i
].
clear
(
true
)
;
}
for
(
std
::
multimap
<
AttributeMultiVectorGen
*
,
AttributeHandlerGen
*>::
iterator
it
=
attributeHandlers
.
begin
();
it
!=
attributeHandlers
.
end
();
++
it
)
(
*
it
).
second
->
setInvalid
()
;
attributeHandlers
.
clear
()
;
if
(
m_attributes_registry_map
)
{
delete
m_attributes_registry_map
;
...
...
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