13typedef struct CollPolyView_ {
23typedef struct CollPoly_ {
43 const int bsy,
const vec2 *bp,
vec2 *crash );
44int CollideLineLine(
double s1x,
double s1y,
double e1x,
double e1y,
double s2x,
45 double s2y,
double e2x,
double e2y,
vec2 *crash );
47 const glTexture *bt,
const int bsx,
const int bsy,
52 const int bsx,
const int bsy,
const vec2 *bp,
57 const glTexture *bt,
const int bsx,
const int bsy,
62 double cr,
vec2 crash[2] );
int CollideCircleCircle(const vec2 *p1, double r1, const vec2 *p2, double r2, vec2 crash[2])
Computes the collision between two circles.
int CollideSpritePolygon(const CollPolyView *at, const vec2 *ap, const glTexture *bt, int bsx, int bsy, const vec2 *bp, vec2 *crash)
Checks whether or not a sprite collides with a polygon.
void poly_rotate(CollPolyView *rpolygon, const CollPolyView *ipolygon, float theta)
Rotates a polygon.
int CollideLineCircle(const vec2 *p1, const vec2 *p2, const vec2 *cc, double cr, vec2 crash[2])
Checks to see if a line collides with a circle.
int CollideLineSprite(const vec2 *ap, double ad, double al, const glTexture *bt, const int bsx, const int bsy, const vec2 *bp, vec2 crash[2])
Checks to see if a line collides with a sprite.
int CollideCircleSprite(const vec2 *ap, double ar, const glTexture *bt, const int bsx, const int bsy, const vec2 *bp, vec2 *crash)
Checks whether or not a sprite collides with a polygon.
int CollideCirclePolygon(const vec2 *ap, double ar, const CollPolyView *bt, const vec2 *bp, vec2 crash[2])
Checks to see if a circle collides with a polygon.
int CollideLinePolygon(const vec2 *ap, double ad, double al, const CollPolyView *bt, const vec2 *bp, vec2 crash[2])
Checks to see if a line collides with a polygon.
int CollideLineLine(double s1x, double s1y, double e1x, double e1y, double s2x, double s2y, double e2x, double e2y, vec2 *crash)
Checks to see if two lines collide.
void poly_load(CollPoly *polygon, xmlNodePtr base, const char *name)
Loads a polygon from an xml node.
int CollideSprite(const glTexture *at, const int asx, const int asy, const vec2 *ap, const glTexture *bt, const int bsx, const int bsy, const vec2 *bp, vec2 *crash)
Checks whether or not two sprites collide.
double CollideCircleIntersection(const vec2 *p1, double r1, const vec2 *p2, double r2)
Calculates the area of intersection between two circles.
int CollidePolygon(const CollPolyView *at, const vec2 *ap, const CollPolyView *bt, const vec2 *bp, vec2 *crash)
Checks whether or not two polygons collide. /!\ The function is not symmetric: the points of polygon ...
Represents a polygon used for collision detection.
Abstraction for rendering sprite sheets.