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
13.3 Capsules 629
13.3.3 Merging Capsules
If one capsule contains the other, just use the containing capsule. To determine if
this is the case, it is simple to formulate a test to see if a sphere of radius r
s
and
center C is contained in a capsule with medial segment M and radius r
c
.Letd be
the distance from C to M (distance from point to segment). The sphere is inside the
capsule as long as d + r
s
r
c
.IfC is a point on M, then d = 0 and r
s
r
c
is an
obvious condition for the sphere being inside the capsule. If C is not on M,letK be
the closest point on the segment to C. The extreme point of the sphere relative to
the segment is C + r
s
(C K)/|C K| and is a distance d + r
s
from M. To test if
one capsule is contained by another, it is sufficient to test ...
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