Ocean Session
16 nodes
On this page 16
Advance
FunctionAdvances the sea and the bodies on it by a span of simulated time (s).
Advance(Ocean Session: Ocean Session, seconds: Number)
void Advance(OceanSession Ocean Session, double seconds)
Parameters
| name | type | default | description |
|---|---|---|---|
| Ocean Session | Ocean Session | — | |
| seconds | Number | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Ocean Session
- Package
- Physics Simulation
Body Position
FunctionWhere a body is now (m).
BodyPosition -> Vector3d
Ocean Session: Ocean Session
name: TextVector3d BodyPosition(OceanSession Ocean Session, string name)
Parameters
| name | type | default | description |
|---|---|---|---|
| Ocean Session | Ocean Session | — | |
| name | Text | — | Its name. |
Returns
| result | Vector3d |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Ocean Session
- Package
- Physics Simulation
Body Rotation
FunctionHow a body is turned now.
BodyRotation -> Quaterniond
Ocean Session: Ocean Session
name: TextQuaterniond BodyRotation(
OceanSession Ocean Session,
string name)Parameters
| name | type | default | description |
|---|---|---|---|
| Ocean Session | Ocean Session | — | |
| name | Text | — | Its name. |
Returns
| result | Quaterniond |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Ocean Session
- Package
- Physics Simulation
Body Velocity
FunctionHow fast a body moves now (m/s).
BodyVelocity -> Vector3d
Ocean Session: Ocean Session
name: TextVector3d BodyVelocity(OceanSession Ocean Session, string name)
Parameters
| name | type | default | description |
|---|---|---|---|
| Ocean Session | Ocean Session | — | |
| name | Text | — | Its name. |
Returns
| result | Vector3d |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Ocean Session
- Package
- Physics Simulation
Capture Bodies
FunctionThe bodies as they are now, as a moment the 3D view draws.
CaptureBodies(Ocean Session: Ocean Session) -> Simulation Frame
SimulationFrame CaptureBodies(OceanSession Ocean Session)
Parameters
| name | type | default | description |
|---|---|---|---|
| Ocean Session | Ocean Session | — |
Returns
| result | Simulation Frame |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Ocean Session
- Package
- Physics Simulation
Dispose
FunctionEnds the session and gives back what it holds on the graphics card.
Dispose(Ocean Session: Ocean Session)
void Dispose(OceanSession Ocean Session)
Parameters
| name | type | default | description |
|---|---|---|---|
| Ocean Session | Ocean Session | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Ocean Session
- Package
- Physics Simulation
Frame
FunctionHow many frames Step Frame has stepped.
Frame(Ocean Session: Ocean Session) -> Integer
int Frame(OceanSession Ocean Session)
Parameters
| name | type | default | description |
|---|---|---|---|
| Ocean Session | Ocean Session | — |
Returns
| result | Integer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Ocean Session
- Package
- Physics Simulation
Scene
FunctionThe scene the session started from.
Scene(Ocean Session: Ocean Session) -> Ocean Scene Description
OceanSceneDescription Scene(OceanSession Ocean Session)
Parameters
| name | type | default | description |
|---|---|---|---|
| Ocean Session | Ocean Session | — |
Returns
| result | Ocean Scene Description |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Ocean Session
- Package
- Physics Simulation
Time
FunctionSimulated time (s).
Time(Ocean Session: Ocean Session) -> Number
double Time(OceanSession Ocean Session)
Parameters
| name | type | default | description |
|---|---|---|---|
| Ocean Session | Ocean Session | — |
Returns
| result | Number |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Ocean Session
- Package
- Physics Simulation
Height
FunctionThe sea's height (m) over a point now.
Height -> Number
Ocean Session: Ocean Session
position: Vector3ddouble Height(OceanSession Ocean Session, Vector3d position)
Parameters
| name | type | default | description |
|---|---|---|---|
| Ocean Session | Ocean Session | — | |
| position | Vector3d | — | The point; its Z is not used. |
Returns
| result | Number |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Ocean Session
- Package
- Physics Simulation
Push Body
FunctionGives a body a push at its centre: an impulse (N·s), its mass times the change of velocity. A boat's engine, a gust.
PushBody
Ocean Session: Ocean Session
name: Text
impulse: Vector3dvoid PushBody(
OceanSession Ocean Session,
string name,
Vector3d impulse)Parameters
| name | type | default | description |
|---|---|---|---|
| Ocean Session | Ocean 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
- Ocean Session
- Package
- Physics Simulation
Render
FunctionA picture of the sea as it is now, with the bodies on it. Made on the graphics card.
Render -> Pixel Image
Ocean Session: Ocean Session
eye: Vector3d
target: Vector3d
width: Integer
height: Integer
fieldOfView: NumberPixelImage Render(
OceanSession Ocean Session,
Vector3d eye,
Vector3d target,
int width = 640,
int height = 480,
double fieldOfView = 40)Parameters
| name | type | default | description |
|---|---|---|---|
| Ocean Session | Ocean 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
- Ocean Session
- Package
- Physics Simulation
Step Frame
FunctionAdvances the sea and the bodies on it by one frame of a frame rate.
StepFrame(Ocean Session: Ocean Session, framesPerSecond: Number)
void StepFrame(
OceanSession Ocean Session,
double framesPerSecond = 30)Parameters
| name | type | default | description |
|---|---|---|---|
| Ocean Session | Ocean Session | — | |
| framesPerSecond | Number | 30 |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Ocean Session
- Package
- Physics Simulation
Surface
FunctionThe sea's surface over a rectangle now, as a mesh.
Surface -> Streamed Vertex Mesh Data
Ocean Session: Ocean Session
center: Vector3d
Size X: Number
Size Y: Number
cells: IntegerStreamedVertexMeshData Surface(
OceanSession Ocean Session,
Vector3d center,
double sizeX = 100,
double sizeY = 100,
int cells = 128)Parameters
| name | type | default | description |
|---|---|---|---|
| Ocean Session | Ocean Session | — | |
| center | Vector3d | — | The rectangle's middle (m). |
| Size X | Number | 100 | Its extent along X (m). |
| Size Y | Number | 100 | Its extent along Y (m). |
| cells | Integer | 128 | Cells along its longer side. |
Returns
| result | Streamed Vertex Mesh Data |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Ocean 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 sea has no triggers.
TakeEvents(Ocean Session: Ocean Session) -> Simulation Event Array
SimulationEvent[] TakeEvents(OceanSession Ocean Session)
Parameters
| name | type | default | description |
|---|---|---|---|
| Ocean Session | Ocean Session | — |
Returns
| result | Simulation Event Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Ocean Session
- Package
- Physics Simulation
Start
FunctionStarts a session from an ocean scene.
Start(scene: Ocean Scene Description) -> Ocean Session
OceanSession Start(OceanSceneDescription scene)
Parameters
| name | type | default | description |
|---|---|---|---|
| scene | Ocean Scene Description | — | The sea. |
Returns
| result | Ocean Session |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Ocean Session
- Package
- Physics Simulation