00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef EGGBASE_H
00016 #define EGGBASE_H
00017
00018 #include "pandatoolbase.h"
00019
00020 #include "programBase.h"
00021 #include "eggData.h"
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 class EggBase : public ProgramBase {
00033 public:
00034 EggBase();
00035
00036 void add_normals_options();
00037 void add_points_options();
00038 void add_transform_options();
00039
00040 static void convert_paths(EggNode *node, PathReplace *path_replace,
00041 const DSearchPath &additional_path);
00042
00043 protected:
00044 void append_command_comment(EggData *_data);
00045 static void append_command_comment(EggData *_data, const string &comment);
00046
00047 static bool dispatch_normals(ProgramBase *self, const string &opt, const string &arg, void *mode);
00048 bool ns_dispatch_normals(const string &opt, const string &arg, void *mode);
00049
00050 static bool dispatch_scale(const string &opt, const string &arg, void *var);
00051 static bool dispatch_rotate_xyz(ProgramBase *self, const string &opt, const string &arg, void *var);
00052 bool ns_dispatch_rotate_xyz(const string &opt, const string &arg, void *var);
00053 static bool dispatch_rotate_axis(ProgramBase *self, const string &opt, const string &arg, void *var);
00054 bool ns_dispatch_rotate_axis(const string &opt, const string &arg, void *var);
00055 static bool dispatch_translate(const string &opt, const string &arg, void *var);
00056
00057 protected:
00058 enum NormalsMode {
00059 NM_strip,
00060 NM_polygon,
00061 NM_vertex,
00062 NM_preserve
00063 };
00064 NormalsMode _normals_mode;
00065 double _normals_threshold;
00066 vector_string _tbn_names;
00067 bool _got_tbnall;
00068 bool _got_tbnauto;
00069
00070 bool _make_points;
00071
00072 bool _got_transform;
00073 LMatrix4d _transform;
00074
00075 bool _got_coordinate_system;
00076 CoordinateSystem _coordinate_system;
00077
00078 bool _noabs;
00079 };
00080
00081 #endif
00082
00083