35std::string LoaderFileTypeBam::
43std::string LoaderFileTypeBam::
44get_extension()
const {
83 if (record !=
nullptr) {
84 record->add_dependent_file(path);
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())) {
98 ModelRoot *model_root = DCAST(ModelRoot, node.p());
110bool LoaderFileTypeBam::
115 bool report_errors = (options.get_flags() & LoaderOptions::LF_report_errors) != 0;
119 if (bam_file.
open_write(path, report_errors)) {
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
An instance of this class is written to the front of a Bam or Txo file to make the file a cached inst...
void close()
Closes the input or output stream.
PointerTo< PandaNode > read_node(bool report_errors=true)
Although the bam file format is general enough to store a list of objects of arbitrary type,...
bool open_write(const Filename &bam_filename, bool report_errors=true)
Attempts to open the indicated file for writing.
bool open_read(const Filename &bam_filename, bool report_errors=true)
Attempts to open the indicated filename for reading.
get_reader
Returns the BamReader in charge of performing the read operations.
bool write_object(const TypedWritable *object)
Writes the indicated object to the Bam file.
The name of a file, such as a texture file or an Egg file.
virtual bool supports_compressed() const
Returns true if this file type can transparently load compressed files (with a .pz or ....
virtual bool supports_load() const
Returns true if the file type can be used to load files, and load_file() is supported.
virtual bool supports_save() const
Returns true if the file type can be used to save files, and save_file() is supported.
Specifies parameters that may be passed to the loader.
set_fullpath
Sets the full pathname of the model represented by this node, as found on disk.
set_timestamp
Sets the timestamp of the file on disk that was read for this model.
A basic node of the scene graph or data graph.
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.