Panda3D
|
Simple directed vector force. More...
#include "linearVectorForce.h"
Public Member Functions | |
LinearVectorForce (const LVector3 &vec, PN_stdfloat a=1.0f, bool mass=false) | |
Vector Constructor. | |
LinearVectorForce (const LinearVectorForce ©) | |
Copy Constructor. | |
LinearVectorForce (PN_stdfloat x=0.0f, PN_stdfloat y=0.0f, PN_stdfloat z=0.0f, PN_stdfloat a=1.0f, bool mass=false) | |
Default/Piecewise constructor. | |
virtual | ~LinearVectorForce () |
Destructor. | |
virtual TypeHandle | force_init_type () |
LVector3 | get_local_vector () const |
virtual TypeHandle | get_type () const |
LinearVectorForce & | operator+= (const LinearVectorForce &other) |
Performs a memberwise addition between two LinearVectorForces. | |
virtual void | output (ostream &out) const |
Write a string representation of this instance to <out>. | |
void | set_vector (const LVector3 &v) |
encapsulating wrapper | |
void | set_vector (PN_stdfloat x, PN_stdfloat y, PN_stdfloat z) |
piecewise encapsulating wrapper | |
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. |
Simple directed vector force.
Suitable for gravity, non-turbulent wind, etc...
Definition at line 25 of file linearVectorForce.h.
LinearVectorForce::LinearVectorForce | ( | const LVector3 & | vec, |
PN_stdfloat | a = 1.0f , |
||
bool | mass = false |
||
) |
Vector Constructor.
Definition at line 30 of file linearVectorForce.cxx.
LinearVectorForce::LinearVectorForce | ( | const LinearVectorForce & | copy | ) |
Copy Constructor.
Definition at line 52 of file linearVectorForce.cxx.
LinearVectorForce::LinearVectorForce | ( | PN_stdfloat | x = 0.0f , |
PN_stdfloat | y = 0.0f , |
||
PN_stdfloat | z = 0.0f , |
||
PN_stdfloat | a = 1.0f , |
||
bool | mass = false |
||
) |
Default/Piecewise constructor.
Definition at line 41 of file linearVectorForce.cxx.
LinearVectorForce::~LinearVectorForce | ( | ) | [virtual] |
Destructor.
Definition at line 63 of file linearVectorForce.cxx.
static void LinearVectorForce::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.
Definition at line 54 of file linearVectorForce.h.
References LinearForce::init_type().
LinearVectorForce & LinearVectorForce::operator+= | ( | const LinearVectorForce & | other | ) | [inline] |
Performs a memberwise addition between two LinearVectorForces.
Definition at line 51 of file linearVectorForce.I.
void LinearVectorForce::output | ( | ostream & | out | ) | const [virtual] |
Write a string representation of this instance to <out>.
Reimplemented from LinearForce.
Definition at line 93 of file linearVectorForce.cxx.
void LinearVectorForce::set_vector | ( | const LVector3 & | v | ) | [inline] |
encapsulating wrapper
Definition at line 21 of file linearVectorForce.I.
void LinearVectorForce::set_vector | ( | PN_stdfloat | x, |
PN_stdfloat | y, | ||
PN_stdfloat | z | ||
) | [inline] |
piecewise encapsulating wrapper
Definition at line 31 of file linearVectorForce.I.
void LinearVectorForce::write | ( | ostream & | out, |
unsigned int | indent = 0 |
||
) | const [virtual] |
Write a string representation of this instance to <out>.
Reimplemented from LinearForce.
Definition at line 106 of file linearVectorForce.cxx.