mirror of
https://github.com/PoetryInCode/simple-rigid-sim.git
synced 2026-08-13 11:24:39 -04:00
renamed vertex to vector, cubes aren't needed in 2d
This commit is contained in:
parent
a35793128b
commit
540d4d3448
40
src/Cube.cpp
40
src/Cube.cpp
@ -1,40 +0,0 @@
|
|||||||
#include "Cube.h"
|
|
||||||
|
|
||||||
Cube::Cube(Vertex backTopLeft,
|
|
||||||
Vertex backTopRight,
|
|
||||||
Vertex backBottomRight,
|
|
||||||
Vertex backBottomLeft,
|
|
||||||
Vertex frontTopLeft,
|
|
||||||
Vertex frontTopRight,
|
|
||||||
Vertex frontBottomRight,
|
|
||||||
Vertex frontBottomLeft
|
|
||||||
) {
|
|
||||||
this->btl=backTopLeft;
|
|
||||||
this->btr=backTopRight;
|
|
||||||
this->bbr=backBottomRight;
|
|
||||||
this->bbl=backBottomLeft;
|
|
||||||
this->ftl=frontTopRight;
|
|
||||||
this->ftl=frontTopRight;
|
|
||||||
this->fbl=frontBottomLeft;
|
|
||||||
this->fbr=frontBottomRight;
|
|
||||||
}
|
|
||||||
|
|
||||||
Cube::Cube(
|
|
||||||
Quad left,
|
|
||||||
Quad top,
|
|
||||||
Quad right,
|
|
||||||
Quad bottom,
|
|
||||||
Quad front,
|
|
||||||
Quad back
|
|
||||||
) {
|
|
||||||
this->left=left;
|
|
||||||
this->top=top;
|
|
||||||
this->right=right;
|
|
||||||
this->bottom=bottom;
|
|
||||||
this->front=front;
|
|
||||||
this->back=back;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Cube::setColor(myColor c) {
|
|
||||||
this->color=c;
|
|
||||||
}
|
|
||||||
26
src/Cube.h
26
src/Cube.h
@ -1,26 +0,0 @@
|
|||||||
#include "Quad.h"
|
|
||||||
|
|
||||||
class Cube {
|
|
||||||
public:
|
|
||||||
myColor color;
|
|
||||||
Quad left,top,right,bottom,back,front;
|
|
||||||
Vertex btl,btr,bbr,bbl,ftl,ftr,fbr,fbl;
|
|
||||||
|
|
||||||
Cube(Vertex backTopLeft,
|
|
||||||
Vertex backTopRight,
|
|
||||||
Vertex backBottomRight,
|
|
||||||
Vertex backBottomLeft,
|
|
||||||
Vertex frontTopLeft,
|
|
||||||
Vertex frontTopRight,
|
|
||||||
Vertex frontBottomRight,
|
|
||||||
Vertex frontBottomLeft
|
|
||||||
);
|
|
||||||
Cube(Quad left,
|
|
||||||
Quad top,
|
|
||||||
Quad right,
|
|
||||||
Quad bottom,
|
|
||||||
Quad front,
|
|
||||||
Quad back
|
|
||||||
);
|
|
||||||
void setColor(myColor c);
|
|
||||||
};
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
#include "Vertex.h"
|
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
Vertex::Vertex(float x, float y, float z) {
|
|
||||||
this->x=x;
|
|
||||||
this->y=y;
|
|
||||||
this->z=z;
|
|
||||||
printf("Created a vertex at %f,%f,%f\n",x,y,z);
|
|
||||||
}
|
|
||||||
|
|
||||||
Vertex::Vertex() {}
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
class Vertex {
|
|
||||||
public:
|
|
||||||
float x,y,z;
|
|
||||||
Vertex();
|
|
||||||
Vertex(float x, float y, float z);
|
|
||||||
};
|
|
||||||
Loading…
x
Reference in New Issue
Block a user