Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenMesh
OpenMesh
Commits
d5e6d413
Commit
d5e6d413
authored
Nov 25, 2015
by
Janis Born
Browse files
implement member and non-member swap for VectorT
parent
e8fa744a
Pipeline
#113
passed with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/OpenMesh/Core/Geometry/Vector11T.hh
View file @
d5e6d413
...
...
@@ -627,6 +627,11 @@ class VectorT {
_rhs
.
values_
.
begin
(),
_rhs
.
values_
.
end
());
}
/// swap with another vector
void
swap
(
VectorT
&
_other
)
noexcept
(
noexcept
(
std
::
swap
(
values_
,
_other
.
values_
)))
{
std
::
swap
(
values_
,
_other
.
values_
);
}
//------------------------------------------------------------ component iterators
/// \name Component iterators
...
...
@@ -694,7 +699,6 @@ Scalar dot(const VectorT<Scalar, DIM>& _v1, const VectorT<Scalar, DIM>& _v2) {
return
(
_v1
|
_v2
);
}
/// \relates OpenMesh::VectorT
/// symmetric version of the cross product
template
<
typename
LScalar
,
typename
RScalar
,
int
DIM
>
...
...
@@ -704,6 +708,14 @@ cross(const VectorT<LScalar, DIM>& _v1, const VectorT<RScalar, DIM>& _v2) ->
return
(
_v1
%
_v2
);
}
/// \relates OpenMesh::VectorT
/// non-member swap
template
<
typename
Scalar
,
int
DIM
>
void
swap
(
VectorT
<
Scalar
,
DIM
>&
_v1
,
VectorT
<
Scalar
,
DIM
>&
_v2
)
noexcept
(
noexcept
(
_v1
.
swap
(
_v2
)))
{
_v1
.
swap
(
_v2
);
}
//== TYPEDEFS =================================================================
...
...
Write
Preview
Supports
Markdown
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