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

Inherits MonoBehaviour.

Classes

class  MarkedDisplay
 

Public Attributes

MeshSimulation sim = null
 
List< Canvas > measurementDisplays
 
GameObject topEndcap
 
GameObject bottomEndCap
 

Private Member Functions

void Start ()
 
void Update ()
 
int GetMagnitude (float number)
 
Returns
Integer of number of zeros of base 10 magnitude of number
More...
 
string GetUnit (int magnitude)
 
void CreateMarkers ()
 
void UpdateMarkers (float minimumMarkerNumber)
 Updates the locations of the markers on the ruler More...
 
void UpdateEndCaps ()
 Ensures the EndCaps stay their initial size when the ruler is extended or shrunk More...
 

Private Attributes

readonly List< int > potentialIntervals = new List<int> { 1, 2, 5, 10, 20, 50, 100, 200, 500 }
 
List< MarkedDisplaymarkedDisplays = new List<MarkedDisplay>()
 
readonly int markerCount = 100
 
float initialTopEndCapLength
 
float initialBottomEndCapLength
 
float initialRulerLength
 
float prevRulerLength = 0
 
float scaledRulerLength
 
string units
 

Member Function Documentation

◆ CreateMarkers()

void C2M2.Interaction.RulerMeasure.CreateMarkers ( )
private

◆ GetMagnitude()

int C2M2.Interaction.RulerMeasure.GetMagnitude ( float  number)
private

Returns
Integer of number of zeros of base 10 magnitude of number

◆ GetUnit()

string C2M2.Interaction.RulerMeasure.GetUnit ( int  magnitude)
private
Parameters
magnitudeInteger of number of zeros of base 10 magnitude of number
Returns
String of the SI unit and prefix

◆ Start()

void C2M2.Interaction.RulerMeasure.Start ( )
private

◆ Update()

void C2M2.Interaction.RulerMeasure.Update ( )
private

length change must be greater than 0.5% to update

< minimum spacing between each marker and beginning and end of ruler

< minimum spacing between each marker and beginning and end of ruler in percent of ruler's length

◆ UpdateEndCaps()

void C2M2.Interaction.RulerMeasure.UpdateEndCaps ( )
private

Ensures the EndCaps stay their initial size when the ruler is extended or shrunk

◆ UpdateMarkers()

void C2M2.Interaction.RulerMeasure.UpdateMarkers ( float  minimumMarkerNumber)
private

Updates the locations of the markers on the ruler

Parameters
minimumMarkerNumberMinimum valid number for a marker to be placed on the ruler, needs to be between the lowest and the highest number in potentialIntervals

Member Data Documentation

◆ bottomEndCap

GameObject C2M2.Interaction.RulerMeasure.bottomEndCap

◆ initialBottomEndCapLength

float C2M2.Interaction.RulerMeasure.initialBottomEndCapLength
private

◆ initialRulerLength

float C2M2.Interaction.RulerMeasure.initialRulerLength
private

◆ initialTopEndCapLength

float C2M2.Interaction.RulerMeasure.initialTopEndCapLength
private

◆ markedDisplays

List<MarkedDisplay> C2M2.Interaction.RulerMeasure.markedDisplays = new List<MarkedDisplay>()
private

◆ markerCount

readonly int C2M2.Interaction.RulerMeasure.markerCount = 100
private

◆ measurementDisplays

List<Canvas> C2M2.Interaction.RulerMeasure.measurementDisplays

◆ potentialIntervals

readonly List<int> C2M2.Interaction.RulerMeasure.potentialIntervals = new List<int> { 1, 2, 5, 10, 20, 50, 100, 200, 500 }
private

◆ prevRulerLength

float C2M2.Interaction.RulerMeasure.prevRulerLength = 0
private

◆ scaledRulerLength

float C2M2.Interaction.RulerMeasure.scaledRulerLength
private

◆ sim

MeshSimulation C2M2.Interaction.RulerMeasure.sim = null

◆ topEndcap

GameObject C2M2.Interaction.RulerMeasure.topEndcap

◆ units

string C2M2.Interaction.RulerMeasure.units
private

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