Panda3D
|
Pure virtual class for sinks and sources. More...
#include "linearDistanceForce.h"
Public Types | |
enum | FalloffType { FT_ONE_OVER_R, FT_ONE_OVER_R_SQUARED, FT_ONE_OVER_R_CUBED } |
Public Member Functions | |
virtual TypeHandle | force_init_type () |
FalloffType | get_falloff_type () const |
falloff_type query | |
LPoint3 | get_force_center () const |
force_center query | |
PN_stdfloat | get_radius () const |
radius query | |
PN_stdfloat | get_scalar_term () const |
calculate the term based on falloff | |
virtual TypeHandle | get_type () const |
virtual void | output (ostream &out) const |
Write a string representation of this instance to <out>. | |
void | set_falloff_type (FalloffType ft) |
falloff_type encapsulating wrap | |
void | set_force_center (const LPoint3 &p) |
set the force center | |
void | set_radius (PN_stdfloat r) |
set the radius | |
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 | |
LinearDistanceForce (const LPoint3 &p, FalloffType ft, PN_stdfloat r, PN_stdfloat a, bool m) | |
Simple constructor. | |
LinearDistanceForce (const LinearDistanceForce ©) | |
copy constructor | |
virtual | ~LinearDistanceForce () |
destructor |
Pure virtual class for sinks and sources.
Definition at line 26 of file linearDistanceForce.h.
LinearDistanceForce::LinearDistanceForce | ( | const LPoint3 & | p, |
FalloffType | ft, | ||
PN_stdfloat | r, | ||
PN_stdfloat | a, | ||
bool | m | ||
) | [protected] |
Simple constructor.
Definition at line 25 of file linearDistanceForce.cxx.
LinearDistanceForce::LinearDistanceForce | ( | const LinearDistanceForce & | copy | ) | [protected] |
copy constructor
Definition at line 37 of file linearDistanceForce.cxx.
LinearDistanceForce::~LinearDistanceForce | ( | ) | [protected, virtual] |
destructor
Definition at line 50 of file linearDistanceForce.cxx.
LinearDistanceForce::FalloffType LinearDistanceForce::get_falloff_type | ( | ) | const [inline] |
falloff_type query
Definition at line 51 of file linearDistanceForce.I.
LPoint3 LinearDistanceForce::get_force_center | ( | ) | const [inline] |
force_center query
Definition at line 71 of file linearDistanceForce.I.
PN_stdfloat LinearDistanceForce::get_radius | ( | ) | const [inline] |
radius query
Definition at line 61 of file linearDistanceForce.I.
PN_stdfloat LinearDistanceForce::get_scalar_term | ( | ) | const [inline] |
calculate the term based on falloff
Definition at line 81 of file linearDistanceForce.I.
static void LinearDistanceForce::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 LinearSinkForce, and LinearSourceForce.
Definition at line 66 of file linearDistanceForce.h.
References LinearForce::init_type().
Referenced by LinearSourceForce::init_type(), and LinearSinkForce::init_type().
void LinearDistanceForce::output | ( | ostream & | out | ) | const [virtual] |
Write a string representation of this instance to <out>.
Reimplemented from LinearForce.
Reimplemented in LinearSinkForce, and LinearSourceForce.
Definition at line 60 of file linearDistanceForce.cxx.
void LinearDistanceForce::set_falloff_type | ( | FalloffType | ft | ) | [inline] |
falloff_type encapsulating wrap
Definition at line 21 of file linearDistanceForce.I.
void LinearDistanceForce::set_force_center | ( | const LPoint3 & | p | ) | [inline] |
set the force center
Definition at line 41 of file linearDistanceForce.I.
void LinearDistanceForce::set_radius | ( | PN_stdfloat | r | ) | [inline] |
set the radius
Definition at line 31 of file linearDistanceForce.I.
void LinearDistanceForce::write | ( | ostream & | out, |
unsigned int | indent = 0 |
||
) | const [virtual] |
Write a string representation of this instance to <out>.
Reimplemented from LinearForce.
Reimplemented in LinearSinkForce, and LinearSourceForce.
Definition at line 73 of file linearDistanceForce.cxx.