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
Özgür Ozan Sen
ogs
Commits
54f5e7a3
Commit
54f5e7a3
authored
10 years ago
by
Tom Fischer
Browse files
Options
Downloads
Patches
Plain Diff
[MathLib] Remove twice implemented functionality.
parent
71132611
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
MathLib/MathTools.cpp
+0
-17
0 additions, 17 deletions
MathLib/MathTools.cpp
MathLib/MathTools.h
+0
-6
0 additions, 6 deletions
MathLib/MathTools.h
with
0 additions
and
23 deletions
MathLib/MathTools.cpp
+
0
−
17
View file @
54f5e7a3
...
...
@@ -62,23 +62,6 @@ double getAngle (const double p0[3], const double p1[3], const double p2[3])
return
acos
(
scalarProduct
<
double
,
3
>
(
v0
,
v1
)
/
(
sqrt
(
scalarProduct
<
double
,
3
>
(
v0
,
v0
))
*
sqrt
(
scalarProduct
<
double
,
3
>
(
v1
,
v1
))));
}
double
calcTriangleArea
(
const
double
*
p0
,
const
double
*
p1
,
const
double
*
p2
)
{
const
double
u0
(
p2
[
0
]
-
p0
[
0
]);
const
double
u1
(
p2
[
1
]
-
p0
[
1
]);
const
double
u2
(
p2
[
2
]
-
p0
[
2
]);
const
double
v0
(
p1
[
0
]
-
p0
[
0
]);
const
double
v1
(
p1
[
1
]
-
p0
[
1
]);
const
double
v2
(
p1
[
2
]
-
p0
[
2
]);
const
double
z0
(
u1
*
v2
-
u2
*
v1
);
const
double
z1
(
u2
*
v0
-
u0
*
v2
);
const
double
z2
(
u0
*
v1
-
u1
*
v0
);
return
0.5
*
sqrt
(
z0
*
z0
+
z1
*
z1
+
z2
*
z2
);
}
double
calcTetrahedronVolume
(
const
double
*
x1
,
const
double
*
x2
,
const
double
*
x3
,
const
double
*
x4
)
{
return
fabs
((
x1
[
0
]
-
x4
[
0
])
*
((
x2
[
1
]
-
x4
[
1
])
*
(
x3
[
2
]
-
x4
[
2
])
-
(
x2
[
2
]
-
x4
[
2
])
*
(
x3
[
1
]
-
x4
[
1
]))
...
...
This diff is collapsed.
Click to expand it.
MathLib/MathTools.h
+
0
−
6
View file @
54f5e7a3
...
...
@@ -148,12 +148,6 @@ float normalize(float min, float max, float val);
*/
double
getAngle
(
const
double
p0
[
3
],
const
double
p1
[
3
],
const
double
p2
[
3
]);
/**
* Calculates the area of a triangle.
* The formula is A=.5*|u x v|, i.e. half of the area of the parallelogram specified by u=p0->p1 and v=p0->p2.
*/
double
calcTriangleArea
(
const
double
*
p0
,
const
double
*
p1
,
const
double
*
p2
);
/**
* Calculates the volume of a tetrahedron.
* The formula is V=1/6*|a(b x c)| with a=x1->x2, b=x1->x3 and c=x1->x4.
...
...
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