Panda3D
|
An abstract mathematical description of a parabola, particularly useful for describing arcs of projectiles. More...
#include "parabola.h"
Public Member Functions | |
LParabolad () | |
Constructs a meaningless degenerate parabola. | |
LParabolad (const LVecBase3d &a, const LVecBase3d &b, const LVecBase3d &c) | |
Constructs a parabola given the three points of the parametric equation: the acceleration, initial velocity, and start point. | |
LParabolad (const LVecBase3d &a, const LVecBase3d &b, const LVecBase3d &c) | |
LParabolad (const LParabolad ©) | |
LParabolad (const LParabolad ©) | |
LPoint3d | calc_point (double t) const |
Computes the point on the parabola at time t. | |
LPoint3d | calc_point (double t) const |
const LVecBase3d & | get_a () const |
const LVecBase3d & | get_a () const |
Returns the first point of the parabola's parametric equation: the acceleration. | |
const LVecBase3d & | get_b () const |
Returns the second point of the parabola's parametric equation: the initial velocity. | |
const LVecBase3d & | get_b () const |
const LVecBase3d & | get_c () const |
Returns the third point of the parabola's parametric equation: the start point. | |
const LVecBase3d & | get_c () const |
void | operator= (const LParabolad ©) |
void | operator= (const LParabolad ©) |
void | output (ostream &out) const |
void | output (ostream &out) const |
void | read_datagram (DatagramIterator &source) |
Reads the parabola from the Datagram using get_stdfloat(). | |
void | read_datagram (DatagramIterator &source) |
void | read_datagram_fixed (DatagramIterator &source) |
void | read_datagram_fixed (DatagramIterator &source) |
Reads the parabola from the Datagram using get_float32() or get_float64(). | |
void | write (ostream &out, int indent_level=0) const |
void | write (ostream &out, int indent_level=0) const |
void | write_datagram (Datagram &destination) const |
void | write_datagram (Datagram &destination) const |
Writes the parabola to the Datagram using add_stdfloat(). | |
void | write_datagram_fixed (Datagram &destination) const |
Writes the parabola to the Datagram using add_float32() or add_float64(), depending on the type of floats in the parabola, regardless of the setting of Datagram::set_stdfloat_double(). | |
void | write_datagram_fixed (Datagram &destination) const |
void | xform (const LMatrix4d &mat) |
Transforms the parabola by the indicated matrix. | |
void | xform (const LMatrix4d &mat) |
An abstract mathematical description of a parabola, particularly useful for describing arcs of projectiles.
The parabolic equation, given parametrically here, is P = At^2 + Bt + C.
Definition at line 47 of file parabola.h.
LParabolad::LParabolad | ( | ) | [inline] |
Constructs a meaningless degenerate parabola.
Definition at line 104 of file parabola.h.
LParabolad::LParabolad | ( | const LVecBase3d & | a, |
const LVecBase3d & | b, | ||
const LVecBase3d & | c | ||
) | [inline] |
Constructs a parabola given the three points of the parametric equation: the acceleration, initial velocity, and start point.
Definition at line 119 of file parabola.h.
LPoint3d LParabolad::calc_point | ( | double | t | ) | const [inline] |
Computes the point on the parabola at time t.
Definition at line 199 of file parabola.h.
const LVecBase3d & LParabolad::get_a | ( | ) | const [inline] |
Returns the first point of the parabola's parametric equation: the acceleration.
Definition at line 167 of file parabola.h.
const LVecBase3d & LParabolad::get_b | ( | ) | const [inline] |
Returns the second point of the parabola's parametric equation: the initial velocity.
Definition at line 178 of file parabola.h.
const LVecBase3d & LParabolad::get_c | ( | ) | const [inline] |
Returns the third point of the parabola's parametric equation: the start point.
Definition at line 189 of file parabola.h.
void LParabolad::read_datagram | ( | DatagramIterator & | source | ) |
Reads the parabola from the Datagram using get_stdfloat().
Definition at line 119 of file parabola.cxx.
void LParabolad::read_datagram_fixed | ( | DatagramIterator & | source | ) |
Reads the parabola from the Datagram using get_float32() or get_float64().
Definition at line 92 of file parabola.cxx.
void LParabolad::write_datagram | ( | Datagram & | destination | ) | const |
Writes the parabola to the Datagram using add_stdfloat().
This is appropriate when you want to write the vector using the standard width setting, especially when you are writing a bam file.
Definition at line 107 of file parabola.cxx.
void LParabolad::write_datagram_fixed | ( | Datagram & | destination | ) | const |
Writes the parabola to the Datagram using add_float32() or add_float64(), depending on the type of floats in the parabola, regardless of the setting of Datagram::set_stdfloat_double().
This is appropriate when you want to write a fixed-width value to the datagram, especially when you are not writing a bam file.
Definition at line 79 of file parabola.cxx.
void LParabolad::xform | ( | const LMatrix4d & | mat | ) |
Transforms the parabola by the indicated matrix.
Definition at line 39 of file parabola.cxx.