Skip to Main Content
3D Game Engine Design, 2nd Edition
book

3D Game Engine Design, 2nd Edition

by David Eberly
November 2006
Intermediate to advanced content levelIntermediate to advanced
1040 pages
26h 31m
English
CRC Press
Content preview from 3D Game Engine Design, 2nd Edition
706 Chapter 15 Intersection Methods
The intersection with the bottom hemispherical cap satisfies
(x
p
, y
p
, z
p
) + t
1
(0, 0, 1) = (x
p
, y
p
, z
0
) t
1
= z
p
z
0
= z
p
+
e +
r
2
x
2
p
y
2
p
The t-values are chosen so that t
0
<t
1
.
Line Not Parallel to Capsule Axis
The parametric line in capsule coordinates is (x
p
, y
p
, z
p
) + t(x
d
, y
d
, z
d
). The inter-
section of this line with the infinite cylinder amounts to solving a quadratic equation
x
2
+ y
2
= r
2
with x =x
p
+ tx
d
and y = y
p
+ ty
d
. The equation is
a
2
t
2
+ 2a
1
t +a0 = (x
2
d
+ y
2
d
)t
2
+ 2(x
p
x
d
+ y
p
y
d
)t +(x
2
p
+ y
2
p
r
2
) = 0
We know that a
2
> 0 since the line is not parallel to the capsule axis. For if it were the
case that a
2
=0, then
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

3D Game Engine Architecture

3D Game Engine Architecture

David Eberly
Blender 3D By Example - Second Edition

Blender 3D By Example - Second Edition

Oscar Baechler, Xury Greer
Computer Graphics

Computer Graphics

Alexey Boreskov, Evgeniy Shikin

Publisher Resources

ISBN: 9781482267303