From 01c7fabd4a168e3d5457e432037da86404793b3d Mon Sep 17 00:00:00 2001 From: leo Date: Tue, 20 Jan 2009 02:56:47 +0000 Subject: Added Pieces Library Manager and VRML export to the Linux version. git-svn-id: http://svn.leocad.org/tags/leocad-0.75@733 c7d43263-9d01-0410-8a33-9dba5d9f93d6 --- common/project.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'common/project.h') diff --git a/common/project.h b/common/project.h index f4bb61c..38ebc57 100644 --- a/common/project.h +++ b/common/project.h @@ -30,6 +30,7 @@ class Piece; class Camera; class Light; class Group; +class GroupInfo; class Texture; class Terrain; class PieceInfo; @@ -308,6 +309,34 @@ protected: friend class CCADView; friend void PrintPiecesThread(void* pv); friend void Export3DStudio(); + + // VRML export + void exportVRML97File(char *filename); + void exportX3DVFile(char *filename); + void exportVRMLFile(char *filename, int dialect); + template void writeVRMLShapes(type color, FILE *stream, int coordinateCounter, Piece* pPiece, unsigned short group, float *pos, bool beginAndEnd); + void writeVRMLShapeBegin(FILE *stream, unsigned long currentColor, bool blackLines); + void writeVRMLShapeMeshBegin(FILE *stream); + void writeVRMLShapeMeshData(FILE *stream); + void writeVRMLShapeMeshEnd(FILE *stream); + void writeVRMLShapeEnd(FILE *stream); + void writeIndent(FILE *stream); + int indent; + int numDEF; + bool VRMLdialect; + bool firstData; + int searchForVertex(float *vertex); + template void generateMeshData(type* info, float *pos, Piece* pPiece, int numVertices, int currentColor); + template void getMinMaxData(type* info, Piece* pPiece, int numVertices, GroupInfo* groupInfo); + template void getMinMax(type col, Piece* pPiece, unsigned short group, GroupInfo* groupInfo); + bool handleAsGroup(Piece* piece, GroupInfo groupInfo); + int numCoords; + float *coords; + int numCoordIndices; + int *coordIndices; + float centerOfMass[3]; + int numFaceColors; + int *faceColors; }; #endif // _PROJECT_H_ -- cgit v1.2.3