Liquid Session
22 nodes
On this page 22
Add Liquid Box
FunctionPours a box of liquid into the tank now; returns how many particles it became.
AddLiquidBox -> Integer
Liquid Session: Liquid Session
position: Vector3d
size: Vector3d
velocity: Vector3dint AddLiquidBox(
LiquidSession Liquid Session,
Vector3d position,
Vector3d size,
Vector3d velocity)Parameters
| name | type | default | description |
|---|---|---|---|
| Liquid Session | Liquid Session | — | |
| position | Vector3d | — | The box's centre (m). |
| size | Vector3d | — | The box's size (m) along X, Y and Z. |
| velocity | Vector3d | — | The velocity it starts with (m/s). |
Returns
| result | Integer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Liquid Session
- Package
- Physics Simulation
Add Liquid Sphere
FunctionPours a ball of liquid into the tank now; returns how many particles it became. The tank holds about twice the liquid it started with.
AddLiquidSphere -> Integer
Liquid Session: Liquid Session
position: Vector3d
radius: Number
velocity: Vector3dint AddLiquidSphere(
LiquidSession Liquid Session,
Vector3d position,
double radius,
Vector3d velocity)Parameters
| name | type | default | description |
|---|---|---|---|
| Liquid Session | Liquid Session | — | |
| position | Vector3d | — | The ball's centre (m). |
| radius | Number | — | The ball's radius (m). |
| velocity | Vector3d | — | The velocity it starts with (m/s). |
Returns
| result | Integer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Liquid Session
- Package
- Physics Simulation
Advance
FunctionAdvances the liquid by a span of simulated time (s), in steps of at most a sixtieth of a second.
Advance(Liquid Session: Liquid Session, seconds: Number)
void Advance(LiquidSession Liquid Session, double seconds)
Parameters
| name | type | default | description |
|---|---|---|---|
| Liquid Session | Liquid Session | — | |
| seconds | Number | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Liquid Session
- Package
- Physics Simulation
Aim Tap
FunctionGives a tap's liquid another velocity (m/s): its direction, and with a full jet how much it pours.
AimTap
Liquid Session: Liquid Session
name: Text
velocity: Vector3dvoid AimTap(
LiquidSession Liquid Session,
string name,
Vector3d velocity)Parameters
| name | type | default | description |
|---|---|---|---|
| Liquid Session | Liquid Session | — | |
| name | Text | — | The tap's name. |
| velocity | Vector3d | — | The velocity the liquid leaves with (m/s). |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Liquid Session
- Package
- Physics Simulation
Body Position
FunctionWhere a body or a solid is now (m).
BodyPosition -> Vector3d
Liquid Session: Liquid Session
name: TextVector3d BodyPosition(LiquidSession Liquid Session, string name)
Parameters
| name | type | default | description |
|---|---|---|---|
| Liquid Session | Liquid Session | — | |
| name | Text | — | Its name. |
Returns
| result | Vector3d |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Liquid Session
- Package
- Physics Simulation
Body Rotation
FunctionHow a body is turned now.
BodyRotation -> Quaterniond
Liquid Session: Liquid Session
name: TextQuaterniond BodyRotation(
LiquidSession Liquid Session,
string name)Parameters
| name | type | default | description |
|---|---|---|---|
| Liquid Session | Liquid Session | — | |
| name | Text | — | Its name. |
Returns
| result | Quaterniond |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Liquid Session
- Package
- Physics Simulation
Body Velocity
FunctionHow fast a body moves now (m/s).
BodyVelocity -> Vector3d
Liquid Session: Liquid Session
name: TextVector3d BodyVelocity(LiquidSession Liquid Session, string name)
Parameters
| name | type | default | description |
|---|---|---|---|
| Liquid Session | Liquid Session | — | |
| name | Text | — | Its name. |
Returns
| result | Vector3d |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Liquid Session
- Package
- Physics Simulation
Capture Bodies
FunctionThe scene's bodies and solids as they are now, as a moment the 3D view draws.
CaptureBodies(Liquid Session: Liquid Session) -> Simulation Frame
SimulationFrame CaptureBodies(LiquidSession Liquid Session)
Parameters
| name | type | default | description |
|---|---|---|---|
| Liquid Session | Liquid Session | — |
Returns
| result | Simulation Frame |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Liquid Session
- Package
- Physics Simulation
Dispose
FunctionEnds the session and gives its memory on the graphics card back.
Dispose(Liquid Session: Liquid Session)
void Dispose(LiquidSession Liquid Session)
Parameters
| name | type | default | description |
|---|---|---|---|
| Liquid Session | Liquid Session | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Liquid Session
- Package
- Physics Simulation
Frame
FunctionHow many frames Step Frame has stepped.
Frame(Liquid Session: Liquid Session) -> Integer
int Frame(LiquidSession Liquid Session)
Parameters
| name | type | default | description |
|---|---|---|---|
| Liquid Session | Liquid Session | — |
Returns
| result | Integer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Liquid Session
- Package
- Physics Simulation
Particle Count
FunctionHow many particles the liquid is now.
ParticleCount(Liquid Session: Liquid Session) -> Integer
int ParticleCount(LiquidSession Liquid Session)
Parameters
| name | type | default | description |
|---|---|---|---|
| Liquid Session | Liquid Session | — |
Returns
| result | Integer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Liquid Session
- Package
- Physics Simulation
Scene
FunctionThe scene the session started from (what was poured in or moved since is not in it).
Scene(Liquid Session: Liquid Session) -> Liquid Scene Description
LiquidSceneDescription Scene(LiquidSession Liquid Session)
Parameters
| name | type | default | description |
|---|---|---|---|
| Liquid Session | Liquid Session | — |
Returns
| result | Liquid Scene Description |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Liquid Session
- Package
- Physics Simulation
Time
FunctionSimulated time (s).
Time(Liquid Session: Liquid Session) -> Number
double Time(LiquidSession Liquid Session)
Parameters
| name | type | default | description |
|---|---|---|---|
| Liquid Session | Liquid Session | — |
Returns
| result | Number |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Liquid Session
- Package
- Physics Simulation
Move Solid
FunctionMoves a solid, or a kinematic body, to a new place (m). It gets there over the next step and pushes the liquid, and the bodies, in its way as it goes.
MoveSolid
Liquid Session: Liquid Session
name: Text
position: Vector3dvoid MoveSolid(
LiquidSession Liquid Session,
string name,
Vector3d position)Parameters
| name | type | default | description |
|---|---|---|---|
| Liquid Session | Liquid Session | — | |
| name | Text | — | The solid's name. |
| position | Vector3d | — | Its new centre (m). |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Liquid Session
- Package
- Physics Simulation
Move Tap
FunctionMoves a tap's mouth to a new place (m); it pours from there on. A hose swung about.
MoveTap
Liquid Session: Liquid Session
name: Text
position: Vector3dvoid MoveTap(
LiquidSession Liquid Session,
string name,
Vector3d position)Parameters
| name | type | default | description |
|---|---|---|---|
| Liquid Session | Liquid Session | — | |
| name | Text | — | The tap's name. |
| position | Vector3d | — | The new middle of its mouth (m). |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Liquid Session
- Package
- Physics Simulation
Push Body
FunctionGives a moving body a push at its centre: an impulse (N·s), its mass times the change of velocity.
PushBody
Liquid Session: Liquid Session
name: Text
impulse: Vector3dvoid PushBody(
LiquidSession Liquid Session,
string name,
Vector3d impulse)Parameters
| name | type | default | description |
|---|---|---|---|
| Liquid Session | Liquid Session | — | |
| name | Text | — | The body's name. |
| impulse | Vector3d | — | The impulse (N·s). |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Liquid Session
- Package
- Physics Simulation
Render
FunctionA picture of the scene as it is now: the ground, the solids and the liquid with its whitewater, lit by the sun.
Render -> Pixel Image
Liquid Session: Liquid Session
eye: Vector3d
target: Vector3d
width: Integer
height: Integer
fieldOfView: NumberPixelImage Render(
LiquidSession Liquid Session,
Vector3d eye,
Vector3d target,
int width = 640,
int height = 480,
double fieldOfView = 40)Parameters
| name | type | default | description |
|---|---|---|---|
| Liquid Session | Liquid Session | — | |
| eye | Vector3d | — | Where the camera stands (m). |
| target | Vector3d | — | What it looks at (m). |
| width | Integer | 640 | The picture's width in pixels. |
| height | Integer | 480 | The picture's height in pixels. |
| fieldOfView | Number | 40 | The camera's vertical field of view in degrees. |
Returns
| result | Pixel Image |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Liquid Session
- Package
- Physics Simulation
Step Frame
FunctionAdvances the liquid by one frame of a frame rate.
StepFrame
Liquid Session: Liquid Session
framesPerSecond: Numbervoid StepFrame(
LiquidSession Liquid Session,
double framesPerSecond = 30)Parameters
| name | type | default | description |
|---|---|---|---|
| Liquid Session | Liquid Session | — | |
| framesPerSecond | Number | 30 |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Liquid Session
- Package
- Physics Simulation
Surface
FunctionThe liquid's surface as it was at the last step, as a mesh: closed where it meets the tank, its triangles facing outwards.
Surface -> Streamed Vertex Mesh Data
Liquid Session: Liquid Session
smoothing: IntegerStreamedVertexMeshData Surface(
LiquidSession Liquid Session,
int smoothing = 2)Parameters
| name | type | default | description |
|---|---|---|---|
| Liquid Session | Liquid Session | — | |
| smoothing | Integer | 2 | How often the surface is smoothed before it is meshed. |
Returns
| result | Streamed Vertex Mesh Data |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Liquid Session
- Package
- Physics Simulation
Switch Tap
FunctionOpens or closes a tap.
SwitchTap
Liquid Session: Liquid Session
name: Text
open: Truthvoid SwitchTap(
LiquidSession Liquid Session,
string name,
bool open = true)Parameters
| name | type | default | description |
|---|---|---|---|
| Liquid Session | Liquid Session | — | |
| name | Text | — | The tap's name. |
| open | Truth | True | Open: it pours. Closed: it does not. |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Liquid Session
- Package
- Physics Simulation
Take Events
FunctionWhat 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.
TakeEvents(Liquid Session: Liquid Session) -> Simulation Event Array
SimulationEvent[] TakeEvents(LiquidSession Liquid Session)
Parameters
| name | type | default | description |
|---|---|---|---|
| Liquid Session | Liquid Session | — |
Returns
| result | Simulation Event Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Liquid Session
- Package
- Physics Simulation
Start
FunctionStarts a session from a liquid scene.
Start(scene: Liquid Scene Description) -> Liquid Session
LiquidSession Start(LiquidSceneDescription scene)
Parameters
| name | type | default | description |
|---|---|---|---|
| scene | Liquid Scene Description | — | The scene. |
Returns
| result | Liquid Session |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Liquid Session
- Package
- Physics Simulation