00001
00002 #ifndef EDITOBJ_H
00003 #define EDITOBJ_H
00004
00005 #include "geom.h"
00006
00007
00008
00009 #define MAX_EDIT_OBJECTS 128
00010 #define FILE_OBJECT_FLAG_NUM 4
00011
00012 enum {
00013 FILE_OBJECT_AXIS_XY,
00014 FILE_OBJECT_AXIS_XZ,
00015 FILE_OBJECT_AXIS_ZY,
00016 FILE_OBJECT_AXIS_X,
00017 FILE_OBJECT_AXIS_Y,
00018 FILE_OBJECT_AXIS_Z,
00019 };
00020
00021 typedef struct _EDIT_OBJECT {
00022 long ID;
00023 long Flag[FILE_OBJECT_FLAG_NUM];
00024
00025 VEC Pos;
00026 MAT Mat;
00027
00028 struct _EDIT_OBJECT *Prev;
00029 struct _EDIT_OBJECT *Next;
00030 } EDIT_OBJECT;
00031
00032 typedef struct {
00033 long ID;
00034 long Flag[FILE_OBJECT_FLAG_NUM];
00035
00036 VEC Pos;
00037 VEC Up;
00038 VEC Look;
00039 } FILE_OBJECT;
00040
00041 typedef struct {
00042 char *Name;
00043 char **Type;
00044 long Min;
00045 long Max;
00046 } FLAG_INFO;
00047
00048 typedef struct {
00049 long ModelID;
00050 char *ObjName;
00051 FLAG_INFO FlagInfo[FILE_OBJECT_FLAG_NUM];
00052 } FILE_OBJECT_INFO;
00053
00054
00055
00056 extern long InitFileObjects(void);
00057 extern void KillFileObjects(void);
00058 extern EDIT_OBJECT *AllocFileobject(void);
00059 extern void FreeFileobject(EDIT_OBJECT *obj);
00060 extern void LoadFileObjects(char *file);
00061 extern void SaveFileObjects(char *file);
00062 extern void EditFileObjects(void);
00063 extern void DrawFileObjects(void);
00064 extern void DisplayFileObjectInfo(EDIT_OBJECT *obj);
00065 extern void LoadFileObjectModels(void);
00066 extern void FreeFileObjectModels(void);
00067
00068
00069
00070 extern EDIT_OBJECT *CurrentFileObject;
00071 extern char *FileObjectModelList[];
00072 extern FILE_OBJECT_INFO FileObjectInfo[];
00073
00074 #endif