37 if (!FltBeadID::extract_record(reader)) {
44 if (!FltGeometry::extract_record(reader)) {
48 nassertr(reader.
get_opcode() == FO_mesh,
false);
61 if (reader.
get_opcode() == FO_local_vertex_pool) {
63 return _vpool->extract_record(reader);
66 return FltBeadID::extract_ancillary(reader);
76 if (!FltBeadID::build_record(writer)) {
83 if (!FltGeometry::build_record(writer)) {
98 if (_vpool !=
nullptr) {
99 if (!_vpool->build_record(writer)) {
100 assert(!flt_error_abort);
103 FltError result = writer.
advance();
104 if (result != FE_ok) {
109 return FltBeadID::write_ancillary(writer);
This class writes a sequence of FltRecords to an ostream, handling opcode and size counts properly.
This class turns an istream into a sequence of FltRecords by reading a sequence of Datagrams and extr...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void check_remaining_size(const DatagramIterator &di, const std::string &name=std::string()) const
Checks that the iterator has no bytes left, as it should at the end of a successfully read record.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
DatagramIterator & get_iterator()
Returns an iterator suitable for extracting data from the current record.
This is a base class for both FltFace and FltMesh, which are two different kinds of geometric primiti...
void pad_bytes(size_t size)
Adds the indicated number of zero bytes to the datagram.
A local vertex pool, as might appear in the middle of the hierarchy, for instance for a mesh.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void skip_bytes(size_t size)
Skips over the indicated number of bytes in the datagram.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
FltError advance()
Writes the current record to the flt file, and resets the current record to receive new data.
FltOpcode get_opcode() const
Returns the opcode associated with the current record.
A class to retrieve the individual data elements previously stored in a Datagram.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
TypeHandle is the identifier used to differentiate C++ class types.
void set_opcode(FltOpcode opcode)
Sets the opcode associated with the current record.
Datagram & update_datagram()
Returns a modifiable reference to the datagram associated with the current record.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...