summaryrefslogtreecommitdiff
path: root/vectorgfx.mod/doc/intro.html
blob: c456aa12cf6634d800022d0986dcc8b26a620b22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<html>
<head>
<title></title>
<link rel="styleSheet" href="../../../../doc/css/bmxref.css" type="text/css">
</head>
<body>
<h1>noddybox.VectorGfx</h1>
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.
<p>

<ul>

<li>
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 <a href="commands.html#TVectorGfxCollisionMap" class="token">
TVectorGfxCollisionMap</a> to store collision data, and is invoked using the
<a href=commands.html#DrawToCollisionMap class=token>DrawToCollisionMap</a>
method in
<a href="commands.html#TVectorGfxObject" class="token">TVectorGfxObject</a>.
</li>

<li>
The other method is more manual in that a point of lists is returned (defined
using
<a href="commands.html#TVectorGfxPoint" class="token">TVectorGfxPoint</a>
objects) defining all the points drawn for an object.
This is invoked using the
<a href=commands.html#DrawToPointList class=token>DrawToPointList</a>
method in
<a href="commands.html#TVectorGfxObject" class="token">TVectorGfxObject</a>.
</li>

</ul>

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.

</body>
</html>