Skip to content

class_particles

reduz edited this page Feb 23, 2014 · 10 revisions

Particles

Inherits: GeometryInstance\n\n

Brief Description

Particle system 3D Node

Member Functions

Numeric Constants

  • VAR_LIFETIME = 0
  • VAR_SPREAD = 1
  • VAR_GRAVITY = 2
  • VAR_LINEAR_VELOCITY = 3
  • VAR_ANGULAR_VELOCITY = 4
  • VAR_LINEAR_ACCELERATION = 5
  • VAR_DRAG = 6
  • VAR_TANGENTIAL_ACCELERATION = 7
  • VAR_INITIAL_SIZE = 9
  • VAR_FINAL_SIZE = 10
  • VAR_INITIAL_ANGLE = 11
  • VAR_HEIGHT = 12
  • VAR_HEIGHT_SPEED_SCALE = 13
  • VAR_MAX = 14

Description

Particles is a particle system 3D node that is used to simulate several types of particle effects, such as explosions, rain, snow, fireflies, or other magical-like shinny sparkles. Particles are drawn using impostors, and given their dynamic behavior, the user must provide a visibility AABB (although helpers to create one automatically exist).

Member Function Description

  • void set_amount ( int amount ) \ Set total amount of particles in the system.
  • int get_amount ( ) const \ Return the total amount of particles in the system.
  • void set_emitting ( bool enabled ) \ Set the "emitting" property state. When emitting, the particle system generates new particles at constant rate.
  • void set_visibility_aabb ( AABB aabb ) \ Set the visibility AABB for the particle system, since the default one will not work properly most of the time.
  • void set_gravity_normal ( Vector3 normal ) \ Set the normal vector towards where gravity is pulling (by default, negative Y).
  • void set_variable ( int variable, real value ) \ Set a specific variable for the particle system (see VAR_* enum).
  • real get_variable ( int variable ) const \ Return a specific variable for the particle system (see VAR_* enum).
  • void set_randomness ( int variable, real randomness ) \ Set the randomness for a specific variable of the particle system. Randomness produces small changes from the default each time a particle is emitted.
  • real get_randomness ( int arg0 ) const \ Return the randomness for a specific variable of the particle system. Randomness produces small changes from the default each time a particle is emitted.

Clone this wiki locally