Panda3D
|
A transformation that rotates about a particular axis in space, defined by a point and vector. More...
#include "fltTransformRotateAboutPoint.h"
Public Member Functions | |
FltTransformRotateAboutPoint (FltHeader *header) | |
virtual TypeHandle | force_init_type () |
PN_stdfloat | get_angle () const |
Returns the angle of rotation, in degrees counterclockwise about the axis. | |
const LVector3 & | get_axis () const |
const LPoint3d & | get_center () const |
virtual TypeHandle | get_type () const |
void | set (const LPoint3d ¢er, const LVector3 &axis, PN_stdfloat angle) |
Defines the rotation. | |
Static Public Member Functions | |
static TypeHandle | get_class_type () |
static void | init_type () |
This function is declared non-inline to work around a compiler bug in g++ 2.96. | |
Protected Member Functions | |
virtual bool | build_record (FltRecordWriter &writer) const |
Fills up the current record on the FltRecordWriter with data for this record, but does not advance the writer. | |
virtual bool | extract_record (FltRecordReader &reader) |
Fills in the information in this record based on the information given in the indicated datagram, whose opcode has already been read. |
A transformation that rotates about a particular axis in space, defined by a point and vector.
Definition at line 27 of file fltTransformRotateAboutPoint.h.
bool FltTransformRotateAboutPoint::build_record | ( | FltRecordWriter & | writer | ) | const [protected, virtual] |
Fills up the current record on the FltRecordWriter with data for this record, but does not advance the writer.
Returns true on success, false if there is some error.
Reimplemented from FltRecord.
Definition at line 141 of file fltTransformRotateAboutPoint.cxx.
References Datagram::add_be_float32(), Datagram::add_be_float64(), FltRecord::build_record(), Datagram::pad_bytes(), FltRecordWriter::set_opcode(), and FltRecordWriter::update_datagram().
bool FltTransformRotateAboutPoint::extract_record | ( | FltRecordReader & | reader | ) | [protected, virtual] |
Fills in the information in this record based on the information given in the indicated datagram, whose opcode has already been read.
Returns true on success, false if the datagram is invalid.
Reimplemented from FltRecord.
Definition at line 108 of file fltTransformRotateAboutPoint.cxx.
References FltRecord::check_remaining_size(), FltRecord::extract_record(), FltRecordReader::get_iterator(), FltRecordReader::get_opcode(), and DatagramIterator::skip_bytes().
PN_stdfloat FltTransformRotateAboutPoint::get_angle | ( | ) | const |
Returns the angle of rotation, in degrees counterclockwise about the axis.
Definition at line 75 of file fltTransformRotateAboutPoint.cxx.
Referenced by FltToEggLevelState::set_transform().
static void FltTransformRotateAboutPoint::init_type | ( | ) | [inline, static] |
This function is declared non-inline to work around a compiler bug in g++ 2.96.
Making it inline seems to cause problems in the optimizer.
Reimplemented from FltTransformRecord.
Definition at line 56 of file fltTransformRotateAboutPoint.h.
void FltTransformRotateAboutPoint::set | ( | const LPoint3d & | center, |
const LVector3 & | axis, | ||
PN_stdfloat | angle | ||
) |
Defines the rotation.
The angle is given in degrees, counterclockwise about the axis as seen from point a.
Definition at line 40 of file fltTransformRotateAboutPoint.cxx.