![]() |
Neuro-VISOR
0.2.0
Visualize and interact with computational simulations using a virtual reality interface
|
Provides an base interface for simulations using a general data type T More...
Inherits C2M2.Simulation.Interactable.
Public Member Functions | |
abstract ValueType | GetValues () |
Require derived classes to make simulation values available More... | |
void | Initialize () |
void | FixedUpdate () |
void | StartSimulation () |
Launch Solve thread More... | |
sealed override float | GetSimulationTime () |
Return the current timestep for the simulation More... | |
void | StopSimulation () |
Stop current Solve thread More... | |
int[] | HitToVertices (RaycastHit hit) |
Given a raycast hit, find the hit 3D vertices More... | |
![]() | |
abstract void | SetValues (RaycastHit hit) |
Require derived classes to know how to receive an interaction event More... | |
Public Attributes | |
bool | dryRun = false |
Run solve code without visualization or interaction More... | |
bool | paused = false |
RaycastEventManager | raycastEventManager = null |
RaycastPressEvents | defaultRaycastEvent = null |
int | time = -1 |
double | timeStep = 0.008 * 1e-3 |
double | endTime = 1.0 |
Protected Member Functions | |
abstract VizType | BuildVisualization () |
Simulations must know how to build their visualization and what type the visualization is More... | |
abstract void | UpdateVisualization (in ValueType newValues) |
Update the visualization. This will be called once per Update() call More... | |
abstract void | SolveStep (int t) |
Method containing simulation code More... | |
virtual void | PreSolveStep (int t) |
PreSolveStep is called once per simulation frame, before SolveStep() More... | |
virtual void | PostSolveStep (int t) |
PostSolveStep is called once per simulation frame, after SolveStep() More... | |
virtual void | OnAwakePre () |
virtual void | OnAwakePost (VizType viz) |
virtual void | OnStart () |
virtual void | OnUpdate () |
void | OnDestroy () |
virtual void | OnPause () |
virtual void | OnQuit () |
virtual void | OnDest () |
abstract void | PreSolve () |
Called on the main thread before the Solve thread is launched More... | |
virtual void | PostSolve () |
Called on the solve thread after the simulation for loop is completed More... | |
Protected Attributes | |
Mutex | mutex = new Mutex() |
Provide mutual exclusion to derived classes More... | |
CustomSampler | solveStepSampler = null |
Properties | |
VizType | Viz [get, protected set] |
int | nT = -1 [get, private set] |
Private Member Functions | |
void | OnApplicationPause (bool pause) |
void | OnApplicationQuit () |
void | Solve () |
Private Attributes | |
Thread | solveThread = null |
Thread that runs simulation code More... | |
Provides an base interface for simulations using a general data type T
ValueType | Type of simulation values |
VizType | |
RaycastType | |
GrabType |
|
protectedpure virtual |
Simulations must know how to build their visualization and what type the visualization is
See SurfaceSimulation & NeuronSimulation1D or PositionFieldSimulation for examples.
Implemented in C2M2.NeuronalDynamics.Simulation.NDSimulation.
void C2M2.Simulation.Simulation< ValueType, VizType, RaycastType, GrabType >.FixedUpdate | ( | ) |
|
virtual |
|
pure virtual |
Require derived classes to make simulation values available
Implemented in C2M2.NeuronalDynamics.Simulation.NDSimulation.
int [] C2M2.Simulation.Simulation< ValueType, VizType, RaycastType, GrabType >.HitToVertices | ( | RaycastHit | hit | ) |
Given a raycast hit, find the hit 3D vertices
void C2M2.Simulation.Simulation< ValueType, VizType, RaycastType, GrabType >.Initialize | ( | ) |
Add event child object for interaction scripts to find
|
private |
|
private |
|
protectedvirtual |
|
protectedvirtual |
Reimplemented in C2M2.NeuronalDynamics.Simulation.NDSimulation.
|
protectedvirtual |
|
protected |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Called on the solve thread after the simulation for loop is completed
|
protectedvirtual |
PostSolveStep is called once per simulation frame, after SolveStep()
Reimplemented in C2M2.NeuronalDynamics.Simulation.NDSimulation.
|
protectedpure virtual |
Called on the main thread before the Solve thread is launched
This is useful if you need to initialize anything that makes use of Unity calls, which are not available to be called from secondary threads.
Implemented in C2M2.NeuronalDynamics.Simulation.SparseSolverTestv1, and C2M2.NeuronalDynamics.Simulation.ExampleNDSolver.
|
protectedvirtual |
PreSolveStep is called once per simulation frame, before SolveStep()
|
private |
|
protectedpure virtual |
Method containing simulation code
Launches in its own thread
Implemented in C2M2.NeuronalDynamics.Simulation.SparseSolverTestv1, and C2M2.NeuronalDynamics.Simulation.ExampleNDSolver.
void C2M2.Simulation.Simulation< ValueType, VizType, RaycastType, GrabType >.StartSimulation | ( | ) |
Launch Solve thread
void C2M2.Simulation.Simulation< ValueType, VizType, RaycastType, GrabType >.StopSimulation | ( | ) |
Stop current Solve thread
|
protectedpure virtual |
Update the visualization. This will be called once per Update() call
See SurfaceSimulation & NeuronSimulation1D or PositionFieldSimulation for examples.
RaycastPressEvents C2M2.Simulation.Simulation< ValueType, VizType, RaycastType, GrabType >.defaultRaycastEvent = null |
bool C2M2.Simulation.Simulation< ValueType, VizType, RaycastType, GrabType >.dryRun = false |
Run solve code without visualization or interaction
double C2M2.Simulation.Simulation< ValueType, VizType, RaycastType, GrabType >.endTime = 1.0 |
|
protected |
Provide mutual exclusion to derived classes
bool C2M2.Simulation.Simulation< ValueType, VizType, RaycastType, GrabType >.paused = false |
RaycastEventManager C2M2.Simulation.Simulation< ValueType, VizType, RaycastType, GrabType >.raycastEventManager = null |
|
protected |
|
private |
Thread that runs simulation code
int C2M2.Simulation.Simulation< ValueType, VizType, RaycastType, GrabType >.time = -1 |
double C2M2.Simulation.Simulation< ValueType, VizType, RaycastType, GrabType >.timeStep = 0.008 * 1e-3 |
|
getprivate set |
|
getprotected set |