37class EXPCL_PANDA_EGG EggData :
public EggGroupNode {
40 INLINE EggData(
const EggData ©);
41 INLINE EggData &operator = (
const EggData ©);
46 bool read(
Filename filename, std::string display_name = std::string());
47 bool read(std::istream &in);
48 void merge(EggData &other);
82 virtual void write(std::ostream &out,
int indent_level = 0)
const;
88 bool _auto_resolve_externals;
89 bool _had_absolute_pathnames;
90 CoordinateSystem _coordsys;
92 time_t _egg_timestamp;
98 static void init_type() {
99 EggGroupNode::init_type();
101 EggGroupNode::get_class_type());
103 virtual TypeHandle get_type()
const {
104 return get_class_type();
106 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
109 static TypeHandle _type_handle;
An instance of this class is written to the front of a Bam or Txo file to make the file a cached inst...
This class stores a list of directories that can be searched, in order, to locate a particular file.
bool write_egg(Filename filename)
The main interface for writing complete egg files.
bool original_had_absolute_pathnames() const
Returns true if the data processed in the last call to read() contained absolute pathnames,...
get_auto_resolve_externals
Indicates whether the EggData object will automatically resolve any external references when read() i...
static bool resolve_egg_filename(Filename &egg_filename, const DSearchPath &searchpath=DSearchPath())
Looks for the indicated filename, first along the indicated searchpath, and then along the model_path...
set_egg_timestamp
Sets the timestamp of the egg file on disk, at the time it was opened for reading.
get_coordinate_system
Returns the coordinate system in which the egg file is defined.
get_egg_timestamp
Returns the timestamp of the egg file on disk, at the time it was opened for reading,...
set_auto_resolve_externals
Indicates whether the EggData object will automatically resolve any external references when read() i...
bool load_externals(const DSearchPath &searchpath=DSearchPath())
Loads up all the egg files referenced by <File> entries within the egg structure, and inserts their c...
set_coordinate_system
Changes the coordinate system of the EggData.
int collapse_equivalent_materials()
Removes duplicate references to the same material with the same properties.
int collapse_equivalent_textures()
Removes duplicate references to the same texture image with the same properties.
set_egg_filename
Sets the filename–especially the directory part–in which the egg file is considered to reside.
void merge(EggData &other)
Appends the other egg structure to the end of this one.
get_egg_filename
Returns the directory in which the egg file is considered to reside.
bool read(Filename filename, std::string display_name=std::string())
Opens the indicated filename and reads the egg data contents from it.
virtual void write(std::ostream &out, int indent_level) const
Writes the group and all of its children to the indicated output stream in Egg format.
void strip_normals()
Removes all normals from primitives, and the vertices they reference, at this node and below.
void recompute_polygon_normals(CoordinateSystem cs=CS_default)
Recomputes all the polygon normals for polygon geometry at this group node and below so that they acc...
void recompute_vertex_normals(double threshold, CoordinateSystem cs=CS_default)
Recomputes all the vertex normals for polygon geometry at this group node and below so that they accu...
The name of a file, such as a texture file or an Egg file.
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...