Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Dmitri Naumov
ogs
Commits
4f74e72b
Commit
4f74e72b
authored
4 years ago
by
Tom Fischer
Browse files
Options
Downloads
Patches
Plain Diff
[MaL] Move scalarTriple to MathTools.
parent
a13f35f8
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
MathLib/MathTools.cpp
+6
-0
6 additions, 0 deletions
MathLib/MathTools.cpp
MathLib/MathTools.h
+4
-0
4 additions, 0 deletions
MathLib/MathTools.h
MathLib/Vector3.cpp
+0
-21
0 additions, 21 deletions
MathLib/Vector3.cpp
MathLib/Vector3.h
+0
-4
0 additions, 4 deletions
MathLib/Vector3.h
with
10 additions
and
25 deletions
MathLib/MathTools.cpp
+
6
−
0
View file @
4f74e72b
...
@@ -51,4 +51,10 @@ double getAngle (const double p0[3], const double p1[3], const double p2[3])
...
@@ -51,4 +51,10 @@ double getAngle (const double p0[3], const double p1[3], const double p2[3])
return
std
::
acos
(
scalarProduct
<
double
,
3
>
(
v0
,
v1
)
/
(
std
::
sqrt
(
scalarProduct
<
double
,
3
>
(
v0
,
v0
))
*
sqrt
(
scalarProduct
<
double
,
3
>
(
v1
,
v1
))));
return
std
::
acos
(
scalarProduct
<
double
,
3
>
(
v0
,
v1
)
/
(
std
::
sqrt
(
scalarProduct
<
double
,
3
>
(
v0
,
v0
))
*
sqrt
(
scalarProduct
<
double
,
3
>
(
v1
,
v1
))));
}
}
double
scalarTriple
(
Eigen
::
Vector3d
const
&
u
,
Eigen
::
Vector3d
const
&
v
,
Eigen
::
Vector3d
const
&
w
)
{
return
u
.
cross
(
v
).
dot
(
w
);
}
}
// namespace MathLib
}
// namespace MathLib
This diff is collapsed.
Click to expand it.
MathLib/MathTools.h
+
4
−
0
View file @
4f74e72b
...
@@ -90,4 +90,8 @@ double calcProjPntToLineAndDists(MathLib::Point3d const& pp,
...
@@ -90,4 +90,8 @@ double calcProjPntToLineAndDists(MathLib::Point3d const& pp,
* @return the angle between the edges
* @return the angle between the edges
*/
*/
double
getAngle
(
const
double
p0
[
3
],
const
double
p1
[
3
],
const
double
p2
[
3
]);
double
getAngle
(
const
double
p0
[
3
],
const
double
p1
[
3
],
const
double
p2
[
3
]);
/// Calculates the scalar triple (u x v) . w
double
scalarTriple
(
Eigen
::
Vector3d
const
&
u
,
Eigen
::
Vector3d
const
&
v
,
Eigen
::
Vector3d
const
&
w
);
}
// namespace MathLib
}
// namespace MathLib
This diff is collapsed.
Click to expand it.
MathLib/Vector3.cpp
deleted
100644 → 0
+
0
−
21
View file @
a13f35f8
/**
* \file
* \copyright
* Copyright (c) 2012-2020, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*/
#include
"Vector3.h"
namespace
MathLib
{
double
scalarTriple
(
Eigen
::
Vector3d
const
&
u
,
Eigen
::
Vector3d
const
&
v
,
Eigen
::
Vector3d
const
&
w
)
{
return
u
.
cross
(
v
).
dot
(
w
);
}
}
// end namespace MathLib
This diff is collapsed.
Click to expand it.
MathLib/Vector3.h
+
0
−
4
View file @
4f74e72b
...
@@ -196,8 +196,4 @@ template <typename T1> TemplateVector3<T1> operator*(
...
@@ -196,8 +196,4 @@ template <typename T1> TemplateVector3<T1> operator*(
}
}
using
Vector3
=
TemplateVector3
<
double
>
;
using
Vector3
=
TemplateVector3
<
double
>
;
/// Calculates the scalar triple (u x v) . w
double
scalarTriple
(
Eigen
::
Vector3d
const
&
u
,
Eigen
::
Vector3d
const
&
v
,
Eigen
::
Vector3d
const
&
w
);
}
// namespace MathLib
}
// namespace MathLib
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