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
9a6cb01a
Commit
9a6cb01a
authored
10 years ago
by
Karsten Rink
Browse files
Options
Downloads
Patches
Plain Diff
renamed orient3d-function to orientation3d
parent
7666a74e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
GeoLib/AnalyticalGeometry.cpp
+7
-7
7 additions, 7 deletions
GeoLib/AnalyticalGeometry.cpp
GeoLib/AnalyticalGeometry.h
+2
-2
2 additions, 2 deletions
GeoLib/AnalyticalGeometry.h
with
9 additions
and
9 deletions
GeoLib/AnalyticalGeometry.cpp
+
7
−
7
View file @
9a6cb01a
...
...
@@ -245,25 +245,25 @@ bool isPointInTriangle(GeoLib::Point const& q,
bool
isPointInTetrahedron
(
GeoLib
::
Point
const
&
p
,
GeoLib
::
Point
const
&
a
,
GeoLib
::
Point
const
&
b
,
GeoLib
::
Point
const
&
c
,
GeoLib
::
Point
const
&
d
,
double
eps
)
{
double
const
d0
(
orient3d
(
d
,
a
,
b
,
c
));
double
const
d0
(
orient
ation
3d
(
d
,
a
,
b
,
c
));
// if tetrahedron is not coplanar
if
(
std
::
abs
(
d0
)
>
std
::
numeric_limits
<
double
>::
epsilon
())
{
bool
const
d0_sign
(
d0
>
0
);
// if p is on the same side of bcd as a
double
const
d1
(
orient3d
(
d
,
p
,
b
,
c
));
double
const
d1
(
orient
ation
3d
(
d
,
p
,
b
,
c
));
if
(
!
(
d0_sign
==
(
d1
>=
0
)
||
std
::
abs
(
d1
)
<
eps
))
return
false
;
// if p is on the same side of acd as b
double
const
d2
(
orient3d
(
d
,
a
,
p
,
c
));
double
const
d2
(
orient
ation
3d
(
d
,
a
,
p
,
c
));
if
(
!
(
d0_sign
==
(
d2
>=
0
)
||
std
::
abs
(
d2
)
<
eps
))
return
false
;
// if p is on the same side of abd as c
double
const
d3
(
orient3d
(
d
,
a
,
b
,
p
));
double
const
d3
(
orient
ation
3d
(
d
,
a
,
b
,
p
));
if
(
!
(
d0_sign
==
(
d3
>=
0
)
||
std
::
abs
(
d3
)
<
eps
))
return
false
;
// if p is on the same side of abc as d
double
const
d4
(
orient3d
(
p
,
a
,
b
,
c
));
double
const
d4
(
orient
ation
3d
(
p
,
a
,
b
,
c
));
if
(
!
(
d0_sign
==
(
d4
>=
0
)
||
std
::
abs
(
d4
)
<
eps
))
return
false
;
return
true
;
...
...
@@ -434,8 +434,8 @@ double scalarTriple(MathLib::Vector3 const& u, MathLib::Vector3 const& v, MathLi
return
MathLib
::
scalarProduct
(
cross
,
w
);
}
double
orient3d
(
GeoLib
::
Point
const
&
p
,
GeoLib
::
Point
const
&
a
,
GeoLib
::
Point
const
&
b
,
GeoLib
::
Point
const
&
c
)
double
orient
ation
3d
(
GeoLib
::
Point
const
&
p
,
GeoLib
::
Point
const
&
a
,
GeoLib
::
Point
const
&
b
,
GeoLib
::
Point
const
&
c
)
{
MathLib
::
Vector3
const
ap
(
a
,
p
);
MathLib
::
Vector3
const
bp
(
b
,
p
);
...
...
This diff is collapsed.
Click to expand it.
GeoLib/AnalyticalGeometry.h
+
2
−
2
View file @
9a6cb01a
...
...
@@ -197,8 +197,8 @@ double scalarTriple(MathLib::Vector3 const& u, MathLib::Vector3 const& v, MathLi
* @return If the triangle abc is ordered counterclockwise when viewed from p, the method will return a negative value,
* otherwise it will return a positive value. If p is coplanar with abc, the function will return 0.
*/
double
orient3d
(
GeoLib
::
Point
const
&
p
,
GeoLib
::
Point
const
&
a
,
GeoLib
::
Point
const
&
b
,
GeoLib
::
Point
const
&
c
);
double
orient
ation
3d
(
GeoLib
::
Point
const
&
p
,
GeoLib
::
Point
const
&
a
,
GeoLib
::
Point
const
&
b
,
GeoLib
::
Point
const
&
c
);
/**
* Checks if a and b can be placed on a plane such that c and d lie on different sides of said plane.
...
...
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