Divooka Reference

Shore Session

19 nodes

On this page 19

Advance

Function

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

Signature
Advance(Shore Session: Shore Session, seconds: Number)
void Advance(ShoreSession Shore Session, double seconds)

Parameters

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

Body Position

Function

Where a body is now (m).

Signature
BodyPosition -> Vector3d
    Shore Session: Shore Session
    name: Text
Vector3d BodyPosition(ShoreSession Shore Session, string name)

Parameters

nametypedefaultdescription
Shore SessionShore Session—
nameText—Its name.

Returns

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

Body Rotation

Function

How a body is turned now.

Signature
BodyRotation -> Quaterniond
    Shore Session: Shore Session
    name: Text
Quaterniond BodyRotation(
    ShoreSession Shore Session,
    string name)

Parameters

nametypedefaultdescription
Shore SessionShore Session—
nameText—Its name.

Returns

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

Body Velocity

Function

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

Signature
BodyVelocity -> Vector3d
    Shore Session: Shore Session
    name: Text
Vector3d BodyVelocity(ShoreSession Shore Session, string name)

Parameters

nametypedefaultdescription
Shore SessionShore Session—
nameText—Its name.

Returns

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

Capture Bodies

Function

The bodies as they are now, as a moment the 3D view draws.

Signature
CaptureBodies(Shore Session: Shore Session) -> Simulation Frame
SimulationFrame CaptureBodies(ShoreSession Shore Session)

Parameters

nametypedefaultdescription
Shore SessionShore Session—

Returns

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

Dispose

Function

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

Signature
Dispose(Shore Session: Shore Session)
void Dispose(ShoreSession Shore Session)

Parameters

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

Frame

Function

How many frames Step Frame has stepped.

Signature
Frame(Shore Session: Shore Session) -> Integer
int Frame(ShoreSession Shore Session)

Parameters

nametypedefaultdescription
Shore SessionShore Session—

Returns

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

Scene

Function

The scene the session started from.

Signature
Scene(Shore Session: Shore Session) -> Shore Scene Description
ShoreSceneDescription Scene(ShoreSession Shore Session)

Parameters

nametypedefaultdescription
Shore SessionShore Session—

Returns

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

Time

Function

Simulated time (s).

Signature
Time(Shore Session: Shore Session) -> Number
double Time(ShoreSession Shore Session)

Parameters

nametypedefaultdescription
Shore SessionShore Session—

Returns

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

Push Body

Function

Gives a body a push at its centre: an impulse (N·s), its mass times the change of velocity. A boat shoved off the sand, a gust.

Signature
PushBody
    Shore Session: Shore Session
    name: Text
    impulse: Vector3d
void PushBody(
    ShoreSession Shore Session,
    string name,
    Vector3d impulse)

Parameters

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

Render

Function

A picture of the shore as it is now.

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

Parameters

nametypedefaultdescription
Shore SessionShore 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
Shore Session
Package
Physics Simulation

Set Sea

Function

Changes the sea that comes in to that of another Ocean scene: the wind rising, veering or dying. The waves already on the shore run on; the new ones follow them in.

Signature
SetSea
    Shore Session: Shore Session
    sea: Ocean Scene Description
void SetSea(
    ShoreSession Shore Session,
    OceanSceneDescription sea)

Parameters

nametypedefaultdescription
Shore SessionShore Session—
seaOcean Scene Description—The sea whose wind is taken.
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Shore Session
Package
Physics Simulation

Set Waves

Function

Changes the swell that comes in from the sea: a storm building, or dying away.

Signature
SetWaves
    Shore Session: Shore Session
    amplitude: Number
    period: Number
void SetWaves(
    ShoreSession Shore Session,
    double amplitude,
    double period = 8)

Parameters

nametypedefaultdescription
Shore SessionShore Session—
amplitudeNumber—Its height from its middle to its crest (m).
periodNumber8Its period (s).
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Shore Session
Package
Physics Simulation

Step Frame

Function

Advances the water by one frame of a frame rate.

Signature
StepFrame(Shore Session: Shore Session, framesPerSecond: Number)
void StepFrame(
    ShoreSession Shore Session,
    double framesPerSecond = 30)

Parameters

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

Surface

Function

The water's surface as it is now, as a mesh over the cells that are wet.

Signature
Surface -> Streamed Vertex Mesh Data
    Shore Session: Shore Session
    every: Integer
StreamedVertexMeshData Surface(
    ShoreSession Shore Session,
    int every = 1)

Parameters

nametypedefaultdescription
Shore SessionShore Session—
everyInteger1Use every cell (1), every second one (2) and so on.

Returns

resultStreamed Vertex Mesh Data
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Shore 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 shore has no triggers.

Signature
TakeEvents(Shore Session: Shore Session) -> Simulation Event Array
SimulationEvent[] TakeEvents(ShoreSession Shore Session)

Parameters

nametypedefaultdescription
Shore SessionShore Session—

Returns

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

Water Depth

Function

How deep the water is at a point now (m): 0 where the sand is dry.

Signature
WaterDepth -> Number
    Shore Session: Shore Session
    position: Vector3d
double WaterDepth(ShoreSession Shore Session, Vector3d position)

Parameters

nametypedefaultdescription
Shore SessionShore Session—
positionVector3d—The point; its Z is not used.

Returns

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

Water Volume

Function

How much water is on the area now (m³).

Signature
WaterVolume(Shore Session: Shore Session) -> Number
double WaterVolume(ShoreSession Shore Session)

Parameters

nametypedefaultdescription
Shore SessionShore Session—

Returns

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

Start

Function

Starts a session from a shore scene.

Signature
Start(scene: Shore Scene Description) -> Shore Session
ShoreSession Start(ShoreSceneDescription scene)

Parameters

nametypedefaultdescription
sceneShore Scene Description—The shore.

Returns

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