WhirlyGlobe  1.2
A 3D interactive globe toolkit for iOS
ParticleSystemLayer Class Reference

#import <ParticleSystemLayer.h>

Inheritance diagram for ParticleSystemLayer:
<WhirlyGlobeLayer>

List of all members.

Public Member Functions

(void) - startWithThread:scene:
 Called in the layer thread.
(WhirlyGlobe::SimpleIdentity) - addParticleSystem:desc:
 Add a single particle system to the layer.
(WhirlyGlobe::SimpleIdentity) - addParticleSystems:desc:
 Add a group of particle systems.
(void) - removeParticleSystems:
 Remove one or more particle systems.

Protected Attributes

WhirlyGlobeLayerThreadlayerThread
 The layer thread we live in.
WhirlyGlobe::GlobeScenescene
 Scene we're making changes to.
WhirlyGlobe::SimpleIdentity generatorId
 ID of the Particle Generator we're using to implement particles.
WhirlyGlobe::ParticleSysSceneRepSet sceneReps
 Used to track resources related to particle systems for deletion and modification.

Detailed Description

Particle System Layer. This layer creates and controls particle systems defined by locations and a collection attributes in a dictionary.

A particle system is tied to a specific location where it will spew out a large number of individual particles. The speed, color, and lifetime of those particles is controllable.

Location and normal information for a particle system is controlled by the ParticleSystem object. The rest of the parameters are controlled by the description dictonary.

  • minLength [NSNumber float]
  • maxLength [NSNumber float]
  • minNumPerSec [NSNumber float]
  • maxNumPerSec [NSNumber float]
  • minLifetime [NSNumber float]
  • maxLifetime [NSNumber float]
  • minPhi [NSNumber float]
  • maxPhi [NSNumber float]
  • minVis [NSNumber float]
  • maxVis [NSNumber float]
  • color [UIColor]
  • colors [NSArray<UIColor>]

When a particular parameter has max and min values, we'll randomly select a value in between those two for every given particle.

  • length is the distance a particular particle can travel.
  • numPerSec is the number of particles to generate per second
  • lifetime is how long a particle will live in seconds
  • phi is the angle between a particle's normal and the particle system's local north
  • color is a single color which will be applied to all particles
  • colors is an optional array of colors from which we'll randomly pick one per particle

The documentation for this class was generated from the following file: