Manual merge... (Improved renderer, and added bevels.)

This commit is contained in:
MusicalProgrammer
2018-10-25 20:29:38 -04:00
parent 7b4abe3efe
commit 866d644c63
6 changed files with 286 additions and 45 deletions

View File

@@ -2,6 +2,8 @@
#include "PVInstance.h"
#include "Enum.h"
#define NEW_BOX_RENDER
class PartInstance : public PVInstance
{
public:
@@ -35,10 +37,26 @@ public:
bool collides(Box);
virtual std::vector<PROPGRIDITEM> getProperties();
virtual void PropUpdate(LPPROPGRIDITEM &pItem);
void addVertex(Vector3 vertexPos,Color3 color);
void addNormals(Vector3 normal);
void addTriangle(Vector3 vertexPos,Vector3 vertexPos2, Vector3 vertexPos3);
void debugPrintVertexIDs(RenderDevice* rd, GFontRef font, Matrix3 camRot);
void makeFace(int vertex1, int vertex2, int vertex3);
bool isUniqueVertex(Vector3 pos);
private:
Vector3 position;
Vector3 size;
GLfloat vertecies[96];
float _bevelSize;
int _parseVert;
int _debugTimer;
std::vector<Vector3> _debugUniqueVertices;
#ifdef NEW_BOX_RENDER
std::vector<GLfloat> _vertices;
std::vector<GLfloat> _normals;
#else
GLfloat _vertices[96];
#endif
std::vector<GLushort> _indices;
bool changed;
Box itemBox;
};