Put framework in place for dealing with graphs in 3 dimensions

This commit is contained in:
2011-07-01 12:24:52 -04:00
parent 7b4b3ba76e
commit 36414a6996
7 changed files with 46 additions and 34 deletions

View File

@ -52,7 +52,7 @@ bool DrawUtils::draw(SDL_Surface* dest, SDL_Surface* drawable, int x, int y,
return true;
}
#include "debug.h"
void DrawUtils::draw_line(SDL_Surface* dest, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint16 width, Uint32 colour)
{
float dx, dy, len;
@ -60,7 +60,7 @@ void DrawUtils::draw_line(SDL_Surface* dest, Sint16 x1, Sint16 y1, Sint16 x2, Si
SDL_Rect pen;
len = MathUtils::distance(x1,y1,x2,y2);
len = MathUtils::distance(x1, y1, 0, x2, y2, 0);
// dx and dy represent the amount we move
// each step in our drawing loop