00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef PFMTRANS_H
00016 #define PFMTRANS_H
00017
00018 #include "pandatoolbase.h"
00019 #include "programBase.h"
00020 #include "filename.h"
00021 #include "pvector.h"
00022 #include "nodePath.h"
00023 #include "luse.h"
00024
00025 class PfmFile;
00026
00027
00028
00029
00030
00031 class PfmTrans : public ProgramBase {
00032 public:
00033 PfmTrans();
00034
00035 void run();
00036 bool process_pfm(const Filename &input_filename, PfmFile &file);
00037
00038 void add_transform_options();
00039
00040 protected:
00041 virtual bool handle_args(Args &args);
00042
00043 static bool dispatch_scale(const string &opt, const string &arg, void *var);
00044 static bool dispatch_rotate_xyz(ProgramBase *self, const string &opt, const string &arg, void *var);
00045 bool ns_dispatch_rotate_xyz(const string &opt, const string &arg, void *var);
00046 static bool dispatch_rotate_axis(ProgramBase *self, const string &opt, const string &arg, void *var);
00047 bool ns_dispatch_rotate_axis(const string &opt, const string &arg, void *var);
00048 static bool dispatch_translate(const string &opt, const string &arg, void *var);
00049
00050 private:
00051 typedef pvector<Filename> Filenames;
00052 Filenames _input_filenames;
00053
00054 bool _got_reverse;
00055 bool _got_zero_special;
00056 bool _got_vis_inverse;
00057 bool _got_vis_2d;
00058 bool _got_resize;
00059 int _resize[2];
00060
00061 bool _got_output_filename;
00062 Filename _output_filename;
00063 bool _got_output_dirname;
00064 Filename _output_dirname;
00065 bool _got_vis_filename;
00066 Filename _vis_filename;
00067 bool _got_vistex_filename;
00068 Filename _vistex_filename;
00069
00070 bool _got_transform;
00071 LMatrix4 _transform;
00072
00073 NodePath _mesh_root;
00074 };
00075
00076 #endif