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. More... | |
void | add_texture_options () |
Adds -td, -te, etc. More... | |
virtual EggReader * | as_reader () |
Returns this object as an EggReader pointer, if it is in fact an EggReader, or NULL if it is not. More... | |
virtual void | pre_process_egg_file () |
Performs any processing of the egg file that is appropriate after reading it in. More... | |
![]() | |
virtual EggWriter * | as_writer () |
Returns this object as an EggWriter pointer, if it is in fact an EggWriter, or NULL if it is not. More... | |
![]() | |
void | add_normals_options () |
Adds -no, -np, etc. More... | |
void | add_points_options () |
Adds -points as a valid option for this program. More... | |
void | add_transform_options () |
Adds -TS, -TT, etc. More... | |
![]() | |
ProgramBase (const string &name=string()) | |
string | get_exec_command () const |
Returns the command that invoked this program, as a shell-friendly string, suitable for pasting into the comments of output files. More... | |
virtual void | parse_command_line (int argc, char **argv) |
Dispatches on each of the options on the command line, and passes the remaining parameters to handle_args(). More... | |
void | show_description () |
Writes the program description to stderr. More... | |
void | show_options () |
Describes each of the available options to stderr. More... | |
void | show_text (const string &text) |
Formats the indicated text to stderr with the known _terminal_width. More... | |
void | show_text (const string &prefix, int indent_width, string text) |
Formats the indicated text and its prefix for output to stderr with the known _terminal_width. More... | |
void | show_usage () |
Writes the usage line(s) to stderr. More... | |
void | write_man_page (ostream &out) |
Generates a man page in nroff syntax based on the description and options. More... | |
Additional Inherited Members | |
![]() | |
typedef pdeque< string > | Args |
![]() | |
static void | convert_paths (EggNode *node, PathReplace *path_replace, const DSearchPath &additional_path) |
Recursively walks the egg hierarchy. More... | |
![]() | |
Args | _program_args |
Filename | _program_name |
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 as_reader().
Referenced by add_texture_options().
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 add_delod_options().
|
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.
References pre_process_egg_file().
Referenced by add_delod_options().
|
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.
Definition at line 164 of file eggReader.cxx.
References DSearchPath::append_directory(), Filename::compare_timestamps(), EggBase::convert_paths(), Filename::exists(), EggTextureCollection::find_used_textures(), Filename::from_os_specific(), Filename::get_basename(), Filename::get_dirname(), EggFilenameNode::get_filename(), TypedObject::is_of_type(), EggData::load_externals(), EggData::original_had_absolute_pathnames(), EggData::read(), PNMImage::read(), Filename::resolve_filename(), Filename::set_dirname(), Filename::set_extension(), and PNMImage::write().
Referenced by EggToSomething::add_units_options(), and as_reader().