noddybox.VectorGfx
This module provides methods for displaying 2D vector graphics, and finding
collisions between objects.
This is implemented in two different ways depending on how you want collisions
work work.
-
A collision map can be used, whereby objects can be drawn into the map when
being drawn onto the screen. A mask of these collisions, as well as the
actual objects and lines involved with the collisions is returned. This
method uses a
TVectorGfxCollisionMap to store collision data, and is invoked using the
DrawToCollisionMap
method in
TVectorGfxObject.
-
The other method is more manual in that a point of lists is returned (defined
using
TVectorGfxPoint
objects) defining all the points drawn for an object.
This is invoked using the
DrawToPointList
method in
TVectorGfxObject.
It should be noted that the collision map method is not fool-proof. For
example, two diagnal lines may pass through each other without colliding.