#include <baseParticle.h>
Inheritance diagram for BaseParticle:
Public Member Functions | |
void | set_age (float age) |
void | set_lifespan (float lifespan) |
void | set_alive (bool alive) |
float | get_age (void) const |
float | get_lifespan (void) const |
bool | get_alive (void) const |
float | get_parameterized_age (void) const |
float | get_parameterized_vel (void) const |
virtual void | init (void)=0 |
virtual void | die (void)=0 |
virtual void | update (void)=0 |
virtual float | get_theta (void) const |
for spriteParticleRenderer | |
virtual PhysicsObject * | make_copy (void) const=0 |
dynamic copy. | |
void | set_mass (float) |
Specify the mass of the object. | |
float | get_mass (void) const |
Mass Query. | |
void | set_position (const LPoint3f &pos) |
Vector position assignment. | |
void | set_position (float x, float y, float z) |
Piecewise position assignment. | |
LPoint3f | get_position (void) const |
Position Query. | |
void | set_position_HandOfGod (const LPoint3f &pos) |
use this to place an object in a completely new position, that has nothing to do with its last position (moved by the Hand Of God, or "HOG") | |
void | set_last_position (const LPoint3f &pos) |
Last position assignment. | |
LPoint3f | get_last_position (void) const |
Last position Query. | |
void | set_velocity (const LVector3f &vel) |
Vector velocity assignment. | |
void | set_velocity (float x, float y, float z) |
Piecewise velocity assignment. | |
LVector3f | get_velocity (void) const |
Velocity Query. | |
void | set_active (bool flag) |
Process Flag assignment. | |
bool | get_active (void) const |
Process Flag Query. | |
void | set_oriented (bool flag) |
bool | get_oriented (void) const |
void | set_terminal_velocity (float tv) |
tv assignment | |
float | get_terminal_velocity (void) const |
tv query | |
void | set_orientation (const LOrientationf &orientation) |
LOrientationf | get_orientation (void) const |
void | set_rotation (const LVector3f &rotation) |
LVector3f | get_rotation (void) const |
virtual LMatrix4f | get_inertial_tensor (void) const |
returns a transform matrix that represents the object's willingness to be forced. | |
virtual LMatrix4f | get_lcs (void) const |
returns a transform matrix to this object's local coordinate system. | |
virtual TypeHandle | get_type () const |
virtual TypeHandle | force_init_type () |
int | get_type_index () const |
Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. | |
bool | is_of_type (TypeHandle handle) const |
Returns true if the current object is or derives from the indicated type. | |
bool | is_exact_type (TypeHandle handle) const |
Returns true if the current object is the indicated type exactly. | |
int | get_ref_count () const |
Returns the current reference count. | |
int | ref () const |
Explicitly increments the reference count. | |
int | unref () const |
Explicitly decrements the reference count. | |
void | test_ref_count_integrity () const |
Does some easy checks to make sure that the reference count isn't completely bogus. | |
Static Public Member Functions | |
TypeHandle | get_class_type () |
void | init_type () |
Static Public Attributes | |
const float | _default_terminal_velocity |
Protected Member Functions | |
BaseParticle (int lifespan=1, bool alive=false) | |
Default Constructor. | |
BaseParticle (const BaseParticle ©) | |
Copy Constructor. | |
virtual | ~BaseParticle (void) |
Default Destructor. | |
Private Attributes | |
float | _age |
float | _lifespan |
bool | _alive |
LPoint3f | _last_position |
Definition at line 37 of file baseParticle.h.
|
Default Constructor.
Definition at line 33 of file baseParticle.cxx. |
|
Copy Constructor.
Definition at line 46 of file baseParticle.cxx. |
|
Default Destructor.
Definition at line 61 of file baseParticle.cxx. |
|
Implemented in OrientedParticle, PointParticle, and ZSpinParticle. |
|
Reimplemented from TypedReferenceCount. Definition at line 112 of file physicsObject.h. |
|
Process Flag Query.
Definition at line 205 of file physicsObject.I. References PhysicsObject::_rotation, and INLINE. |
|
Definition at line 34 of file baseParticle.I. References _lifespan, and INLINE. Referenced by ZSpinParticle::make_copy(). |
|
Definition at line 42 of file baseParticle.I. |
|
Reimplemented from TypedReferenceCount. Definition at line 101 of file physicsObject.h. References TypedReferenceCount::get_class_type(). |
|
returns a transform matrix that represents the object's willingness to be forced.
Definition at line 139 of file physicsObject.cxx. |
|
Last position Query.
Definition at line 179 of file physicsObject.I. References PhysicsObject::_orientation. |
|
returns a transform matrix to this object's local coordinate system.
Definition at line 119 of file physicsObject.cxx. |
|
Definition at line 38 of file baseParticle.I. |
|
Mass Query.
Definition at line 153 of file physicsObject.I. References PhysicsObject::_process_me, and INLINE. |
|
Definition at line 254 of file physicsObject.I. |
|
Definition at line 290 of file physicsObject.I. Referenced by ActorNode::update_transform(). |
|
Definition at line 46 of file baseParticle.I. Referenced by PointParticleRenderer::birth_particle(), SparkleParticleRenderer::get_birth_radius(), and BaseParticleRenderer::set_user_alpha(). |
|
Definition at line 51 of file baseParticle.I. |
|
Position Query.
Definition at line 166 of file physicsObject.I. References PhysicsObject::_terminal_velocity, and INLINE. Referenced by GeomParticleRenderer::kill_particle(), LinearNoiseForce::~LinearNoiseForce(), LinearSinkForce::~LinearSinkForce(), and LinearSourceForce::~LinearSourceForce(). |
|
Returns the current reference count.
Definition at line 183 of file referenceCount.I. Referenced by RenderState::determine_bin_index(), RenderEffects::determine_show_bounds(), FontPool::ns_garbage_collect(), TexturePool::ns_garbage_collect(), MaterialPool::ns_get_material(), and TexturePool::ns_release_texture(). |
|
Definition at line 266 of file physicsObject.I. |
|
tv query
Definition at line 218 of file physicsObject.I. References PhysicsObject::_oriented. |
|
for spriteParticleRenderer
Reimplemented in ZSpinParticle. Definition at line 73 of file baseParticle.cxx. |
|
Reimplemented from TypedReferenceCount. Definition at line 109 of file physicsObject.h. |
|
Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. This is equivalent to get_type().get_index(). Definition at line 71 of file typedObject.I. References TypeHandle::get_name(), TypedObject::get_type(), and INLINE. |
|
Velocity Query.
Definition at line 192 of file physicsObject.I. References PhysicsObject::_orientation, and INLINE. Referenced by LinearFrictionForce::~LinearFrictionForce(). |
|
Implemented in OrientedParticle, PointParticle, and ZSpinParticle. |
|
Reimplemented from TypedReferenceCount. Definition at line 104 of file physicsObject.h. References TypedReferenceCount::get_class_type(), and TypedReferenceCount::init_type(). |
|
Returns true if the current object is the indicated type exactly.
Definition at line 101 of file typedObject.I. Referenced by PT(), and CollisionNode::xform(). |
|
|
dynamic copy.
Reimplemented from PhysicsObject. Implemented in OrientedParticle, PointParticle, and ZSpinParticle. |
|
Explicitly increments the reference count. User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically. This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it. The return value is the new reference count. Definition at line 225 of file referenceCount.I. Referenced by ClientDevice::ClientDevice(), EggGroupNode::find_textures(), EggGroupNode::r_apply_texmats(), EggGroupNode::r_flatten_transforms(), and EggGroupNode::reverse_vertex_ordering(). |
|
Process Flag assignment.
Definition at line 127 of file physicsObject.I. References PhysicsObject::_position, and INLINE. |
|
Definition at line 22 of file baseParticle.I. |
|
Definition at line 30 of file baseParticle.I. |
|
Last position assignment.
Definition at line 88 of file physicsObject.I. References PhysicsObject::_velocity, x, and y. |
|
Definition at line 26 of file baseParticle.I. |
|
Specify the mass of the object.
Definition at line 31 of file physicsObject.I. References PhysicsObject::_position, and INLINE. |
|
Definition at line 230 of file physicsObject.I. Referenced by ActorNode::update_transform(). |
|
Definition at line 278 of file physicsObject.I. Referenced by PointParticle::PointParticle(). |
|
Piecewise position assignment.
Definition at line 57 of file physicsObject.I. References PhysicsObject::_last_position, and PhysicsObject::_position. |
|
Vector position assignment.
Definition at line 44 of file physicsObject.I. References PhysicsObject::_position, INLINE, x, and y. Referenced by ActorNode::update_transform(). |
|
use this to place an object in a completely new position, that has nothing to do with its last position (moved by the Hand Of God, or "HOG")
Definition at line 74 of file physicsObject.I. References PhysicsObject::_velocity, and INLINE. |
|
Definition at line 242 of file physicsObject.I. |
|
tv assignment
Definition at line 140 of file physicsObject.I. |
|
Piecewise velocity assignment.
Definition at line 114 of file physicsObject.I. References PhysicsObject::_mass, and INLINE. |
|
Vector velocity assignment.
Definition at line 101 of file physicsObject.I. References PhysicsObject::_terminal_velocity, and INLINE. |
|
Does some easy checks to make sure that the reference count isn't completely bogus.
Definition at line 328 of file referenceCount.I. References INLINE. Referenced by EggNode::determine_bin(), and ReferenceCount::~ReferenceCount(). |
|
Explicitly decrements the reference count. Note that the object will not be implicitly deleted by unref() simply because the reference count drops to zero. (Having a member function delete itself is problematic; plus, we don't have a virtual destructor anyway.) However, see the helper function unref_delete(). User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically. This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it. The return value is the new reference count. Definition at line 293 of file referenceCount.I. References INLINE. Referenced by RenderState::determine_bin_index(), and RenderEffects::determine_show_bounds(). |
|
Implemented in OrientedParticle, PointParticle, and ZSpinParticle. |
|
Definition at line 40 of file baseParticle.h. Referenced by BaseParticle(), get_alive(), and set_alive(). |
|
Definition at line 42 of file baseParticle.h. Referenced by BaseParticle(), get_lifespan(), and set_lifespan(). |
|
Initial value:
config_physics.GetFloat("default_terminal_velocity", 400.0f)
Definition at line 51 of file config_physics.cxx. |
|
Reimplemented from PhysicsObject. Definition at line 44 of file baseParticle.h. |
|
Definition at line 41 of file baseParticle.h. Referenced by BaseParticle(), get_age(), get_alive(), and set_age(). |