15 #include "fltTransformGeneralMatrix.h"
16 #include "fltRecordReader.h"
17 #include "fltRecordWriter.h"
19 TypeHandle FltTransformGeneralMatrix::_type_handle;
26 FltTransformGeneralMatrix::
47 _matrix = LCAST(
double, matrix);
58 bool FltTransformGeneralMatrix::
60 if (!FltTransformRecord::extract_record(reader)) {
64 nassertr(reader.
get_opcode() == FO_general_matrix,
false);
67 for (
int r = 0; r < 4; r++) {
68 for (
int c = 0; c < 4; c++) {
85 bool FltTransformGeneralMatrix::
87 if (!FltTransformRecord::build_record(writer)) {
94 for (
int r = 0; r < 4; r++) {
95 for (
int c = 0; c < 4; c++) {
This class writes a sequence of FltRecords to an ostream, handling opcode and size counts properly...
This is a 4-by-4 transform matrix.
This class turns an istream into a sequence of FltRecords by reading a sequence of Datagrams and extr...
PN_float32 get_be_float32()
Extracts a 32-bit big-endian single-precision floating-point number.
DatagramIterator & get_iterator()
Returns an iterator suitable for extracting data from the current record.
void add_be_float32(PN_float32 value)
Adds a 32-bit single-precision big-endian floating-point number to the datagram.
This is a 4-by-4 transform matrix.
void check_remaining_size(const DatagramIterator &di, const string &name=string()) const
Checks that the iterator has no bytes left, as it should at the end of a successfully read record...
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. ...
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 ...