Divooka Reference

Particle Session

14 nodes

On this page 14

Advance

Function

Advances the particles by a span of simulated time (s), in steps of at most a sixtieth of a second.

Signature
Advance(Particle Session: Particle Session, seconds: Number)
void Advance(ParticleSession Particle Session, double seconds)

Parameters

nametypedefaultdescription
Particle SessionParticle Session—
secondsNumber—
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Particle Session
Package
Physics Simulation

Burst

Function

Has an emitter give off a number of particles at once, in the next step.

Signature
Burst
    Particle Session: Particle Session
    name: Text
    count: Integer
void Burst(
    ParticleSession Particle Session,
    string name,
    int count)

Parameters

nametypedefaultdescription
Particle SessionParticle Session—
nameText—The emitter's name.
countInteger—How many particles.
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Particle Session
Package
Physics Simulation

Count

Function

How many particles are alive now.

Signature
Count(Particle Session: Particle Session) -> Integer
int Count(ParticleSession Particle Session)

Parameters

nametypedefaultdescription
Particle SessionParticle Session—

Returns

resultInteger
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Particle Session
Package
Physics Simulation

Dispose

Function

Ends the session and gives its memory on the graphics card back.

Signature
Dispose(Particle Session: Particle Session)
void Dispose(ParticleSession Particle Session)

Parameters

nametypedefaultdescription
Particle SessionParticle Session—
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Particle Session
Package
Physics Simulation

Frame

Function

How many frames Step Frame has stepped.

Signature
Frame(Particle Session: Particle Session) -> Integer
int Frame(ParticleSession Particle Session)

Parameters

nametypedefaultdescription
Particle SessionParticle Session—

Returns

resultInteger
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Particle Session
Package
Physics Simulation

Scene

Function

The scene the session started from (what was moved since is not in it).

Signature
Scene(Particle Session: Particle Session) -> Particle Scene Description
ParticleSceneDescription Scene(ParticleSession Particle Session)

Parameters

nametypedefaultdescription
Particle SessionParticle Session—

Returns

resultParticle Scene Description
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Particle Session
Package
Physics Simulation

Time

Function

Simulated time (s).

Signature
Time(Particle Session: Particle Session) -> Number
double Time(ParticleSession Particle Session)

Parameters

nametypedefaultdescription
Particle SessionParticle Session—

Returns

resultNumber
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Particle Session
Package
Physics Simulation

Move Emitter

Function

Moves an emitter to a new place (m); its particles are born there from now on.

Signature
MoveEmitter
    Particle Session: Particle Session
    name: Text
    position: Vector3d
void MoveEmitter(
    ParticleSession Particle Session,
    string name,
    Vector3d position)

Parameters

nametypedefaultdescription
Particle SessionParticle Session—
nameText—The emitter's name.
positionVector3d—Its new centre (m).
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Particle Session
Package
Physics Simulation

Move Solid

Function

Moves a solid to a new place (m). It gets there over the next step and sweeps the particles in its way along.

Signature
MoveSolid
    Particle Session: Particle Session
    name: Text
    position: Vector3d
void MoveSolid(
    ParticleSession Particle Session,
    string name,
    Vector3d position)

Parameters

nametypedefaultdescription
Particle SessionParticle Session—
nameText—The solid's name.
positionVector3d—Its new centre (m).
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Particle Session
Package
Physics Simulation

Points

Function

Where the live particles are now (m).

Signature
Points(Particle Session: Particle Session) -> Vector3d Array
Vector3d[] Points(ParticleSession Particle Session)

Parameters

nametypedefaultdescription
Particle SessionParticle Session—

Returns

resultVector3d Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Particle Session
Package
Physics Simulation

Render

Function

A picture of the scene as it is now: the ground, the solids and the particles.

Signature
Render -> Pixel Image
    Particle Session: Particle Session
    eye: Vector3d
    target: Vector3d
    width: Integer
    height: Integer
    fieldOfView: Number
PixelImage Render(
    ParticleSession Particle Session,
    Vector3d eye,
    Vector3d target,
    int width = 640,
    int height = 480,
    double fieldOfView = 40)

Parameters

nametypedefaultdescription
Particle SessionParticle Session—
eyeVector3d—Where the camera stands (m).
targetVector3d—What it looks at (m).
widthInteger640The picture's width in pixels.
heightInteger480The picture's height in pixels.
fieldOfViewNumber40The camera's vertical field of view in degrees.

Returns

resultPixel Image
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Particle Session
Package
Physics Simulation

Set Wind

Function

Changes the wind (m/s).

Signature
SetWind(Particle Session: Particle Session, wind: Vector3d)
void SetWind(ParticleSession Particle Session, Vector3d wind)

Parameters

nametypedefaultdescription
Particle SessionParticle Session—
windVector3d—
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Particle Session
Package
Physics Simulation

Step Frame

Function

Advances the particles by one frame of a frame rate.

Signature
StepFrame
    Particle Session: Particle Session
    framesPerSecond: Number
void StepFrame(
    ParticleSession Particle Session,
    double framesPerSecond = 30)

Parameters

nametypedefaultdescription
Particle SessionParticle Session—
framesPerSecondNumber30
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Particle Session
Package
Physics Simulation

Start

Function

Starts a session from a particle scene.

Signature
Start(scene: Particle Scene Description) -> Particle Session
ParticleSession Start(ParticleSceneDescription scene)

Parameters

nametypedefaultdescription
sceneParticle Scene Description—The scene.

Returns

resultParticle Session
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Particle Session
Package
Physics Simulation