Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Andrew Wilson
iMSTK
Commits
76662514
Commit
76662514
authored
Jul 28, 2021
by
Andrew Wilson
🐘
Browse files
Remove unused/incomplete function
parent
ec4d1272
Changes
2
Show whitespace changes
Inline
Side-by-side
Source/CollisionDetection/CollisionDetection/imstkCollisionUtils.cpp
View file @
76662514
...
...
@@ -240,29 +240,6 @@ closestPointOnTriangle(const Vec3d& p, const Vec3d& a, const Vec3d& b, const Vec
return
a
+
ab
*
v
+
ac
*
w
;
// = u*a + v*b + w*c, u = va * denom = 1.0f-v-w
}
void
closestPointOnTriangleLine
(
const
Vec3d
&
a
,
const
Vec3d
&
b
,
const
Vec3d
&
c
,
const
Vec3d
&
p
,
const
Vec3d
&
q
,
Vec3d
&
triangleClosestPt
,
Vec3d
&
lineClosestPt
)
{
// First compute plane point intersection point
const
Vec3d
triangleN
=
(
b
-
a
).
cross
(
c
-
a
);
Vec3d
iPt
;
if
(
testPlaneLine
(
p
,
q
,
a
,
triangleN
,
iPt
))
{
// Test if inside the triangle
const
Vec3d
bCoords
=
baryCentric
(
a
,
b
,
c
,
iPt
);
if
(
bCoords
[
0
]
>=
0.0
&&
bCoords
[
1
]
>=
0.0
&&
bCoords
[
2
]
>=
0.0
)
{
// If we are inside the triangle return that point
lineClosestPt
=
triangleClosestPt
=
iPt
;
return
;
}
}
// triangle and line are parallel
}
int
triangleToTriangle
(
const
Vec3i
&
tri_a
,
const
Vec3i
&
tri_b
,
...
...
Source/CollisionDetection/CollisionDetection/imstkCollisionUtils.h
View file @
76662514
...
...
@@ -692,14 +692,6 @@ testSegmentTriangle(
///
Vec3d
closestPointOnTriangle
(
const
Vec3d
&
p
,
const
Vec3d
&
a
,
const
Vec3d
&
b
,
const
Vec3d
&
c
,
int
&
caseType
);
///
/// \brief Returns the closest point pair on the triangle and line
///
void
closestPointOnTriangleLine
(
const
Vec3d
&
a
,
const
Vec3d
&
b
,
const
Vec3d
&
c
,
const
Vec3d
&
p
,
const
Vec3d
&
q
,
Vec3d
&
triangleClosestPt
,
Vec3d
&
lineClosestPt
);
///
/// \brief Check if sphere and triangle intersect, with point direction contact info
/// \return true if intersecting, false if not
...
...
Write
Preview
Markdown
is supported
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