Panda3D
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties
Public Member Functions
LParabolad Class Reference

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

List of all members.

Public Member Functions

 LParabolad ()
 Constructs a meaningless degenerate parabola.
 LParabolad (LParabolad const copy)
 LParabolad (VBase3D const a, VBase3D const b, VBase3D const c)
 Constructs a parabola given the three points of the parametric equation: the acceleration, initial velocity, and start point.
Point3D calcPoint (double t)
 Computes the point on the parabola at time t.
VBase3D const getA ()
 Returns the first point of the parabola's parametric equation: the acceleration.
VBase3D const getB ()
 Returns the second point of the parabola's parametric equation: the initial velocity.
VBase3D const getC ()
 Returns the third point of the parabola's parametric equation: the start point.
LParabolad operator= (LParabolad const copy)
 output (ostream out)
 readDatagram (DatagramIterator source)
 Reads the parabola from the Datagram using get_stdfloat().
 readDatagramFixed (DatagramIterator source)
 Reads the parabola from the Datagram using get_float32() or get_float64().
 write (ostream out, int indent_level)
 write (ostream out)
 writeDatagram (Datagram destination)
 Writes the parabola to the Datagram using add_stdfloat().
 writeDatagramFixed (Datagram destination)
 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().
 xform (Mat4D const mat)
 Transforms the parabola by the indicated matrix.

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.


Constructor & Destructor Documentation

Constructs a meaningless degenerate parabola.

LParabolad ( LParabolad const  copy)
LParabolad ( VBase3D const  a,
VBase3D const  b,
VBase3D const  c 
)

Constructs a parabola given the three points of the parametric equation: the acceleration, initial velocity, and start point.


Member Function Documentation

Point3D calcPoint ( double  t)

Computes the point on the parabola at time t.

VBase3D const getA ( )

Returns the first point of the parabola's parametric equation: the acceleration.

VBase3D const getB ( )

Returns the second point of the parabola's parametric equation: the initial velocity.

VBase3D const getC ( )

Returns the third point of the parabola's parametric equation: the start point.

LParabolad operator= ( LParabolad const  copy)
output ( ostream  out)

Reads the parabola from the Datagram using get_stdfloat().

Reads the parabola from the Datagram using get_float32() or get_float64().

See write_datagram_fixed().

write ( ostream  out,
int  indent_level 
)
write ( ostream  out)
writeDatagram ( Datagram  destination)

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.

writeDatagramFixed ( Datagram  destination)

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.

xform ( Mat4D const  mat)

Transforms the parabola by the indicated matrix.

 All Classes Namespaces Functions Variables Enumerations Enumerator Properties