mirror of
https://github.com/PoetryInCode/simple-rigid-sim.git
synced 2025-06-11 03:33:09 -04:00
general stuff
This commit is contained in:
parent
5969248278
commit
8780ff977c
@ -12,6 +12,7 @@ Circle::Circle(Vector c, int r) {
|
|||||||
center.y = c.y;
|
center.y = c.y;
|
||||||
radius = r;
|
radius = r;
|
||||||
}
|
}
|
||||||
|
Circle::Circle() {}
|
||||||
|
|
||||||
void Circle::translate(Vector vec) {
|
void Circle::translate(Vector vec) {
|
||||||
if(vec.x != 0) {
|
if(vec.x != 0) {
|
||||||
@ -38,4 +39,13 @@ void Circle::render(SDL_Renderer *renderer) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
SDL_SetRenderDrawColor(renderer,r,g,b,a);
|
SDL_SetRenderDrawColor(renderer,r,g,b,a);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
bool Circle::isInitialized() {
|
||||||
|
if(center.x == NULL) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}*/
|
@ -3,6 +3,8 @@
|
|||||||
#include "Vector.h"
|
#include "Vector.h"
|
||||||
#include "Color.h"
|
#include "Color.h"
|
||||||
|
|
||||||
|
#ifndef CIRCLE
|
||||||
|
#define CIRCLE
|
||||||
class Circle {
|
class Circle {
|
||||||
private:
|
private:
|
||||||
int testpoint(int x,int y) {
|
int testpoint(int x,int y) {
|
||||||
@ -26,4 +28,6 @@ class Circle {
|
|||||||
void render(SDL_Renderer *renderer);
|
void render(SDL_Renderer *renderer);
|
||||||
void translate(Vector vec);
|
void translate(Vector vec);
|
||||||
void setColor(Color c);
|
void setColor(Color c);
|
||||||
};
|
//bool isInitialized();
|
||||||
|
};
|
||||||
|
#endif
|
11
src/Quad.cpp
11
src/Quad.cpp
@ -87,4 +87,13 @@ std::vector<int> Quad::yvalues() {
|
|||||||
values.push_back(botR.y);
|
values.push_back(botR.y);
|
||||||
values.push_back(botL.y);
|
values.push_back(botL.y);
|
||||||
return values;
|
return values;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
bool Quad::isInitialized() {
|
||||||
|
if(topL.x != NULL) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}*/
|
@ -16,4 +16,5 @@ class Quad {
|
|||||||
void setColor(Color c);
|
void setColor(Color c);
|
||||||
void render(SDL_Renderer *renderer);
|
void render(SDL_Renderer *renderer);
|
||||||
void translate(Vector vec);
|
void translate(Vector vec);
|
||||||
|
//bool isInitialized();
|
||||||
};
|
};
|
Loading…
x
Reference in New Issue
Block a user