Panda3D
Public Member Functions | List of all members
LParabolaf Class Reference

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

Public Member Functions

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

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.

Member Function Documentation

◆ __init__() [1/3]

__init__ ( )

Constructs a meaningless degenerate parabola.

◆ __init__() [2/3]

__init__ ( const LParabolaf  copy)

◆ __init__() [3/3]

__init__ ( const LVecBase3f  a,
const LVecBase3f  b,
const LVecBase3f  c 
)

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

◆ calcPoint()

LPoint3f calcPoint ( float  t)

Computes the point on the parabola at time t.

◆ getA()

const LVecBase3f getA ( )

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

◆ getB()

const LVecBase3f getB ( )

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

◆ getC()

const LVecBase3f getC ( )

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

◆ operator=()

LParabolaf operator= ( const LParabolaf  copy)

◆ output()

output ( Ostream  out)

◆ readDatagram()

readDatagram ( DatagramIterator  source)

Reads the parabola from the Datagram using get_stdfloat().

◆ readDatagramFixed()

readDatagramFixed ( DatagramIterator  source)

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

See write_datagram_fixed().

◆ write()

write ( Ostream  out,
int  indent_level 
)

◆ writeDatagram()

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

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

xform ( const LMatrix4f  mat)

Transforms the parabola by the indicated matrix.