Add to git.
[c2lib.git] / doc / collision_moving_sphere_and_face.3.html
1 <html>
2 <head>
3 <meta name="generator" content="groff -Thtml, see www.gnu.org">
4 <meta name="Content-Style" content="text/css">
5 <title>collision_moving_sphere_and_face</title>
6 </head>
7 <body>
8
9 <h1 align=center>collision_moving_sphere_and_face</h1>
10 <a href="#NAME">NAME</a><br>
11 <a href="#SYNOPSIS">SYNOPSIS</a><br>
12 <a href="#DESCRIPTION">DESCRIPTION</a><br>
13 <a href="#RETURNS">RETURNS</a><br>
14 <a href="#AUTHOR">AUTHOR</a><br>
15 <a href="#LICENSE">LICENSE</a><br>
16 <a href="#VERSION">VERSION</a><br>
17
18 <hr>
19 <!-- Creator     : groff version 1.17.2 -->
20 <!-- CreationDate: Fri May  3 14:56:38 2002 -->
21 <a name="NAME"></a>
22 <h2>NAME</h2>
23 <table width="100%" border=0 rules="none" frame="void"
24        cols="2" cellspacing="0" cellpadding="0">
25 <tr valign="top" align="left">
26 <td width="10%"></td><td width="90%">
27 collision_moving_sphere_and_face - detect collision between a moving sphere and a fixed face</td></table>
28 <a name="SYNOPSIS"></a>
29 <h2>SYNOPSIS</h2>
30
31 <table width="100%" border=0 rules="none" frame="void"
32        cols="2" cellspacing="0" cellpadding="0">
33 <tr valign="top" align="left">
34 <td width="10%"></td><td width="90%">
35 <pre><b>#include &lt;matvec.h&gt;
36
37 int collision_moving_sphere_and_face (const float *p0, const float *p1, float radius, const float *points, int nr_points, const float *plane, float *collision_point);
38 </b></pre></td></table>
39 <a name="DESCRIPTION"></a>
40 <h2>DESCRIPTION</h2>
41
42 <table width="100%" border=0 rules="none" frame="void"
43        cols="2" cellspacing="0" cellpadding="0">
44 <tr valign="top" align="left">
45 <td width="10%"></td><td width="90%">
46 This function detects collisions between a sphere which is
47 moving at constant speed along a linear path and a fixed
48 bounded convex polygon (&quot;face&quot;).</td></table>
49
50 <table width="100%" border=0 rules="none" frame="void"
51        cols="2" cellspacing="0" cellpadding="0">
52 <tr valign="top" align="left">
53 <td width="10%"></td><td width="90%">
54 The centre of the sphere moves from point <b>p0</b> to point
55 <b>p1</b>. The sphere has radius <b>radius</b>.</td></table>
56
57 <table width="100%" border=0 rules="none" frame="void"
58        cols="2" cellspacing="0" cellpadding="0">
59 <tr valign="top" align="left">
60 <td width="10%"></td><td width="90%">
61 The face is described by the list of bounding points, and
62 the plane coefficients of the plane of the face (you may
63 pass <b>plane</b> as <b>NULL</b> in which case the function
64 works out the plane coefficients for you, although this is
65 generally less efficient).</td></table>
66 <a name="RETURNS"></a>
67 <h2>RETURNS</h2>
68
69 <table width="100%" border=0 rules="none" frame="void"
70        cols="2" cellspacing="0" cellpadding="0">
71 <tr valign="top" align="left">
72 <td width="10%"></td><td width="90%">
73 If there was a collision, this function returns true and
74 sets the collision point in <b>collision_point</b>. Note
75 that the collision point is the position of the centre of
76 the sphere at the point of collision, NOT the place where
77 the sphere touches the face. If there was no collision, this
78 function returns false.</td></table>
79 <a name="AUTHOR"></a>
80 <h2>AUTHOR</h2>
81
82 <table width="100%" border=0 rules="none" frame="void"
83        cols="2" cellspacing="0" cellpadding="0">
84 <tr valign="top" align="left">
85 <td width="10%"></td><td width="90%">
86 Richard Jones &lt;rich@annexia.org&gt;</td></table>
87 <a name="LICENSE"></a>
88 <h2>LICENSE</h2>
89
90 <table width="100%" border=0 rules="none" frame="void"
91        cols="2" cellspacing="0" cellpadding="0">
92 <tr valign="top" align="left">
93 <td width="10%"></td><td width="90%">
94 GNU LGPL (see http://www.gnu.org/)</td></table>
95 <a name="VERSION"></a>
96 <h2>VERSION</h2>
97
98 <table width="100%" border=0 rules="none" frame="void"
99        cols="2" cellspacing="0" cellpadding="0">
100 <tr valign="top" align="left">
101 <td width="10%"></td><td width="90%">
102 c2lib-1.2.13</td></table>
103 <hr>
104 </body>
105 </html>