summaryrefslogtreecommitdiff
path: root/common/project.h
diff options
context:
space:
mode:
authorleo2009-01-20 02:56:47 +0000
committerleo2009-01-20 02:56:47 +0000
commit01c7fabd4a168e3d5457e432037da86404793b3d (patch)
tree1612b2de1413281957d4d22b455bdb72831646fe /common/project.h
parent39f41aa607a84a42c483a6356f06ff9d54c1450c (diff)
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
Diffstat (limited to 'common/project.h')
-rw-r--r--common/project.h29
1 files changed, 29 insertions, 0 deletions
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<class type> 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<class type> void generateMeshData(type* info, float *pos, Piece* pPiece, int numVertices, int currentColor);
+ template<class type> void getMinMaxData(type* info, Piece* pPiece, int numVertices, GroupInfo* groupInfo);
+ template<class type> 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_