Panda3D
 All Classes Functions Variables Enumerations
somethingToEgg.h
00001 // Filename: somethingToEgg.h
00002 // Created by:  drose (15Feb00)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #ifndef SOMETHINGTOEGG_H
00016 #define SOMETHINGTOEGG_H
00017 
00018 #include "pandatoolbase.h"
00019 
00020 #include "eggConverter.h"
00021 #include "distanceUnit.h"
00022 #include "animationConvert.h"
00023 
00024 class SomethingToEggConverter;
00025 
00026 ////////////////////////////////////////////////////////////////////
00027 //       Class : SomethingToEgg
00028 // Description : This is the general base class for a file-converter
00029 //               program that reads some model file format and
00030 //               generates an egg file.
00031 ////////////////////////////////////////////////////////////////////
00032 class SomethingToEgg : public EggConverter {
00033 public:
00034   SomethingToEgg(const string &format_name,
00035                  const string &preferred_extension = string(),
00036                  bool allow_last_param = true,
00037                  bool allow_stdout = true);
00038 
00039   void add_units_options();
00040   void add_animation_options();
00041   void add_merge_externals_options();
00042 
00043 protected:
00044   void apply_units_scale(EggData *data);
00045   void apply_parameters(SomethingToEggConverter &converter);
00046 
00047   virtual bool handle_args(Args &args);
00048   virtual bool post_command_line();
00049   virtual void post_process_egg_file();
00050 
00051   static bool dispatch_animation_convert(const string &opt, const string &arg, void *var);
00052 
00053 
00054   Filename _input_filename;
00055 
00056   DistanceUnit _input_units;
00057   DistanceUnit _output_units;
00058 
00059   AnimationConvert _animation_convert;
00060   string _character_name;
00061   double _start_frame;
00062   double _end_frame;
00063   double _frame_inc;
00064   double _neutral_frame;
00065   double _input_frame_rate;
00066   double _output_frame_rate;
00067   bool _got_start_frame;
00068   bool _got_end_frame;
00069   bool _got_frame_inc;
00070   bool _got_neutral_frame;
00071   bool _got_input_frame_rate;
00072   bool _got_output_frame_rate;
00073 
00074   bool _merge_externals;
00075   bool _noexist;
00076   bool _allow_errors;
00077 };
00078 
00079 #endif
00080 
00081 
 All Classes Functions Variables Enumerations