Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schwede
openstructure
Commits
303797b4
Commit
303797b4
authored
14 years ago
by
Marco Biasini
Browse files
Options
Downloads
Patches
Plain Diff
silence strict aliasing warning
parent
62b02e58
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/geom/src/vec3.cc
+2
-2
2 additions, 2 deletions
modules/geom/src/vec3.cc
modules/mol/alg/src/superpose_frames.cc
+5
-5
5 additions, 5 deletions
modules/mol/alg/src/superpose_frames.cc
with
7 additions
and
7 deletions
modules/geom/src/vec3.cc
+
2
−
2
View file @
303797b4
...
...
@@ -48,11 +48,11 @@ Mat3 Vec3List::GetInertia() const
Mat3
Vec3List
::
GetPrincipalAxes
()
const
{
Mat3
inertia
=
this
->
GetInertia
();
EMat3
inertia_mat
(
*
re
in
t
er
pret_cast
<
EMat3
*>
(
&
inertia
));
EMat3
inertia_mat
(
iner
tia
.
Data
(
));
Eigen
::
SVD
<
EMat3
>
svd
(
inertia_mat
);
EMat3
rot
=
svd
.
matrixU
();
Mat3
axes
(
*
reinterpret_cast
<
Mat3
*>
(
&
rot
));
Mat3
axes
(
rot
.
data
(
));
return
axes
;
}
...
...
This diff is collapsed.
Click to expand it.
modules/mol/alg/src/superpose_frames.cc
+
5
−
5
View file @
303797b4
...
...
@@ -35,26 +35,26 @@ typedef Eigen::Matrix<Real, Eigen::Dynamic, 3> EMatX3;
inline
geom
::
Vec3
rvec_to_gvec
(
const
ERVec3
&
vec
)
{
return
*
reinterpret_cast
<
const
geom
::
Vec3
*>
(
&
vec
);
return
geom
::
Vec3
(
vec
.
data
()
);
}
inline
geom
::
Vec3
cvec_to_gvec
(
const
ECVec3
&
vec
)
{
return
*
reinterpret_cast
<
const
geom
::
Vec3
*>
(
&
vec
);
return
geom
::
Vec3
(
vec
.
data
()
);
}
inline
geom
::
Mat3
emat_to_gmat
(
const
EMat3
&
mat
)
{
return
*
reinterpret_cast
<
const
geom
::
Mat3
*>
(
&
mat
);
return
geom
::
Mat3
(
mat
.
data
()
);
}
inline
ERVec3
gvec_to_rvec
(
const
geom
::
Vec3
&
vec
)
{
return
*
reinterpret_cast
<
const
ERVec3
*>
(
&
vec
);
return
ERVec3
(
&
vec
[
0
]
);
}
inline
ECVec3
gvec_to_cvec
(
const
geom
::
Vec3
&
vec
)
{
return
*
reinterpret_cast
<
const
ECVec3
*>
(
&
vec
);
return
ECVec3
(
&
vec
[
0
]
);
}
inline
EMat3X
row_sub
(
const
EMat3X
&
m
,
const
ERVec3
&
s
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment