Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

PointParticle Class Reference

Describes a particle that requires representation by a point (pixel, sparkle, billboard). More...

#include <pointParticle.h>

Inheritance diagram for PointParticle:

BaseParticle PhysicsObject TypedReferenceCount TypedObject ReferenceCount List of all members.

Public Member Functions

 PointParticle (int lifespan=0, bool alive=false)
 simple constructor

 PointParticle (const PointParticle &copy)
 copy constructor

virtual ~PointParticle (void)
 simple destructor

virtual void init (void)
 particle init routine

virtual void die (void)
 particle death routine

virtual void update (void)
 particle update

virtual PhysicsObjectmake_copy (void) const
 dynamic copier

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 float get_theta (void) const
 for spriteParticleRenderer

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

Detailed Description

Describes a particle that requires representation by a point (pixel, sparkle, billboard).

Definition at line 36 of file pointParticle.h.


Constructor & Destructor Documentation

PointParticle::PointParticle int  lifespan = 0,
bool  alive = false
 

simple constructor

Definition at line 33 of file pointParticle.cxx.

References PhysicsObject::set_oriented().

PointParticle::PointParticle const PointParticle &  copy  ) 
 

copy constructor

Definition at line 47 of file pointParticle.cxx.

PointParticle::~PointParticle void   )  [virtual]
 

simple destructor

Definition at line 61 of file pointParticle.cxx.


Member Function Documentation

void PointParticle::die void   )  [virtual]
 

particle death routine

Implements BaseParticle.

Definition at line 86 of file pointParticle.cxx.

virtual TypeHandle PhysicsObject::force_init_type void   )  [inline, virtual, inherited]
 

Reimplemented from TypedReferenceCount.

Definition at line 112 of file physicsObject.h.

bool PhysicsObject::get_active void   )  const [inline, inherited]
 

Process Flag Query.

Definition at line 205 of file physicsObject.I.

References PhysicsObject::_rotation, and INLINE.

float BaseParticle::get_age void   )  const [inline, inherited]
 

Definition at line 34 of file baseParticle.I.

References BaseParticle::_lifespan, and INLINE.

Referenced by ZSpinParticle::make_copy().

bool BaseParticle::get_alive void   )  const [inline, inherited]
 

Definition at line 42 of file baseParticle.I.

References BaseParticle::_age, BaseParticle::_lifespan, and INLINE.

TypeHandle PhysicsObject::get_class_type void   )  [inline, static, inherited]
 

Reimplemented from TypedReferenceCount.

Definition at line 101 of file physicsObject.h.

References TypedReferenceCount::get_class_type().

LMatrix4f PhysicsObject::get_inertial_tensor void   )  const [virtual, inherited]
 

returns a transform matrix that represents the object's willingness to be forced.

Definition at line 139 of file physicsObject.cxx.

LPoint3f PhysicsObject::get_last_position void   )  const [inline, inherited]
 

Last position Query.

Definition at line 179 of file physicsObject.I.

References PhysicsObject::_orientation.

LMatrix4f PhysicsObject::get_lcs void   )  const [virtual, inherited]
 

returns a transform matrix to this object's local coordinate system.

Definition at line 119 of file physicsObject.cxx.

float BaseParticle::get_lifespan void   )  const [inline, inherited]
 

Definition at line 38 of file baseParticle.I.

References BaseParticle::_alive, and INLINE.

float PhysicsObject::get_mass void   )  const [inline, inherited]
 

Mass Query.

Definition at line 153 of file physicsObject.I.

References PhysicsObject::_process_me, and INLINE.

LOrientationf PhysicsObject::get_orientation void   )  const [inline, inherited]
 

Definition at line 254 of file physicsObject.I.

bool PhysicsObject::get_oriented void   )  const [inline, inherited]
 

Definition at line 290 of file physicsObject.I.

Referenced by ActorNode::update_transform().

float BaseParticle::get_parameterized_age void   )  const [inline, inherited]
 

Definition at line 46 of file baseParticle.I.

Referenced by PointParticleRenderer::birth_particle(), SparkleParticleRenderer::get_birth_radius(), and BaseParticleRenderer::set_user_alpha().

float BaseParticle::get_parameterized_vel void   )  const [inline, inherited]
 

Definition at line 51 of file baseParticle.I.

LPoint3f PhysicsObject::get_position void   )  const [inline, inherited]
 

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().

int ReferenceCount::get_ref_count  )  const [inline, inherited]
 

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().

LVector3f PhysicsObject::get_rotation void   )  const [inline, inherited]
 

Definition at line 266 of file physicsObject.I.

float PhysicsObject::get_terminal_velocity void   )  const [inline, inherited]
 

tv query

Definition at line 218 of file physicsObject.I.

References PhysicsObject::_oriented.

float BaseParticle::get_theta void   )  const [virtual, inherited]
 

for spriteParticleRenderer

Reimplemented in ZSpinParticle.

Definition at line 73 of file baseParticle.cxx.

virtual TypeHandle PhysicsObject::get_type void   )  const [inline, virtual, inherited]
 

Reimplemented from TypedReferenceCount.

Definition at line 109 of file physicsObject.h.

int TypedObject::get_type_index  )  const [inline, inherited]
 

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.

LVector3f PhysicsObject::get_velocity void   )  const [inline, inherited]
 

Velocity Query.

Definition at line 192 of file physicsObject.I.

References PhysicsObject::_orientation, and INLINE.

Referenced by LinearFrictionForce::~LinearFrictionForce().

void PointParticle::init void   )  [virtual]
 

particle init routine

Implements BaseParticle.

Definition at line 98 of file pointParticle.cxx.

void PhysicsObject::init_type void   )  [inline, static, inherited]
 

Reimplemented from TypedReferenceCount.

Definition at line 104 of file physicsObject.h.

References TypedReferenceCount::get_class_type(), and TypedReferenceCount::init_type().

bool TypedObject::is_exact_type TypeHandle  handle  )  const [inline, inherited]
 

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().

bool TypedObject::is_of_type TypeHandle  handle  )  const [inline, inherited]
 

Returns true if the current object is or derives from the indicated type.

Definition at line 86 of file typedObject.I.

Referenced by EggMaterialCollection::collapse_equivalent_materials(), EggTextureCollection::collapse_equivalent_textures(), DeferredNodeProperty::compose(), AnimBundleMaker::create_s_channel(), CharacterMaker::create_slider(), ProjectionScreen::cull_callback(), DataNode::define_output(), EggNode::determine_draw_order(), CharacterMaker::egg_to_index(), EggGroupUniquifier::EggGroupUniquifier(), EggPoolUniquifier::EggPoolUniquifier(), EggGroupNode::find_textures(), StaticTextFont::get_glyph(), EggMaterialCollection::insert_materials(), EggTextureCollection::insert_textures(), CharacterJoint::make_copy(), PT(), EggGroupNode::r_flatten_transforms(), EggGroupNode::r_transform_vertices(), EggGroupNode::recompute_polygon_normals(), CollisionLevelState::reserve(), PandaFramework::reset_frame_rate(), PandaFramework::set_texture(), EggGroupNode::steal_children(), and DataGraphTraverser::traverse().

PhysicsObject * PointParticle::make_copy void   )  const [virtual]
 

dynamic copier

Implements BaseParticle.

Definition at line 73 of file pointParticle.cxx.

int ReferenceCount::ref  )  const [inline, inherited]
 

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().

void PhysicsObject::set_active bool  flag  )  [inline, inherited]
 

Process Flag assignment.

Definition at line 127 of file physicsObject.I.

References PhysicsObject::_position, and INLINE.

void BaseParticle::set_age float  age  )  [inline, inherited]
 

Definition at line 22 of file baseParticle.I.

References BaseParticle::_lifespan, and INLINE.

void BaseParticle::set_alive bool  alive  )  [inline, inherited]
 

Definition at line 30 of file baseParticle.I.

References BaseParticle::_age, and INLINE.

void PhysicsObject::set_last_position const LPoint3f &  pos  )  [inline, inherited]
 

Last position assignment.

Definition at line 88 of file physicsObject.I.

References PhysicsObject::_velocity, x, and y.

void BaseParticle::set_lifespan float  lifespan  )  [inline, inherited]
 

Definition at line 26 of file baseParticle.I.

References BaseParticle::_alive, and INLINE.

void PhysicsObject::set_mass float  m  )  [inline, inherited]
 

Specify the mass of the object.

Definition at line 31 of file physicsObject.I.

References PhysicsObject::_position, and INLINE.

void PhysicsObject::set_orientation const LOrientationf &  orientation  )  [inline, inherited]
 

Definition at line 230 of file physicsObject.I.

Referenced by ActorNode::update_transform().

void PhysicsObject::set_oriented bool  flag  )  [inline, inherited]
 

Definition at line 278 of file physicsObject.I.

Referenced by PointParticle().

void PhysicsObject::set_position float  x,
float  y,
float  z
[inline, inherited]
 

Piecewise position assignment.

Definition at line 57 of file physicsObject.I.

References PhysicsObject::_last_position, and PhysicsObject::_position.

void PhysicsObject::set_position const LPoint3f &  pos  )  [inline, inherited]
 

Vector position assignment.

Definition at line 44 of file physicsObject.I.

References PhysicsObject::_position, INLINE, x, and y.

Referenced by ActorNode::update_transform().

void PhysicsObject::set_position_HandOfGod const LPoint3f &  pos  )  [inline, inherited]
 

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.

void PhysicsObject::set_rotation const LVector3f &  rotation  )  [inline, inherited]
 

Definition at line 242 of file physicsObject.I.

void PhysicsObject::set_terminal_velocity float  tv  )  [inline, inherited]
 

tv assignment

Definition at line 140 of file physicsObject.I.

void PhysicsObject::set_velocity float  x,
float  y,
float  z
[inline, inherited]
 

Piecewise velocity assignment.

Definition at line 114 of file physicsObject.I.

References PhysicsObject::_mass, and INLINE.

void PhysicsObject::set_velocity const LVector3f &  vel  )  [inline, inherited]
 

Vector velocity assignment.

Definition at line 101 of file physicsObject.I.

References PhysicsObject::_terminal_velocity, and INLINE.

void ReferenceCount::test_ref_count_integrity  )  const [inline, inherited]
 

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().

int ReferenceCount::unref  )  const [inline, inherited]
 

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().

void PointParticle::update void   )  [virtual]
 

particle update

Implements BaseParticle.

Definition at line 110 of file pointParticle.cxx.


Member Data Documentation

const float PhysicsObject::_default_terminal_velocity [static, inherited]
 

Initial value:

  config_physics.GetFloat("default_terminal_velocity", 400.0f)

Definition at line 51 of file config_physics.cxx.


The documentation for this class was generated from the following files:
Generated on Fri May 2 00:54:16 2003 for Panda by doxygen1.3