From be42a748bdff8ee4ef8776e1548275485d7c8122 Mon Sep 17 00:00:00 2001 From: leo Date: Tue, 4 Jan 2000 11:18:47 +0000 Subject: Added support for modifying the library git-svn-id: http://svn.leocad.org/trunk@47 c7d43263-9d01-0410-8a33-9dba5d9f93d6 --- common/library.h | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100755 common/library.h (limited to 'common/library.h') diff --git a/common/library.h b/common/library.h new file mode 100755 index 0000000..2ed834c --- /dev/null +++ b/common/library.h @@ -0,0 +1,52 @@ +#ifndef _MISC_H_ +#define _MISC_H_ + +typedef struct connection_s +{ + unsigned char type; + float pos[3]; + float up[3]; + connection_s* next; +} connection_t; + +typedef struct group_s +{ + connection_t* connections[5]; + void* drawinfo; + unsigned long infosize; + group_s* next; +} group_t; + +typedef struct lineinfo_s +{ + unsigned char type; + unsigned char color; + float points[12]; + lineinfo_s* next; +} lineinfo_t; + +typedef struct texture_s +{ + float points[20]; + unsigned char color; + char name[9]; + texture_s* next; +} texture_t; + +typedef struct +{ + float* verts; + unsigned int verts_count; + connection_t* connections; + group_t* groups; + texture_t* textures; + char name[9]; + char description[65]; +} LC_LDRAW_PIECE; + +bool ReadLDrawPiece(const char* filename, LC_LDRAW_PIECE* piece); +bool SaveLDrawPiece(LC_LDRAW_PIECE* piece); +void FreeLDrawPiece(LC_LDRAW_PIECE* piece); +bool DeletePiece(char** names, int numpieces); + +#endif // _MISC_H_ -- cgit v1.2.3