Go to the documentation of this file.
27 _curve_type = CT_b_spline;
37 if (!FltBeadID::extract_record(reader)) {
41 nassertr(reader.
get_opcode() == FO_curve,
false);
49 for (
int i = 0; i < num_control_points; i++) {
53 _control_points.push_back(LPoint3d(x, y, z));
67 if (!FltBeadID::build_record(writer)) {
79 ControlPoints::const_iterator ci;
80 for (ci = _control_points.begin(); ci != _control_points.end(); ++ci) {
81 const LPoint3d &p = (*ci);
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...
A base class for any of a broad family of flt beads that include an ID.
A class to retrieve the individual data elements previously stored in a Datagram.
FltOpcode get_opcode() const
Returns the opcode associated with the current record.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void pad_bytes(size_t size)
Adds the indicated number of zero bytes to the datagram.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
TypeHandle is the identifier used to differentiate C++ class types.
DatagramIterator & get_iterator()
Returns an iterator suitable for extracting data from the current record.
int32_t get_be_int32()
Extracts a signed 32-bit big-endian integer.
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.
void add_be_float64(PN_float64 value)
Adds a 64-bit big-endian floating-point number to the datagram.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void skip_bytes(size_t size)
Skips over the indicated number of bytes in the datagram.
PN_float64 get_be_float64()
Extracts a 64-bit big-endian floating-point number.
void add_be_int32(int32_t value)
Adds a signed 32-bit big-endian integer to the datagram.
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.