Neuro-VISOR  0.2.0
Visualize and interact with computational simulations using a virtual reality interface
C2M2.Simulation.MeshSimulation Class Reference

Simulation of type double[] for visualizing scalar fields on mesh surfaces More...

Inherits C2M2.Simulation.Simulation< double[], Mesh, VRRaycastableMesh, VRGrabbableMesh >.

Inherited by C2M2.NeuronalDynamics.Simulation.NDSimulation.

Public Member Functions

void ShiftRaycastValue ()
 
void CloseRuler ()
 
void ResetRaycastHits ()
 
- Public Member Functions inherited from C2M2.Simulation.Simulation< double[], Mesh, VRRaycastableMesh, VRGrabbableMesh >
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...
 

Public Attributes

Gradient gradient
 Gradient for coloring each surface point based on their scalar values More...
 
int colorMarkerPrecision = 3
 Alter the precision of the color scale display More...
 
float globalMax = float.NegativeInfinity
 
float globalMin = float.PositiveInfinity
 
string unit = "mV"
 Unit display string that can be manually set by the user More...
 
float unitScaler = 1000f
 Can be used to manually convert Gradient Display values to match unit string More...
 
string lengthUnit = "μm"
 
Vector3 rulerInitPos = new Vector3(-0.5f, 0.443f, -0.322f)
 
Vector3 rulerInitRot = new Vector3(90, 0, 0)
 
double raycastHitValue = 55
 
Tuple< int, double >[] raycastHits = new Tuple<int, double>[0]
 
RulerMeasure ruler = null
 
KeyCode powerModifierPlusKey = KeyCode.UpArrow
 
KeyCode powerModifierMinusKey = KeyCode.DownArrow
 
float sensitivity = 200f
 
- Public Attributes inherited from C2M2.Simulation.Simulation< double[], Mesh, VRRaycastableMesh, VRGrabbableMesh >
bool dryRun
 Run solve code without visualization or interaction More...
 
bool paused
 
RaycastEventManager raycastEventManager
 
RaycastPressEvents defaultRaycastEvent
 
int time
 
double timeStep
 
double endTime
 

Protected Member Functions

override void UpdateVisualization (in double[] newValues)
 
override void OnAwakePost (Mesh viz)
 
- Protected Member Functions inherited from C2M2.Simulation.Simulation< double[], Mesh, VRRaycastableMesh, VRGrabbableMesh >
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

MeshFilter mf
 
MeshRenderer mr
 
- Protected Attributes inherited from C2M2.Simulation.Simulation< double[], Mesh, VRRaycastableMesh, VRGrabbableMesh >
Mutex mutex
 Provide mutual exclusion to derived classes More...
 
CustomSampler solveStepSampler
 

Properties

ColorLUT ColorLUT = null [get, private set]
 Lookup table for more efficient color calculations on the gradient More...
 
ColorLUT.ExtremaMethod extremaMethod = ColorLUT.ExtremaMethod.GlobalExtrema [get, set]
 
Mesh VisualMesh [get, protected set]
 
Mesh ColliderMesh [get, protected set]
 
float ThumbstickScaler [get]
 
float PowerModifier [get]
 
- Properties inherited from C2M2.Simulation.Simulation< double[], Mesh, VRRaycastableMesh, VRGrabbableMesh >
VizType Viz [get, protected set]
 
int nT [get, private set]
 

Private Member Functions

void UpdateVisualization (in float[] scalars3D)
 Update vertex colors based on simulation values More...
 

Private Attributes

Mesh visualMesh = null
 
Mesh colliderMesh = null
 

Detailed Description

Simulation of type double[] for visualizing scalar fields on mesh surfaces

Member Function Documentation

◆ CloseRuler()

void C2M2.Simulation.MeshSimulation.CloseRuler ( )

◆ OnAwakePost()

override void C2M2.Simulation.MeshSimulation.OnAwakePost ( Mesh  viz)
protected

◆ ResetRaycastHits()

void C2M2.Simulation.MeshSimulation.ResetRaycastHits ( )

◆ ShiftRaycastValue()

void C2M2.Simulation.MeshSimulation.ShiftRaycastValue ( )

◆ UpdateVisualization() [1/2]

override void C2M2.Simulation.MeshSimulation.UpdateVisualization ( in double[]  newValues)
protected

◆ UpdateVisualization() [2/2]

void C2M2.Simulation.MeshSimulation.UpdateVisualization ( in float[]  scalars3D)
private

Update vertex colors based on simulation values

Member Data Documentation

◆ colliderMesh

Mesh C2M2.Simulation.MeshSimulation.colliderMesh = null
private

◆ colorMarkerPrecision

int C2M2.Simulation.MeshSimulation.colorMarkerPrecision = 3

Alter the precision of the color scale display

◆ globalMax

float C2M2.Simulation.MeshSimulation.globalMax = float.NegativeInfinity

◆ globalMin

float C2M2.Simulation.MeshSimulation.globalMin = float.PositiveInfinity

◆ gradient

Gradient C2M2.Simulation.MeshSimulation.gradient

Gradient for coloring each surface point based on their scalar values

◆ lengthUnit

string C2M2.Simulation.MeshSimulation.lengthUnit = "μm"

◆ mf

MeshFilter C2M2.Simulation.MeshSimulation.mf
protected

◆ mr

MeshRenderer C2M2.Simulation.MeshSimulation.mr
protected

◆ powerModifierMinusKey

KeyCode C2M2.Simulation.MeshSimulation.powerModifierMinusKey = KeyCode.DownArrow

◆ powerModifierPlusKey

KeyCode C2M2.Simulation.MeshSimulation.powerModifierPlusKey = KeyCode.UpArrow

◆ raycastHits

Tuple<int, double> [] C2M2.Simulation.MeshSimulation.raycastHits = new Tuple<int, double>[0]

◆ raycastHitValue

double C2M2.Simulation.MeshSimulation.raycastHitValue = 55

◆ ruler

RulerMeasure C2M2.Simulation.MeshSimulation.ruler = null

◆ rulerInitPos

Vector3 C2M2.Simulation.MeshSimulation.rulerInitPos = new Vector3(-0.5f, 0.443f, -0.322f)

◆ rulerInitRot

Vector3 C2M2.Simulation.MeshSimulation.rulerInitRot = new Vector3(90, 0, 0)

◆ sensitivity

float C2M2.Simulation.MeshSimulation.sensitivity = 200f

◆ unit

string C2M2.Simulation.MeshSimulation.unit = "mV"

Unit display string that can be manually set by the user

◆ unitScaler

float C2M2.Simulation.MeshSimulation.unitScaler = 1000f

Can be used to manually convert Gradient Display values to match unit string

◆ visualMesh

Mesh C2M2.Simulation.MeshSimulation.visualMesh = null
private

Property Documentation

◆ ColliderMesh

Mesh C2M2.Simulation.MeshSimulation.ColliderMesh
getprotected set

◆ ColorLUT

ColorLUT C2M2.Simulation.MeshSimulation.ColorLUT = null
getprivate set

Lookup table for more efficient color calculations on the gradient

◆ extremaMethod

ColorLUT.ExtremaMethod C2M2.Simulation.MeshSimulation.extremaMethod = ColorLUT.ExtremaMethod.GlobalExtrema
getset

◆ PowerModifier

float C2M2.Simulation.MeshSimulation.PowerModifier
get

◆ ThumbstickScaler

float C2M2.Simulation.MeshSimulation.ThumbstickScaler
get

◆ VisualMesh

Mesh C2M2.Simulation.MeshSimulation.VisualMesh
getprotected set

The documentation for this class was generated from the following file: