#ifndef VRML_PARSER_H
#define VRML_PARSER_H

#define MAX_VERTICES 1000
#define MAX_POLYS	 1000
#ifdef CLIENT_DLL
#include "triangleapi.h"
#endif

// Edited by Pcjoe, turning this into a class
// so we can have a constructor ( to fix the crashing bug ), cheap hack
class VRMLData
{	
public:
	// Added by Pcjoe
	VRMLData() { blVRMLParsed = false; }
	bool blVRMLParsed;
	// End of add by Pcjoe
	float flVertices[MAX_VERTICES][3];
	float flTextureCoords[MAX_POLYS][2];
	int iIndices[MAX_POLYS][3];
	int iTextureIndices[MAX_POLYS][3];
	int iNumberOfPolys;
	int iNumberOfVertices;
	int iNumberOfTexCoords;
};
void ParseVRML(const char *filename, VRMLData &info);
void ScaleVRML(VRMLData &dest, const VRMLData &src, float alpha);
void RotateVRML(VRMLData &dest, const VRMLData &src, float *angles);
#ifdef CLIENT_DLL
void DrawVRML (const VRMLData &info,vec3_t pos, int rendermode, TRICULLSTYLE tricullstyle, int r, int g, int b, int a);
void DrawVRML (const VRMLData &info,vec3_t pos, HSPRITE sprite, int rendermode, TRICULLSTYLE tricullstyle, int frame, int r, int g, int b, int a);
void DrawVRMLSVSprite (const VRMLData &info,vec3_t pos, int sprite, int rendermode, TRICULLSTYLE tricullstyle, int frame, int r, int g, int b, int a);
#endif
#endif