Game Development Reference
In-Depth Information
small threshold. To find x in a stable way, we'd need to compute something like
the length of the cross product between the contact normal and the face's normal,
and that's awkward and expensive compared to just examining the edges.
4.6.3 Step 2b: Supporting Two-Dimensional Shapes—
Exact Algorithms
In the case of mid- to high-polygon collision shapes, we may have to recover more
than just one feature
as the supporting shape. We may recover all features that
are aligned with s within the tolerance angle α .It's s min for shape B and
s min
for shape A . If we look at the Gauss map
of the shape, we can view s as a
2 . Let's draw a spherical cap
pole of
( α, s ) centered around s with the angular
radius α . We need to find all features with Gauss maps overlapping
at least
partially. For example, if a face f maps inside
like in Figure 4.10(c), it is tilted
no more than angle α from s , f
are the
images of vertices on the boundary of the support shape (see Figure 4.10(a ), for
example). And the arcs intersecting δ
α . The area(s) on
intersecting δ
(if any) are the boundary of the support
shape (see Figure 4.10(b) ) . Figure 4.10(d) shows the same shape and its Gauss
map oriented differently for reference.
The support shape found this way is not completely flat (although it's not
steeper than α relative to the support plane) and is not always convex, so we need
to project it onto a support plane and find its convex hull. We really prefer to
deal with convex shapes. So, we'll need to walk the support shape once to find its
Figure 4.10. Faces in C and edges and vertices intersecting δC . Please refer to Figure 4.6
if this mapping is not clear enough.
Search Nedrilad ::

Custom Search