Panda3D
|
Pure virtual, parent to noiseForce and jitterForce. More...
#include "linearRandomForce.h"
Public Member Functions | |
virtual | ~LinearRandomForce () |
destructor | |
virtual TypeHandle | force_init_type () |
virtual TypeHandle | get_type () const |
virtual void | output (ostream &out) const |
Write a string representation of this instance to <out>. | |
virtual void | write (ostream &out, unsigned int indent=0) const |
Write a string representation of this instance to <out>. | |
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 | |
LinearRandomForce (PN_stdfloat a=1.0f, bool m=false) | |
vector constructor | |
LinearRandomForce (const LinearRandomForce ©) | |
copy constructor | |
virtual LVector3 | get_child_vector (const PhysicsObject *po)=0 |
virtual LinearForce * | make_copy ()=0 |
Static Protected Member Functions | |
static PN_stdfloat | bounded_rand () |
Returns a float in [0, 1]. | |
static LVector3 | random_unit_vector () |
generates a random unit vector |
Pure virtual, parent to noiseForce and jitterForce.
Definition at line 27 of file linearRandomForce.h.
LinearRandomForce::~LinearRandomForce | ( | ) | [virtual] |
destructor
Definition at line 45 of file linearRandomForce.cxx.
LinearRandomForce::LinearRandomForce | ( | PN_stdfloat | a = 1.0f , |
bool | m = false |
||
) | [protected] |
vector constructor
Definition at line 25 of file linearRandomForce.cxx.
LinearRandomForce::LinearRandomForce | ( | const LinearRandomForce & | copy | ) | [protected] |
copy constructor
Definition at line 35 of file linearRandomForce.cxx.
PN_stdfloat LinearRandomForce::bounded_rand | ( | ) | [static, protected] |
Returns a float in [0, 1].
Definition at line 54 of file linearRandomForce.cxx.
Referenced by random_unit_vector().
static void LinearRandomForce::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 LinearForce.
Reimplemented in LinearJitterForce, and LinearNoiseForce.
Definition at line 48 of file linearRandomForce.h.
References LinearForce::init_type().
Referenced by LinearNoiseForce::init_type(), and LinearJitterForce::init_type().
void LinearRandomForce::output | ( | ostream & | out | ) | const [virtual] |
Write a string representation of this instance to <out>.
Reimplemented from LinearForce.
Reimplemented in LinearJitterForce, and LinearNoiseForce.
Definition at line 65 of file linearRandomForce.cxx.
LVector3 LinearRandomForce::random_unit_vector | ( | ) | [inline, static, protected] |
generates a random unit vector
Definition at line 21 of file linearRandomForce.I.
References bounded_rand().
Referenced by LinearNoiseForce::init_noise_tables().
void LinearRandomForce::write | ( | ostream & | out, |
unsigned int | indent = 0 |
||
) | const [virtual] |
Write a string representation of this instance to <out>.
Reimplemented from LinearForce.
Reimplemented in LinearJitterForce, and LinearNoiseForce.
Definition at line 78 of file linearRandomForce.cxx.