Go to the documentation of this file.
35 std::string LoaderFileTypeBam::
43 std::string LoaderFileTypeBam::
44 get_extension()
const {
83 if (record !=
nullptr) {
87 bool report_errors = (options.get_flags() & LoaderOptions::LF_report_errors) != 0;
90 if (!bam_file.
open_read(path, report_errors)) {
93 bam_file.
get_reader()->set_loader_options(options);
94 time_t timestamp = bam_file.
get_reader()->get_source()->get_timestamp();
96 PT(
PandaNode) node = bam_file.read_node(report_errors);
97 if (node !=
nullptr && node->is_of_type(ModelRoot::get_class_type())) {
110 bool LoaderFileTypeBam::
115 bool report_errors = (options.get_flags() & LoaderOptions::LF_report_errors) != 0;
119 if (bam_file.
open_write(path, report_errors)) {
An instance of this class is written to the front of a Bam or Txo file to make the file a cached inst...
bool open_read(const Filename &bam_filename, bool report_errors=true)
Attempts to open the indicated filename for reading.
bool open_write(const Filename &bam_filename, bool report_errors=true)
Attempts to open the indicated file for writing.
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.
Specifies parameters that may be passed to the loader.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
TypeHandle is the identifier used to differentiate C++ class types.
virtual bool supports_load() const
Returns true if the file type can be used to load files, and load_file() is supported.
bool write_object(const TypedWritable *object)
Writes the indicated object to the Bam file.
get_reader
Returns the BamReader in charge of performing the read operations.
virtual bool supports_save() const
Returns true if the file type can be used to save files, and save_file() is supported.
virtual bool supports_compressed() const
Returns true if this file type can transparently load compressed files (with a .pz or ....
set_timestamp
Sets the timestamp of the file on disk that was read for this model.
The principle public interface to reading and writing Bam disk files.
A node of this type is created automatically at the root of each model file that is loaded.
void add_dependent_file(const Filename &pathname)
Adds the indicated file to the list of files that will be loaded to generate the data in this record.
void close()
Closes the input or output stream.
A basic node of the scene graph or data graph.
set_fullpath
Sets the full pathname of the model represented by this node, as found on disk.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
The name of a file, such as a texture file or an Egg file.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.