CellexalVR  1.1.0
A virtual reality platform for the exploration and analysis of single-cell gene expression data
CellexalVR.Tools.DrawTool Class Reference

Represents the draw tool. It is used to draw lines in the virtual environment. More...

Inheritance diagram for CellexalVR.Tools.DrawTool:

Public Member Functions

void DrawNewLine (Color col, Vector3[] coords)
 Draws a new line. More...
 
void ClearAllLinesWithColor (Color col)
 Clears all lines with a specified color. More...
 
bool CompareColors (Color col1, Color col2)
 Checks if two colors are almost the same. Unity likes changing the color float values of colors slightly it seems, probably because they are represented as [0, 255] somewhere and [0, 1] somewhere else. This method returns true if the red green and blue components of two colors are within 0.01 of eachother. More...
 
void ClearLastLine ()
 Removes the last drawn line. More...
 
void ClearAllLines ()
 Removes all lines that have been drawn. More...
 

Public Attributes

GameObject linePrefab
 
ReferenceManager referenceManager
 
Color LineColor = Color.white
 

Detailed Description

Represents the draw tool. It is used to draw lines in the virtual environment.

Member Function Documentation

◆ ClearAllLines()

void CellexalVR.Tools.DrawTool.ClearAllLines ( )

Removes all lines that have been drawn.

◆ ClearAllLinesWithColor()

void CellexalVR.Tools.DrawTool.ClearAllLinesWithColor ( Color  col)

Clears all lines with a specified color.

Parameters
colThe color of the lines that should be removed.

◆ ClearLastLine()

void CellexalVR.Tools.DrawTool.ClearLastLine ( )

Removes the last drawn line.

◆ CompareColors()

bool CellexalVR.Tools.DrawTool.CompareColors ( Color  col1,
Color  col2 
)

Checks if two colors are almost the same. Unity likes changing the color float values of colors slightly it seems, probably because they are represented as [0, 255] somewhere and [0, 1] somewhere else. This method returns true if the red green and blue components of two colors are within 0.01 of eachother.

Parameters
col1The first color.
col2The second color.
Returns
True if the colors are almost the same, false otherwise.

◆ DrawNewLine()

void CellexalVR.Tools.DrawTool.DrawNewLine ( Color  col,
Vector3[]  coords 
)

Draws a new line.

Parameters
colThe line's color.
coordsAn array with the world space coordinates for each point the line should pass through.

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