Panda3D
|
This class supervises the construction of an EggData structure from the data represented by the LwoHeader. More...
#include "lwoToEggConverter.h"
Public Member Functions | |
LwoToEggConverter (const LwoToEggConverter ©) | |
virtual bool | convert_file (const Filename &filename) |
Handles the reading of the input file and converting it to egg. | |
bool | convert_lwo (const LwoHeader *lwo_header) |
Fills up the egg_data structure according to the indicated lwo structure. | |
CLwoClip * | get_clip (int number) const |
Returns a pointer to the clip with the given index number, or NULL if there is no such clip. | |
virtual string | get_extension () const |
Returns the common extension of the file type this converter supports. | |
CLwoLayer * | get_layer (int number) const |
Returns a pointer to the layer with the given index number, or NULL if there is no such layer. | |
virtual string | get_name () const |
Returns the English name of the file type this converter supports. | |
CLwoSurface * | get_surface (const string &name) const |
Returns a pointer to the surface definition with the given name, or NULL if there is no such surface. | |
virtual SomethingToEggConverter * | make_copy () |
Allocates and returns a new copy of the converter. | |
virtual bool | supports_compressed () const |
Returns true if this file type can transparently load compressed files (with a .pz extension), false otherwise. | |
Public Attributes | |
bool | _make_materials |
This class supervises the construction of an EggData structure from the data represented by the LwoHeader.
Reading and writing the egg and lwo structures is left to the user.
Definition at line 41 of file lwoToEggConverter.h.
bool LwoToEggConverter::convert_file | ( | const Filename & | filename | ) | [virtual] |
Handles the reading of the input file and converting it to egg.
Returns true if successful, false otherwise.
This is designed to be as generic as possible, generally in support of run-time loading. Command-line converters may choose to use convert_lwo() instead, as it provides more control.
Implements SomethingToEggConverter.
Definition at line 125 of file lwoToEggConverter.cxx.
References convert_lwo(), LwoHeader::is_valid(), and IffInputFile::open_read().
bool LwoToEggConverter::convert_lwo | ( | const LwoHeader * | lwo_header | ) |
Fills up the egg_data structure according to the indicated lwo structure.
Definition at line 163 of file lwoToEggConverter.cxx.
References SomethingToEggConverter::had_error().
Referenced by convert_file().
CLwoClip * LwoToEggConverter::get_clip | ( | int | number | ) | const |
Returns a pointer to the clip with the given index number, or NULL if there is no such clip.
Definition at line 202 of file lwoToEggConverter.cxx.
Referenced by CLwoSurface::check_texture().
string LwoToEggConverter::get_extension | ( | ) | const [virtual] |
Returns the common extension of the file type this converter supports.
Implements SomethingToEggConverter.
Definition at line 96 of file lwoToEggConverter.cxx.
CLwoLayer * LwoToEggConverter::get_layer | ( | int | number | ) | const |
Returns a pointer to the layer with the given index number, or NULL if there is no such layer.
Definition at line 188 of file lwoToEggConverter.cxx.
Referenced by CLwoLayer::connect_egg().
string LwoToEggConverter::get_name | ( | ) | const [virtual] |
Returns the English name of the file type this converter supports.
Implements SomethingToEggConverter.
Definition at line 85 of file lwoToEggConverter.cxx.
CLwoSurface * LwoToEggConverter::get_surface | ( | const string & | name | ) | const |
Returns a pointer to the surface definition with the given name, or NULL if there is no such surface.
Definition at line 216 of file lwoToEggConverter.cxx.
Referenced by CLwoSurface::apply_properties(), and CLwoPolygons::get_surface().
SomethingToEggConverter * LwoToEggConverter::make_copy | ( | ) | [virtual] |
Allocates and returns a new copy of the converter.
Implements SomethingToEggConverter.
Definition at line 74 of file lwoToEggConverter.cxx.
bool LwoToEggConverter::supports_compressed | ( | ) | const [virtual] |
Returns true if this file type can transparently load compressed files (with a .pz extension), false otherwise.
Reimplemented from SomethingToEggConverter.
Definition at line 108 of file lwoToEggConverter.cxx.