Simulation Session
29 nodes
On this page 29
Add Body
FunctionAdds a body to the running scene.
AddBody
Simulation Session: Simulation Session
body: Body Descriptionvoid AddBody(
SimulationSession Simulation Session,
BodyDescription body)Parameters
| name | type | default | description |
|---|---|---|---|
| Simulation Session | Simulation Session | — | |
| body | Body Description | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Simulation Session
- Package
- Physics Simulation
Advance
FunctionAdvances the simulation by a span of simulated time (s), in coupling steps.
Advance(Simulation Session: Simulation Session, seconds: Number)
void Advance(
SimulationSession Simulation Session,
double seconds)Parameters
| name | type | default | description |
|---|---|---|---|
| Simulation Session | Simulation Session | — | |
| seconds | Number | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Simulation Session
- Package
- Physics Simulation
Bodies Mesh
FunctionEvery body's surface now as one mesh, grounds left out.
BodiesMesh(Simulation Session: Simulation Session) -> Streamed Vertex Mesh Data
StreamedVertexMeshData BodiesMesh(SimulationSession Simulation Session)
Parameters
| name | type | default | description |
|---|---|---|---|
| Simulation Session | Simulation Session | — |
Returns
| result | Streamed Vertex Mesh Data |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Simulation Session
- Package
- Physics Simulation
Body Names
FunctionThe names of the bodies now, in the order they were made.
BodyNames(Simulation Session: Simulation Session) -> Text Array
string[] BodyNames(SimulationSession Simulation Session)
Parameters
| name | type | default | description |
|---|---|---|---|
| Simulation Session | Simulation Session | — |
Returns
| result | Text Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Simulation Session
- Package
- Physics Simulation
Body Position
FunctionWhere a body is now (m).
BodyPosition -> Vector3d
Simulation Session: Simulation Session
body: TextVector3d BodyPosition(
SimulationSession Simulation Session,
string body)Parameters
| name | type | default | description |
|---|---|---|---|
| Simulation Session | Simulation Session | — | |
| body | Text | — |
Returns
| result | Vector3d |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Simulation Session
- Package
- Physics Simulation
Body Rotation
FunctionA body's orientation now.
BodyRotation -> Quaterniond
Simulation Session: Simulation Session
body: TextQuaterniond BodyRotation(
SimulationSession Simulation Session,
string body)Parameters
| name | type | default | description |
|---|---|---|---|
| Simulation Session | Simulation Session | — | |
| body | Text | — |
Returns
| result | Quaterniond |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Simulation Session
- Package
- Physics Simulation
Body Velocity
FunctionA body's velocity now (m/s).
BodyVelocity -> Vector3d
Simulation Session: Simulation Session
body: TextVector3d BodyVelocity(
SimulationSession Simulation Session,
string body)Parameters
| name | type | default | description |
|---|---|---|---|
| Simulation Session | Simulation Session | — | |
| body | Text | — |
Returns
| result | Vector3d |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Simulation Session
- Package
- Physics Simulation
Capture
FunctionThe state now as an immutable frame, for the functional nodes or to keep.
Capture -> Simulation Frame
Simulation Session: Simulation Session
recordWater: TruthSimulationFrame Capture(
SimulationSession Simulation Session,
bool recordWater = true)Parameters
| name | type | default | description |
|---|---|---|---|
| Simulation Session | Simulation Session | — | |
| recordWater | Truth | True |
Returns
| result | Simulation Frame |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Simulation Session
- Package
- Physics Simulation
Cloth Mesh
FunctionA cloth's surface now, for rendering.
ClothMesh -> Streamed Vertex Mesh Data
Simulation Session: Simulation Session
cloth: TextStreamedVertexMeshData ClothMesh(
SimulationSession Simulation Session,
string cloth)Parameters
| name | type | default | description |
|---|---|---|---|
| Simulation Session | Simulation Session | — | |
| cloth | Text | — |
Returns
| result | Streamed Vertex Mesh Data |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Simulation Session
- Package
- Physics Simulation
Detonate
FunctionSets off a charge of TNT at a position (m) now.
Detonate
Simulation Session: Simulation Session
position: Vector3d
TNT (kg): Numbervoid Detonate(
SimulationSession Simulation Session,
Vector3d position,
double tntKg)Parameters
| name | type | default | description |
|---|---|---|---|
| Simulation Session | Simulation Session | — | |
| position | Vector3d | — | Where (m). |
| TNT (kg) | Number | — | Charge (kg TNT equivalent). |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Simulation Session
- Package
- Physics Simulation
Dispose
FunctionEnds the session and frees the engine's state.
Dispose(Simulation Session: Simulation Session)
void Dispose(SimulationSession Simulation Session)
Parameters
| name | type | default | description |
|---|---|---|---|
| Simulation Session | Simulation Session | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Simulation Session
- Package
- Physics Simulation
Garment Mesh
FunctionA whole garment's surface now as one mesh: every piece ContinuumScene.AddGarment made for it.
GarmentMesh -> Streamed Vertex Mesh Data
Simulation Session: Simulation Session
garment: TextStreamedVertexMeshData GarmentMesh(
SimulationSession Simulation Session,
string garment)Parameters
| name | type | default | description |
|---|---|---|---|
| Simulation Session | Simulation Session | — | |
| garment | Text | — | The garment's name. |
Returns
| result | Streamed Vertex Mesh Data |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Simulation Session
- Package
- Physics Simulation
Frame
FunctionHow many frames Step Frame has stepped.
Frame(Simulation Session: Simulation Session) -> Integer
int Frame(SimulationSession Simulation Session)
Parameters
| name | type | default | description |
|---|---|---|---|
| Simulation Session | Simulation Session | — |
Returns
| result | Integer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Simulation Session
- Package
- Physics Simulation
Scene
FunctionThe description the session started from (changes made while running are not in it).
Scene(Simulation Session: Simulation Session) -> Scene Description
SceneDescription Scene(SimulationSession Simulation Session)
Parameters
| name | type | default | description |
|---|---|---|---|
| Simulation Session | Simulation Session | — |
Returns
| result | Scene Description |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Simulation Session
- Package
- Physics Simulation
Time
FunctionSimulated time (s).
Time(Simulation Session: Simulation Session) -> Number
double Time(SimulationSession Simulation Session)
Parameters
| name | type | default | description |
|---|---|---|---|
| Simulation Session | Simulation Session | — |
Returns
| result | Number |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Simulation Session
- Package
- Physics Simulation
Move Kinematic
FunctionMoves a kinematic body to a position (m) over the next coupling step, so everything it touches is pushed with its velocity.
MoveKinematic
Simulation Session: Simulation Session
body: Text
position: Vector3dvoid MoveKinematic(
SimulationSession Simulation Session,
string body,
Vector3d position)Parameters
| name | type | default | description |
|---|---|---|---|
| Simulation Session | Simulation Session | — | |
| body | Text | — | |
| position | Vector3d | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Simulation Session
- Package
- Physics Simulation
Move Kinematic Pose
FunctionMoves a kinematic body to a position (m) and orientation over the next coupling step: a hammer swung by the graph, a door, a paddle. Everything it touches is pushed with its linear and angular velocity.
MoveKinematicPose
Simulation Session: Simulation Session
body: Text
position: Vector3d
rotation: Quaterniondvoid MoveKinematicPose(
SimulationSession Simulation Session,
string body,
Vector3d position,
Quaterniond rotation)Parameters
| name | type | default | description |
|---|---|---|---|
| Simulation Session | Simulation Session | — | |
| body | Text | — | |
| position | Vector3d | — | |
| rotation | Quaterniond | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Simulation Session
- Package
- Physics Simulation
Push
FunctionGives a dynamic body an impulse (N·s).
Push
Simulation Session: Simulation Session
body: Text
impulse: Vector3dvoid Push(
SimulationSession Simulation Session,
string body,
Vector3d impulse)Parameters
| name | type | default | description |
|---|---|---|---|
| Simulation Session | Simulation Session | — | |
| body | Text | — | |
| impulse | Vector3d | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Simulation Session
- Package
- Physics Simulation
Release
FunctionMakes a static or kinematic body dynamic: it starts to fall and be pushed.
Release(Simulation Session: Simulation Session, body: Text)
void Release(SimulationSession Simulation Session, string body)
Parameters
| name | type | default | description |
|---|---|---|---|
| Simulation Session | Simulation Session | — | |
| body | Text | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Simulation Session
- Package
- Physics Simulation
Remove Body
FunctionTakes a body out of the running scene.
RemoveBody(Simulation Session: Simulation Session, body: Text)
void RemoveBody(
SimulationSession Simulation Session,
string body)Parameters
| name | type | default | description |
|---|---|---|---|
| Simulation Session | Simulation Session | — | |
| body | Text | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Simulation Session
- Package
- Physics Simulation
Report
FunctionThe engine's report of what the scene holds and what each solver costs.
Report(Simulation Session: Simulation Session) -> Text
string Report(SimulationSession Simulation Session)
Parameters
| name | type | default | description |
|---|---|---|---|
| Simulation Session | Simulation Session | — |
Returns
| result | Text |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Simulation Session
- Package
- Physics Simulation
Save Preview
FunctionRenders the scene now on the CPU (no GPU needed) and saves it as a PNG; returns the path.
SavePreview -> Text
Simulation Session: Simulation Session
path: Text
eye: Vector3d
target: Vector3d
width: Integer
height: Integerstring SavePreview(
SimulationSession Simulation Session,
string path,
Vector3d eye,
Vector3d target,
int width = 960,
int height = 540)Parameters
| name | type | default | description |
|---|---|---|---|
| Simulation Session | Simulation Session | — | |
| path | Text | — | The PNG file. |
| eye | Vector3d | — | Camera position (m). |
| target | Vector3d | — | Point the camera looks at (m). |
| width | Integer | 960 | Image width (pixels). |
| height | Integer | 540 | Image height (pixels). |
Returns
| result | Text |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Simulation Session
- Package
- Physics Simulation
Set Gravity
FunctionChanges gravity (m/s²).
SetGravity
Simulation Session: Simulation Session
gravity: Vector3dvoid SetGravity(
SimulationSession Simulation Session,
Vector3d gravity)Parameters
| name | type | default | description |
|---|---|---|---|
| Simulation Session | Simulation Session | — | |
| gravity | Vector3d | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Simulation Session
- Package
- Physics Simulation
Set Wind
FunctionChanges the steady wind (m/s) and its gusts (m/s).
SetWind
Simulation Session: Simulation Session
velocity: Vector3d
gusts: Numbervoid SetWind(
SimulationSession Simulation Session,
Vector3d velocity,
double gusts = 0)Parameters
| name | type | default | description |
|---|---|---|---|
| Simulation Session | Simulation Session | — | |
| velocity | Vector3d | — | |
| gusts | Number | 0 |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Simulation Session
- Package
- Physics Simulation
Step Frame
FunctionAdvances the simulation by one frame of a frame rate, as Simulate records a run.
StepFrame
Simulation Session: Simulation Session
framesPerSecond: Numbervoid StepFrame(
SimulationSession Simulation Session,
double framesPerSecond = 30)Parameters
| name | type | default | description |
|---|---|---|---|
| Simulation Session | Simulation Session | — | |
| framesPerSecond | Number | 30 |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Simulation Session
- Package
- Physics Simulation
Take Events
FunctionThe events of the scene's triggers since the last call, oldest first: the place a procedural graph reacts to contacts, thresholds and timers.
TakeEvents(Simulation Session: Simulation Session) -> Simulation Event Array
SimulationEvent[] TakeEvents(SimulationSession Simulation Session)
Parameters
| name | type | default | description |
|---|---|---|---|
| Simulation Session | Simulation Session | — |
Returns
| result | Simulation Event Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Simulation Session
- Package
- Physics Simulation
Unpin Cloth
FunctionLets go of a cloth's pinned vertices.
UnpinCloth(Simulation Session: Simulation Session, cloth: Text)
void UnpinCloth(
SimulationSession Simulation Session,
string cloth)Parameters
| name | type | default | description |
|---|---|---|---|
| Simulation Session | Simulation Session | — | |
| cloth | Text | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Simulation Session
- Package
- Physics Simulation
Water Particles
FunctionThe positions of a water body's particles now (m).
WaterParticles -> Vector3d Array
Simulation Session: Simulation Session
water: TextVector3d[] WaterParticles(
SimulationSession Simulation Session,
string water)Parameters
| name | type | default | description |
|---|---|---|---|
| Simulation Session | Simulation Session | — | |
| water | Text | — |
Returns
| result | Vector3d Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Simulation Session
- Package
- Physics Simulation
Start
FunctionStarts a session from a scene description.
Start -> Simulation Session
scene: Scene Description
threads: IntegerSimulationSession Start(SceneDescription scene, int threads = 0)
Parameters
| name | type | default | description |
|---|---|---|---|
| scene | Scene Description | — | The scene. |
| threads | Integer | 0 | Worker threads; 0 uses the engine's shared pool. Results do not depend on it. |
Returns
| result | Simulation Session |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Simulation Session
- Package
- Physics Simulation