typedef enum e_bunny_collision_type
{
 
BCT_DOT,
 
BCT_CIRCLE,
 
BCT_LINE,
 
BCT_TRIANGLE,
 
BCT_RECTANGLE,
 
BCT_QUAD,
 
BCT_EQUATION,
 
LAST_COLLISION_TYPE
}
t_bunny_collision_type;
INDEX
Description
  This union contains every kind of collidable shape and an enumeration
field to allow runtime type identification.
To configure this union, you must set to the
type attribute a value
from
t_bunny_collision_type, accordingly to the collision shape you
want to set. If you need to use the
t_bunny_dot_collision attribute, for
example, you will have to set
type to BCT_DOT.
INDEX
Description
  This structure represents a equation in a 2D space.
This structure is part of the
t_bunny_collision union, but may
be used separately as the equation collide function returns more
than a collide/not collide information.
The equation computed for this collision is second degree function:
  a * x * x + b * x + c
Attributes
-
t_bunny_collision_type type:
  The type identification enumerated field.
It must be set to BCT_EQUATION if you use this structure.
-
t_bunny_accurate_position coord[2]:
  Coordinates of the rectangle in which the equation will be taken
in consideration.
-
t_bunny_accurate_position amplitude:
  The mathematical amplitude of the square. You may wish
to have a direct correspondance between coord[1], which contains
the size in pixels and amplitude which contains a size on an arbitrary
scale. To do so, simply set the same values in coord[1] and in
amplitude.
-
double $a:
  The parameter a in the second degree equation.
-
double $b:
  The parameter b in the second degree equation.
-
double $c:
  The parameter c in the second degree equation.
-
bool origin_at_center:
  If this field is true, the origina will be placed at the center of the
equation square. If false, it will depend of flipx and flipy
attributes, but if they are both false, the origin will be on the top left corner.
-
bool flipx:
  If this field is false, the X axis goes from left to right.
If it is true, from right to left. It will move the origin from
the left side to the right side of the equation square if origin_at_center
is false.
-
bool flipy:
  If this field is false, the Y axis goes from top to bottom.
If it is true, from bottom to top. It will move the origin from the
the top side to the bottom side of the equation square if origin_at_center
is false.
INDEX
Return value
A true if shapes collide, else false.
INDEX
Description
  Test the collision between an equation square and a dot shape.
Returns the complete collision information.
Return value
A Return a t_bunny_collide_point which contains the point
at the surface of the equation where the collision happened
and which is the inclination level of the equation at this point.
INDEX
Description
  Test the collision a circle at position circle_coord of radius radius
with dot.
Return value
true or false depending if there is a collision or not.
Additional informations
This function is part of the first version of the collide module
and can be quite handy for simple program, but for more complex
ones, consider using the bunny_collide system.
INDEX
Description
  Test the collision of the circle a of radius a_radius
with the circle b of radius b_radius.
Return value
true or false depending if there is a collision or not.
Additional informations
This function is part of the first version of the collide module
and can be quite handy for simple program, but for more complex
ones, consider using the bunny_collide system.
INDEX
Description
  Test the collision between the two shapes.
Return value
true or false depending if there is a collision or not.
Additional informations
This function is part of the first version of the collide module
and can be quite handy for simple program, but for more complex
ones, consider using the bunny_collide system.
INDEX
Description
  Test the collision between the two shapes.
Return value
true or false depending if there is a collision or not.
Additional informations
This function is part of the first version of the collide module
and can be quite handy for simple program, but for more complex
ones, consider using the bunny_collide system.
INDEX
Description
  Test the collision between the two shapes.
Return value
true or false depending if there is a collision or not.
Additional informations
This function is part of the first version of the collide module
and can be quite handy for simple program, but for more complex
ones, consider using the bunny_collide system.
INDEX
Description
  Test the collision between the two shapes.
Return value
true or false depending if there is a collision or not.
Additional informations
This function is part of the first version of the collide module
and can be quite handy for simple program, but for more complex
ones, consider using the bunny_collide system.
INDEX
Description
  Test the collision between the two shapes.
Return value
true or false depending if there is a collision or not.
Additional informations
This function is part of the first version of the collide module
and can be quite handy for simple program, but for more complex
ones, consider using the bunny_collide system.
INDEX
Description
  Test the collision between the two shapes.
Return value
true or false depending if there is a collision or not.
Additional informations
This function is part of the first version of the collide module
and can be quite handy for simple program, but for more complex
ones, consider using the bunny_collide system.
INDEX