Panda3D
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions
LinearRandomForce Class Reference

Pure virtual, parent to noiseForce and jitterForce. More...

#include "linearRandomForce.h"

Inheritance diagram for LinearRandomForce:
LinearForce BaseForce TypedReferenceCount TypedObject ReferenceCount MemoryBase MemoryBase LinearJitterForce LinearNoiseForce

List of all members.

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)
 copy constructor
virtual LVector3 get_child_vector (const PhysicsObject *po)=0
virtual LinearForcemake_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

Detailed Description

Pure virtual, parent to noiseForce and jitterForce.

Definition at line 27 of file linearRandomForce.h.


Constructor & Destructor Documentation

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.

copy constructor

Definition at line 35 of file linearRandomForce.cxx.


Member Function Documentation

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 LinearNoiseForce, and LinearJitterForce.

Definition at line 48 of file linearRandomForce.h.

References LinearForce::init_type().

Referenced by LinearJitterForce::init_type(), and LinearNoiseForce::init_type().

void LinearRandomForce::output ( ostream &  out) const [virtual]

Write a string representation of this instance to <out>.

Reimplemented from LinearForce.

Reimplemented in LinearNoiseForce, and LinearJitterForce.

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 LinearNoiseForce, and LinearJitterForce.

Definition at line 78 of file linearRandomForce.cxx.


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