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
751a1cb5
Commit
751a1cb5
authored
5 years ago
by
Dmitri Naumov
Browse files
Options
Downloads
Patches
Plain Diff
[GL] Remove unused Triangle::contiansPoint2D().
parent
3eeeb6c3
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/Triangle.cpp
+0
-25
0 additions, 25 deletions
GeoLib/Triangle.cpp
GeoLib/Triangle.h
+0
-8
0 additions, 8 deletions
GeoLib/Triangle.h
with
0 additions
and
33 deletions
GeoLib/Triangle.cpp
+
0
−
25
View file @
751a1cb5
...
...
@@ -34,31 +34,6 @@ bool Triangle::containsPoint(MathLib::Point3d const& q, double eps) const
return
MathLib
::
isPointInTriangle
(
q
,
a
,
b
,
c
,
eps
);
}
bool
Triangle
::
containsPoint2D
(
Point
const
&
pnt
)
const
{
GeoLib
::
Point
const
&
a
(
*
(
_pnts
[
_pnt_ids
[
0
]]));
GeoLib
::
Point
const
&
b
(
*
(
_pnts
[
_pnt_ids
[
1
]]));
GeoLib
::
Point
const
&
c
(
*
(
_pnts
[
_pnt_ids
[
2
]]));
// criterion: p-a = u0 * (b-a) + u1 * (c-a); 0 <= u0, u1 <= 1, u0+u1 <= 1
Eigen
::
Matrix2d
mat
;
mat
(
0
,
0
)
=
b
[
0
]
-
a
[
0
];
mat
(
0
,
1
)
=
c
[
0
]
-
a
[
0
];
mat
(
1
,
0
)
=
b
[
1
]
-
a
[
1
];
mat
(
1
,
1
)
=
c
[
1
]
-
a
[
1
];
Eigen
::
Vector2d
y
;
y
<<
pnt
[
0
]
-
a
[
0
],
pnt
[
1
]
-
a
[
1
];
y
=
mat
.
partialPivLu
().
solve
(
y
);
const
double
delta
(
std
::
numeric_limits
<
double
>::
epsilon
());
const
double
upper
(
1
+
delta
);
// check if u0 and u1 fulfills the condition (with some delta)
return
-
delta
<=
y
[
0
]
&&
y
[
0
]
<=
upper
&&
-
delta
<=
y
[
1
]
&&
y
[
1
]
<=
upper
&&
y
[
0
]
+
y
[
1
]
<=
upper
;
}
void
getPlaneCoefficients
(
Triangle
const
&
tri
,
double
c
[
3
])
{
GeoLib
::
Point
const
&
p0
(
*
(
tri
.
getPoint
(
0
)));
...
...
This diff is collapsed.
Click to expand it.
GeoLib/Triangle.h
+
0
−
8
View file @
751a1cb5
...
...
@@ -62,14 +62,6 @@ public:
MathLib
::
Point3d
const
&
q
,
double
eps
=
std
::
numeric_limits
<
float
>::
epsilon
())
const
;
/**
* projects the triangle points to the x-y-plane and
* checks if point pnt is contained into the triangle
* @param pnt the point to test for
* @return true, if the point is into the projected triangle
*/
bool
containsPoint2D
(
Point
const
&
pnt
)
const
;
private
:
/// a vector of pointers to points the triangle is based on
std
::
vector
<
Point
*>
const
&
_pnts
;
...
...
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