Panda3D
|
Describes a particle that has angular characteristics (velocity, orientation). More...
#include "orientedParticle.h"
Public Member Functions | |
OrientedParticle (int lifespan=0, bool alive=false) | |
simple constructor More... | |
OrientedParticle (const OrientedParticle ©) | |
copy constructor More... | |
virtual | ~OrientedParticle () |
simple destructor More... | |
virtual void | die () |
particle death routine More... | |
virtual void | init () |
particle init routine More... | |
virtual PhysicsObject * | make_copy () const |
simple destructor More... | |
virtual void | output (ostream &out) const |
Write a string representation of this instance to <out>. More... | |
void | set_orientation () |
void | set_velocity () |
virtual void | update () |
particle update routine. More... | |
virtual void | write (ostream &out, int indent=0) const |
Write a string representation of this instance to <out>. More... | |
![]() | |
PN_stdfloat | get_age () const |
bool | get_alive () const |
int | get_index () const |
PN_stdfloat | get_lifespan () const |
PN_stdfloat | get_parameterized_age () const |
PN_stdfloat | get_parameterized_vel () const |
virtual PN_stdfloat | get_theta () const |
for spriteParticleRenderer More... | |
void | set_age (PN_stdfloat age) |
void | set_alive (bool alive) |
void | set_index (int index) |
void | set_lifespan (PN_stdfloat lifespan) |
![]() | |
PhysicsObject () | |
Default Constructor. More... | |
PhysicsObject (const PhysicsObject ©) | |
copy constructor More... | |
virtual | ~PhysicsObject () |
Destructor. More... | |
virtual void | add_impact (const LPoint3 &offset_from_center_of_mass, const LVector3 &impulse) |
Adds an impulse and/or torque (i.e. More... | |
void | add_impulse (const LVector3 &impulse) |
Adds an impulse force (i.e. More... | |
virtual void | add_local_impact (const LPoint3 &offset_from_center_of_mass, const LVector3 &impulse) |
Adds an impulse and/or torque (i.e. More... | |
void | add_local_impulse (const LVector3 &impulse) |
Adds an impulse force (i.e. More... | |
void | add_local_torque (const LRotation &torque) |
Adds an torque force (i.e. More... | |
void | add_torque (const LRotation &torque) |
Adds an torque force (i.e. More... | |
virtual TypeHandle | force_init_type () |
bool | get_active () const |
Process Flag Query. More... | |
LVector3 | get_implicit_velocity () const |
Velocity Query over the last dt. More... | |
virtual LMatrix4 | get_inertial_tensor () const |
returns a transform matrix that represents the object's willingness to be forced. More... | |
LPoint3 | get_last_position () const |
Get the position of the physics object at the start of the most recent do_physics. More... | |
virtual LMatrix4 | get_lcs () const |
returns a transform matrix to this object's local coordinate system. More... | |
PN_stdfloat | get_mass () const |
Get the mass in slugs (or kilograms). More... | |
const string & | get_name () |
LOrientation | get_orientation () const |
get current orientation. More... | |
bool | get_oriented () const |
See set_oriented(). More... | |
LPoint3 | get_position () const |
Position Query. More... | |
LRotation | get_rotation () const |
get rotation per second. More... | |
PN_stdfloat | get_terminal_velocity () const |
tv query More... | |
virtual TypeHandle | get_type () const |
LVector3 | get_velocity () const |
Velocity Query per second. More... | |
const PhysicsObject & | operator= (const PhysicsObject &other) |
void | reset_orientation (const LOrientation &orientation) |
set the orientation while clearing the rotation velocity. More... | |
void | reset_position (const LPoint3 &pos) |
use this to place an object in a completely new position, that has nothing to do with its last position. More... | |
void | set_active (bool flag) |
Process Flag assignment. More... | |
void | set_last_position (const LPoint3 &pos) |
Last position assignment. More... | |
void | set_mass (PN_stdfloat) |
Set the mass in slugs (or kilograms). More... | |
void | set_name (const string &name) |
void | set_orientation (const LOrientation &orientation) |
void | set_oriented (bool flag) |
Set flag to determine whether this object should do any rotation or orientation calculations. More... | |
void | set_position (const LPoint3 &pos) |
Vector position assignment. More... | |
void | set_position (PN_stdfloat x, PN_stdfloat y, PN_stdfloat z) |
Piecewise position assignment. More... | |
void | set_rotation (const LRotation &rotation) |
set rotation as a quaternion delta per second. More... | |
void | set_terminal_velocity (PN_stdfloat tv) |
tv assignment More... | |
void | set_velocity (const LVector3 &vel) |
Vector velocity assignment. More... | |
void | set_velocity (PN_stdfloat x, PN_stdfloat y, PN_stdfloat z) |
Piecewise velocity assignment. More... | |
virtual void | write (ostream &out, unsigned int indent=0) const |
Write a string representation of this instance to <out>. More... | |
![]() | |
TypedReferenceCount (const TypedReferenceCount ©) | |
void | operator= (const TypedReferenceCount ©) |
![]() | |
TypedObject (const TypedObject ©) | |
TypedObject * | as_typed_object () |
Returns the object, upcast (if necessary) to a TypedObject pointer. More... | |
const TypedObject * | as_typed_object () const |
Returns the object, upcast (if necessary) to a TypedObject pointer. More... | |
int | get_best_parent_from_Set (const std::set< int > &) const |
int | get_type_index () const |
Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. More... | |
bool | is_exact_type (TypeHandle handle) const |
Returns true if the current object is the indicated type exactly. More... | |
bool | is_of_type (TypeHandle handle) const |
Returns true if the current object is or derives from the indicated type. More... | |
void | operator= (const TypedObject ©) |
![]() | |
int | get_ref_count () const |
Returns the current reference count. More... | |
WeakReferenceList * | get_weak_list () const |
Returns the WeakReferenceList associated with this ReferenceCount object. More... | |
bool | has_weak_list () const |
Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise. More... | |
void | local_object () |
This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack. More... | |
void | ref () const |
Explicitly increments the reference count. More... | |
bool | test_ref_count_integrity () const |
Does some easy checks to make sure that the reference count isn't completely bogus. More... | |
bool | test_ref_count_nonzero () const |
Does some easy checks to make sure that the reference count isn't zero, or completely bogus. More... | |
virtual bool | unref () const |
Explicitly decrements the reference count. More... | |
void | weak_ref (WeakPointerToVoid *ptv) |
Adds the indicated PointerToVoid as a weak reference to this object. More... | |
void | weak_unref (WeakPointerToVoid *ptv) |
Removes the indicated PointerToVoid as a weak reference to this object. More... | |
Additional Inherited Members | |
![]() | |
typedef pvector< PT(PhysicsObject)> | Vector |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
![]() | |
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. More... | |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
![]() | |
static ConfigVariableDouble | _default_terminal_velocity |
Describes a particle that has angular characteristics (velocity, orientation).
Definition at line 25 of file orientedParticle.h.
OrientedParticle::OrientedParticle | ( | int | lifespan = 0 , |
bool | alive = false |
||
) |
simple constructor
Definition at line 23 of file orientedParticle.cxx.
References PhysicsObject::set_oriented().
Referenced by make_copy().
OrientedParticle::OrientedParticle | ( | const OrientedParticle & | copy | ) |
copy constructor
Definition at line 34 of file orientedParticle.cxx.
References ~OrientedParticle().
|
virtual |
simple destructor
Definition at line 44 of file orientedParticle.cxx.
References make_copy().
Referenced by OrientedParticle().
|
virtual |
particle death routine
Implements BaseParticle.
Definition at line 72 of file orientedParticle.cxx.
References update().
Referenced by init().
|
virtual |
particle init routine
Implements BaseParticle.
Definition at line 63 of file orientedParticle.cxx.
References die().
Referenced by make_copy().
|
virtual |
simple destructor
Implements BaseParticle.
Definition at line 53 of file orientedParticle.cxx.
References init(), and OrientedParticle().
Referenced by ~OrientedParticle().
|
virtual |
Write a string representation of this instance to <out>.
Reimplemented from BaseParticle.
Definition at line 93 of file orientedParticle.cxx.
References write().
Referenced by update().
|
virtual |
particle update routine.
This NEEDS to be filled in with quaternion slerp stuff, or oriented particles will not rotate.
Implements BaseParticle.
Definition at line 83 of file orientedParticle.cxx.
References output().
Referenced by die().
|
virtual |
Write a string representation of this instance to <out>.
Reimplemented from BaseParticle.
Definition at line 106 of file orientedParticle.cxx.
References BaseParticle::write().
Referenced by output().