Panda3D
|
This is the base class for a program that reads egg files, but doesn't write an egg file. More...
#include "eggReader.h"
Public Member Functions | |
void | add_delod_options (double default_delod=-1.0) |
Adds -delod as a valid option for this program. | |
void | add_texture_options () |
Adds -td, -te, etc. | |
virtual EggReader * | as_reader () |
Returns this object as an EggReader pointer, if it is in fact an EggReader, or NULL if it is not. | |
virtual void | pre_process_egg_file () |
Performs any processing of the egg file that is appropriate after reading it in. | |
Protected Member Functions | |
bool | do_reader_options () |
Postprocesses the egg file as the user requested according to whatever command-line options are in effect. | |
virtual bool | handle_args (Args &args) |
Does something with the additional arguments on the command line (after all the -options have been parsed). | |
virtual bool | post_command_line () |
This is called after the command line has been completely processed, and it gives the program a chance to do some last-minute processing and validation of the options and arguments. | |
Protected Attributes | |
bool | _force_complete |
This is the base class for a program that reads egg files, but doesn't write an egg file.
Definition at line 30 of file eggReader.h.
void EggReader::add_delod_options | ( | double | default_delod = -1.0 | ) |
Adds -delod as a valid option for this program.
Note that if you call this function to add these options, you must call do_reader_options() at the appropriate point before or during processing to execute the options if the user specified them.
Definition at line 114 of file eggReader.cxx.
References ProgramBase::add_option(), and ProgramBase::dispatch_double().
void EggReader::add_texture_options | ( | ) |
Adds -td, -te, etc.
as valid options for this program. If the user specifies one of the options on the command line, the textures will be copied and converted as each egg file is read.
Note that if you call this function to add these options, you must call do_reader_options() at the appropriate point before or during processing to execute the options if the user specified them.
Definition at line 77 of file eggReader.cxx.
References ProgramBase::add_option(), ProgramBase::dispatch_filename(), ProgramBase::dispatch_image_type(), and ProgramBase::dispatch_string().
EggReader * EggReader::as_reader | ( | ) | [virtual] |
Returns this object as an EggReader pointer, if it is in fact an EggReader, or NULL if it is not.
This is intended to work around the C++ limitation that prevents downcasts past virtual inheritance. Since both EggReader and EggWriter inherit virtually from EggSingleBase, we need functions like this to downcast to the appropriate pointer.
Reimplemented from EggSingleBase.
Definition at line 150 of file eggReader.cxx.
bool EggReader::do_reader_options | ( | ) | [protected] |
Postprocesses the egg file as the user requested according to whatever command-line options are in effect.
Returns true if everything is done correctly, false if there was some problem.
Definition at line 248 of file eggReader.cxx.
bool EggReader::handle_args | ( | ProgramBase::Args & | args | ) | [protected, virtual] |
Does something with the additional arguments on the command line (after all the -options have been parsed).
Returns true if the arguments are good, false otherwise.
Reimplemented from ProgramBase.
Reimplemented in SomethingToEgg, EggToBam, EggToSomething, EggQtess, and EggFilter.
Definition at line 173 of file eggReader.cxx.
References DSearchPath::append_directory(), EggBase::convert_paths(), Filename::from_os_specific(), Filename::get_basename(), Filename::get_dirname(), EggData::load_externals(), EggData::original_had_absolute_pathnames(), pre_process_egg_file(), and EggData::read().
bool EggReader::post_command_line | ( | ) | [protected, virtual] |
This is called after the command line has been completely processed, and it gives the program a chance to do some last-minute processing and validation of the options and arguments.
It should return true if everything is fine, false if there is an error.
Reimplemented from EggSingleBase.
Reimplemented in SomethingToEgg, EggFilter, and EggCrop.
Definition at line 235 of file eggReader.cxx.
void EggReader::pre_process_egg_file | ( | ) | [virtual] |
Performs any processing of the egg file that is appropriate after reading it in.
Normally, you should not need to call this function directly; it is called automatically at startup.
Reimplemented in EggToSomething.
Definition at line 164 of file eggReader.cxx.
Referenced by handle_args().