00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #include "eggFilter.h"
00016
00017
00018
00019
00020
00021
00022 EggFilter::
00023 EggFilter(bool allow_last_param, bool allow_stdout) :
00024 EggWriter(allow_last_param, allow_stdout)
00025 {
00026
00027
00028 _path_replace->_path_store = PS_relative;
00029
00030 clear_runlines();
00031 if (allow_last_param) {
00032 add_runline("[opts] input.egg output.egg");
00033 }
00034 add_runline("[opts] -o output.egg input.egg");
00035 if (allow_stdout) {
00036 add_runline("[opts] input.egg >output.egg");
00037 }
00038
00039 redescribe_option
00040 ("cs",
00041 "Specify the coordinate system of the resulting egg file. This may be "
00042 "one of 'y-up', 'z-up', 'y-up-left', or 'z-up-left'. The default "
00043 "is the same coordinate system as the input egg file. If this is "
00044 "different from the input egg file, a conversion will be performed.");
00045 }
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056 bool EggFilter::
00057 handle_args(ProgramBase::Args &args) {
00058 if (!check_last_arg(args, 1)) {
00059 return false;
00060 }
00061
00062 if (!_got_path_directory && _got_output_filename) {
00063
00064 _path_replace->_path_directory = _output_filename.get_dirname();
00065 }
00066
00067 return EggReader::handle_args(args);
00068 }
00069
00070
00071
00072
00073
00074
00075 bool EggFilter::
00076 post_command_line() {
00077
00078
00079 return EggWriter::post_command_line() && EggReader::post_command_line();
00080 }