Divooka Reference

Smoke Session

19 nodes

On this page 19

Advance

Function

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

Signature
Advance(Smoke Session: Smoke Session, seconds: Number)
void Advance(SmokeSession Smoke Session, double seconds)

Parameters

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

Body Position

Function

Where a body or a solid is now (m).

Signature
BodyPosition -> Vector3d
    Smoke Session: Smoke Session
    name: Text
Vector3d BodyPosition(SmokeSession Smoke Session, string name)

Parameters

nametypedefaultdescription
Smoke SessionSmoke Session—
nameText—Its name.

Returns

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

Body Rotation

Function

How a body is turned now.

Signature
BodyRotation -> Quaterniond
    Smoke Session: Smoke Session
    name: Text
Quaterniond BodyRotation(
    SmokeSession Smoke Session,
    string name)

Parameters

nametypedefaultdescription
Smoke SessionSmoke Session—
nameText—Its name.

Returns

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

Body Velocity

Function

How fast a body moves now (m/s).

Signature
BodyVelocity -> Vector3d
    Smoke Session: Smoke Session
    name: Text
Vector3d BodyVelocity(SmokeSession Smoke Session, string name)

Parameters

nametypedefaultdescription
Smoke SessionSmoke Session—
nameText—Its name.

Returns

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

Burst Particles

Function

Has embers or sparks give off a number of particles at once, in the next step: a fire spitting when something falls into it.

Signature
BurstParticles
    Smoke Session: Smoke Session
    name: Text
    count: Integer
void BurstParticles(
    SmokeSession Smoke Session,
    string name,
    int count)

Parameters

nametypedefaultdescription
Smoke SessionSmoke Session—
nameText—The embers' or sparks' name.
countInteger—How many particles.
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Smoke Session
Package
Physics Simulation

Capture Bodies

Function

The scene's bodies and solids as they are now, as a moment the 3D view draws.

Signature
CaptureBodies(Smoke Session: Smoke Session) -> Simulation Frame
SimulationFrame CaptureBodies(SmokeSession Smoke Session)

Parameters

nametypedefaultdescription
Smoke SessionSmoke Session—

Returns

resultSimulation Frame
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Smoke Session
Package
Physics Simulation

Density Volume

Function

The smoke as it is now, as a volume: one voxel per cell, in metres and Divooka's axes, cells without smoke left out.

Signature
DensityVolume(Smoke Session: Smoke Session) -> VdbFloatGrid
VdbFloatGrid DensityVolume(SmokeSession Smoke Session)

Parameters

nametypedefaultdescription
Smoke SessionSmoke Session—

Returns

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

Dispose

Function

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

Signature
Dispose(Smoke Session: Smoke Session)
void Dispose(SmokeSession Smoke Session)

Parameters

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

Frame

Function

How many frames Step Frame has stepped.

Signature
Frame(Smoke Session: Smoke Session) -> Integer
int Frame(SmokeSession Smoke Session)

Parameters

nametypedefaultdescription
Smoke SessionSmoke Session—

Returns

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

Scene

Function

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

Signature
Scene(Smoke Session: Smoke Session) -> Smoke Scene Description
SmokeSceneDescription Scene(SmokeSession Smoke Session)

Parameters

nametypedefaultdescription
Smoke SessionSmoke Session—

Returns

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

Time

Function

Simulated time (s).

Signature
Time(Smoke Session: Smoke Session) -> Number
double Time(SmokeSession Smoke Session)

Parameters

nametypedefaultdescription
Smoke SessionSmoke Session—

Returns

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

Move Solid

Function

Moves a solid, or a kinematic body, to a new place (m). It gets there over the next step and pushes the gas in its way as it goes.

Signature
MoveSolid
    Smoke Session: Smoke Session
    name: Text
    position: Vector3d
void MoveSolid(
    SmokeSession Smoke Session,
    string name,
    Vector3d position)

Parameters

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

Move Source

Function

Moves a source of smoke, a fire, embers or sparks to a new place (m); it gives off from there on.

Signature
MoveSource
    Smoke Session: Smoke Session
    name: Text
    position: Vector3d
void MoveSource(
    SmokeSession Smoke Session,
    string name,
    Vector3d position)

Parameters

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

Push Body

Function

Gives a moving body a push at its centre: an impulse (N·s), its mass times the change of velocity.

Signature
PushBody
    Smoke Session: Smoke Session
    name: Text
    impulse: Vector3d
void PushBody(
    SmokeSession Smoke Session,
    string name,
    Vector3d impulse)

Parameters

nametypedefaultdescription
Smoke SessionSmoke Session—
nameText—The body's name.
impulseVector3d—The impulse (N·s).
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Smoke Session
Package
Physics Simulation

Render

Function

A picture of the scene as it is now: the ground, the solids and the gas, lit by the sun.

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

Parameters

nametypedefaultdescription
Smoke SessionSmoke 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
Smoke Session
Package
Physics Simulation

Smoke Amount

Function

All the smoke in the box now: the volume of smoke of density 1 (m³).

Signature
SmokeAmount(Smoke Session: Smoke Session) -> Number
double SmokeAmount(SmokeSession Smoke Session)

Parameters

nametypedefaultdescription
Smoke SessionSmoke Session—

Returns

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

Step Frame

Function

Advances the gas by one frame of a frame rate.

Signature
StepFrame(Smoke Session: Smoke Session, framesPerSecond: Number)
void StepFrame(
    SmokeSession Smoke Session,
    double framesPerSecond = 30)

Parameters

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

Take Events

Function

What the scene's triggers have done since the last call, oldest first: an event for each time one fired, with its time, its place and the body it was about. Empty when nothing fired, or the scene has no triggers.

Signature
TakeEvents(Smoke Session: Smoke Session) -> Simulation Event Array
SimulationEvent[] TakeEvents(SmokeSession Smoke Session)

Parameters

nametypedefaultdescription
Smoke SessionSmoke Session—

Returns

resultSimulation Event Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Smoke Session
Package
Physics Simulation

Start

Function

Starts a session from a smoke scene.

Signature
Start(scene: Smoke Scene Description) -> Smoke Session
SmokeSession Start(SmokeSceneDescription scene)

Parameters

nametypedefaultdescription
sceneSmoke Scene Description—The scene.

Returns

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