mirror of
https://github.com/PoetryInCode/simple-rigid-sim.git
synced 2025-06-10 03:13:10 -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;
|
||||
radius = r;
|
||||
}
|
||||
Circle::Circle() {}
|
||||
|
||||
void Circle::translate(Vector vec) {
|
||||
if(vec.x != 0) {
|
||||
@ -38,4 +39,13 @@ void Circle::render(SDL_Renderer *renderer) {
|
||||
}
|
||||
}
|
||||
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 "Color.h"
|
||||
|
||||
#ifndef CIRCLE
|
||||
#define CIRCLE
|
||||
class Circle {
|
||||
private:
|
||||
int testpoint(int x,int y) {
|
||||
@ -26,4 +28,6 @@ class Circle {
|
||||
void render(SDL_Renderer *renderer);
|
||||
void translate(Vector vec);
|
||||
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(botL.y);
|
||||
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 render(SDL_Renderer *renderer);
|
||||
void translate(Vector vec);
|
||||
//bool isInitialized();
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user