Panda3D
Public Member Functions | List of all members
EggReader Class Reference

This is the base class for a program that reads egg files, but doesn't write an egg file. More...

#include "eggReader.h"

Inheritance diagram for EggReader:
EggSingleBase EggBase ProgramBase EggFilter EggListTextures EggConverter EggCrop EggQtess EggTrans EggToSomething SomethingToEgg EggToBam EggToC EggToDAE EggToDXF EggToFlt EggToMaya EggToObj EggToX BamToEgg DAEToEgg DXFToEgg FltToEgg LwoToEgg MayaToEgg MayaToEggClient MayaToEggServer ObjToEgg VRMLToEgg XFileToEgg

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 EggReaderas_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...
 
- Public Member Functions inherited from EggSingleBase
virtual EggWriteras_writer ()
 Returns this object as an EggWriter pointer, if it is in fact an EggWriter, or NULL if it is not. More...
 
- Public Member Functions inherited from EggBase
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...
 
- Public Member Functions inherited from ProgramBase
 ProgramBase (const std::string &name=std::string())
 
std::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 std::string &text)
 Formats the indicated text to stderr with the known _terminal_width. More...
 
void show_text (const std::string &prefix, int indent_width, std::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 (std::ostream &out)
 Generates a man page in nroff syntax based on the description and options. More...
 

Additional Inherited Members

- Public Types inherited from ProgramBase
typedef pdeque< std::string > Args
 
- Static Public Member Functions inherited from EggBase
static void convert_paths (EggNode *node, PathReplace *path_replace, const DSearchPath &additional_path)
 Recursively walks the egg hierarchy. More...
 
- Public Attributes inherited from ProgramBase
Args _program_args
 
Filename _program_name
 

Detailed Description

This is the base class for a program that reads egg files, but doesn't write an egg file.

Definition at line 28 of file eggReader.h.

Member Function Documentation

◆ add_delod_options()

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 104 of file eggReader.cxx.

◆ 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 70 of file eggReader.cxx.

◆ as_reader()

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 137 of file eggReader.cxx.

◆ pre_process_egg_file()

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.

Definition at line 149 of file eggReader.cxx.


The documentation for this class was generated from the following files: