Panda3D
Public Member Functions

LParabolad Class Reference

An abstract mathematical description of a parabola, particularly useful for describing arcs of projectiles. More...

#include "parabola.h"

List of all members.

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 &copy)
 LParabolad (const LParabolad &copy)
LPoint3d calc_point (double t) const
 Computes the point on the parabola at time t.
LPoint3d calc_point (double t) const
const LVecBase3dget_a () const
const LVecBase3dget_a () const
 Returns the first point of the parabola's parametric equation: the acceleration.
const LVecBase3dget_b () const
 Returns the second point of the parabola's parametric equation: the initial velocity.
const LVecBase3dget_b () const
const LVecBase3dget_c () const
 Returns the third point of the parabola's parametric equation: the start point.
const LVecBase3dget_c () const
void operator= (const LParabolad &copy)
void operator= (const LParabolad &copy)
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)

Detailed Description

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.


Constructor & Destructor Documentation

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.


Member Function Documentation

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().

See write_datagram_fixed().

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.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations