27 _from_origin.set(0.0, 0.0, 0.0);
28 _from_align.set(1.0, 0.0, 0.0);
29 _from_track.set(1.0, 0.0, 0.0);
30 _to_origin.set(0.0, 0.0, 0.0);
31 _to_align.set(1.0, 0.0, 0.0);
32 _to_track.set(1.0, 0.0, 0.0);
40set(
const LPoint3d &from_origin,
const LPoint3d &from_align,
41 const LPoint3d &from_track,
42 const LPoint3d &to_origin,
const LPoint3d &to_align,
43 const LPoint3d &to_track) {
44 _from_origin = from_origin;
45 _from_align = from_align;
46 _from_track = from_track;
47 _to_origin = to_origin;
57const LPoint3d &FltTransformPut::
58get_from_origin()
const {
65const LPoint3d &FltTransformPut::
66get_from_align()
const {
73const LPoint3d &FltTransformPut::
74get_from_track()
const {
81const LPoint3d &FltTransformPut::
82get_to_origin()
const {
89const LPoint3d &FltTransformPut::
97const LPoint3d &FltTransformPut::
105void FltTransformPut::
108 look_at(r1, _from_align - _from_origin, _from_track - _from_origin, CS_zup_right);
109 look_at(r2, _to_align - _to_origin, _to_track - _to_origin, CS_zup_right);
112 LMatrix4d::translate_mat(-_from_origin) *
115 LMatrix4d::translate_mat(_to_origin);
123bool FltTransformPut::
125 if (!FltTransformRecord::extract_record(reader)) {
129 nassertr(reader.
get_opcode() == FO_put,
false);
164bool FltTransformPut::
166 if (!FltTransformRecord::build_record(writer)) {
A class to retrieve the individual data elements previously stored in a Datagram.
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.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
void add_be_float64(PN_float64 value)
Adds a 64-bit big-endian floating-point number to the datagram.
void pad_bytes(size_t size)
Adds the indicated number of zero bytes to the datagram.
This class turns an istream into a sequence of FltRecords by reading a sequence of Datagrams and extr...
FltOpcode get_opcode() const
Returns the opcode associated with the current record.
DatagramIterator & get_iterator()
Returns an iterator suitable for extracting data from the current record.
This class writes a sequence of FltRecords to an ostream, handling opcode and size counts properly.
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 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.
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.