Panda3D
Loading...
Searching...
No Matches
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.
 
void clear_error ()
 Resets the error flag to the no-error state.
 
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.
 
EggDataget_egg_data ()
 Returns the EggData structure.
 
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().
 
bool had_error () const
 Returns true if an error was detected during the conversion process, false otherwise.
 
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.
 
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.
 
virtual bool supports_compressed () const
 Returns true if this file type can transparently save compressed files (with a .pz extension), false otherwise.
 
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.

Constructor & Destructor Documentation

◆ EggToSomethingConverter() [1/2]

EggToSomethingConverter::EggToSomethingConverter ( )

Definition at line 21 of file eggToSomethingConverter.cxx.

◆ EggToSomethingConverter() [2/2]

EggToSomethingConverter::EggToSomethingConverter ( const EggToSomethingConverter & copy)

Definition at line 30 of file eggToSomethingConverter.cxx.

◆ ~EggToSomethingConverter()

EggToSomethingConverter::~EggToSomethingConverter ( )
virtual

Definition at line 39 of file eggToSomethingConverter.cxx.

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 35 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 18 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 57 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 43 of file eggToSomethingConverter.I.

◆ get_extension()

virtual std::string EggToSomethingConverter::get_extension ( ) const
pure virtual

Implemented in EggToObjConverter.

◆ get_name()

virtual std::string EggToSomethingConverter::get_name ( ) const
pure virtual

Implemented in EggToObjConverter.

◆ get_output_units()

DistanceUnit EggToSomethingConverter::get_output_units ( ) const
inline

Returns the value supplied to set_output_units().

Definition at line 61 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 27 of file eggToSomethingConverter.I.

Referenced by EggToObjConverter::write_file().

◆ make_copy()

virtual EggToSomethingConverter * EggToSomethingConverter::make_copy ( )
pure virtual

Implemented in EggToObjConverter.

◆ 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 48 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 53 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 66 of file eggToSomethingConverter.cxx.

Referenced by LoaderFileTypePandatool::supports_compressed().

◆ write_file()

virtual bool EggToSomethingConverter::write_file ( const Filename & filename)
pure virtual

Implemented in EggToObjConverter.


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