Panda3D
Public Member Functions | List of all members
EggToSomethingConverter Class Referenceabstract

This is a base class for a family of converter classes that manage a conversion from egg format to some other file type. More...

#include "eggToSomethingConverter.h"

Inheritance diagram for EggToSomethingConverter:
EggToObjConverter

Public Member Functions

 EggToSomethingConverter (const EggToSomethingConverter &copy)
 
void clear_egg_data ()
 Sets the EggData to NULL and makes the converter invalid. More...
 
void clear_error ()
 Resets the error flag to the no-error state. More...
 
virtual std::string get_additional_extensions () const
 Returns a space-separated list of extension, in addition to the one returned by get_extension(), that are recognized by this converter. More...
 
EggDataget_egg_data ()
 Returns the EggData structure. More...
 
virtual std::string get_extension () const =0
 
virtual std::string get_name () const =0
 
CoordinateSystem get_output_coordinate_system () const
 
DistanceUnit get_output_units () const
 Returns the value supplied to set_output_units(). More...
 
bool had_error () const
 Returns true if an error was detected during the conversion process, false otherwise. More...
 
virtual EggToSomethingConvertermake_copy ()=0
 
void set_egg_data (EggData *egg_data)
 Sets the egg data that will be filled in when convert_file() is called. More...
 
void set_output_coordinate_system (CoordinateSystem output_coordinate_system) const
 
void set_output_units (DistanceUnit output_units)
 Specifies the units that the EggData has already been scaled to. More...
 
virtual bool supports_compressed () const
 Returns true if this file type can transparently save compressed files (with a .pz extension), false otherwise. More...
 
virtual bool write_file (const Filename &filename)=0
 

Detailed Description

This is a base class for a family of converter classes that manage a conversion from egg format to some other file type.

Classes of this type can be used to implement egg2xxx converter programs, as well as LoaderFileTypeXXX run-time savers.

Definition at line 34 of file eggToSomethingConverter.h.

Member Function Documentation

◆ clear_egg_data()

void EggToSomethingConverter::clear_egg_data ( )
inline

Sets the EggData to NULL and makes the converter invalid.

Definition at line 36 of file eggToSomethingConverter.I.

References set_egg_data().

◆ clear_error()

void EggToSomethingConverter::clear_error ( )
inline

Resets the error flag to the no-error state.

had_error() will return false until a new error is generated.

Definition at line 19 of file eggToSomethingConverter.I.

Referenced by EggToObjConverter::write_file().

◆ get_additional_extensions()

std::string EggToSomethingConverter::get_additional_extensions ( ) const
virtual

Returns a space-separated list of extension, in addition to the one returned by get_extension(), that are recognized by this converter.

Definition at line 58 of file eggToSomethingConverter.cxx.

Referenced by LoaderFileTypePandatool::get_additional_extensions().

◆ get_egg_data()

EggData * EggToSomethingConverter::get_egg_data ( )
inline

Returns the EggData structure.

Definition at line 44 of file eggToSomethingConverter.I.

◆ get_output_units()

DistanceUnit EggToSomethingConverter::get_output_units ( ) const
inline

Returns the value supplied to set_output_units().

Definition at line 62 of file eggToSomethingConverter.I.

◆ had_error()

bool EggToSomethingConverter::had_error ( ) const
inline

Returns true if an error was detected during the conversion process, false otherwise.

Definition at line 28 of file eggToSomethingConverter.I.

◆ set_egg_data()

void EggToSomethingConverter::set_egg_data ( EggData egg_data)

Sets the egg data that will be filled in when convert_file() is called.

This must be called before convert_file().

Definition at line 49 of file eggToSomethingConverter.cxx.

Referenced by clear_egg_data().

◆ set_output_units()

void EggToSomethingConverter::set_output_units ( DistanceUnit  output_units)
inline

Specifies the units that the EggData has already been scaled to.

This is informational only; if the target file format supports it, this information will be written to the header.

Definition at line 54 of file eggToSomethingConverter.I.

◆ supports_compressed()

bool EggToSomethingConverter::supports_compressed ( ) const
virtual

Returns true if this file type can transparently save compressed files (with a .pz extension), false otherwise.

Reimplemented in EggToObjConverter.

Definition at line 67 of file eggToSomethingConverter.cxx.

Referenced by LoaderFileTypePandatool::supports_compressed().


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