Loading...
Searching...
No Matches
GuidewireSim.DirectorsDrawer Class Reference
Inheritance diagram for GuidewireSim.DirectorsDrawer:

## Private Member Functions

void | Awake ()
void | Update ()
void | DrawDirectors (Vector3[] cylinderPositions, Vector3[][] directors)
Vector3[] | CalculateArrowHeadPositions (Vector3 startPosition, Vector3 endPosition)
void | DrawArrowHeadLines (int directorIndex, Vector3 endPosition, Vector3[] arrowHeadPositions)
void | DrawArrowHeadConnectionLines (int directorIndex, Vector3[] arrowHeadPositions)

## Private Attributes

SimulationLoop | simulationLoop
| The component SimulationLoop. More...
float | scaleFactor
| The scale factor that gets multiplied to the length of the respective director. More...
float | arrowHeadAngle
| The angle spread of the arrow head. More...
float | arrowHeadPercentage
| The percentage of the length of the arrow that the arrow head covers. More...
Color | directorOneColor = Color.green
| The color that the lines representing the first director are drawn with. More...
Color | directorTwoColor = Color.blue
| The color that the lines representing the second director are drawn with. More...
Color | directorThreeColor = Color.red
| The color that the lines representing the third director are drawn with. More...
Color[] | directorColors = new Color[3] {Color.red, Color.green, Color.blue}

## Detailed Description

This class represents each orientation by drawing all of its directors as arrows in each frame.

## Member Function Documentation

## Awake()

void GuidewireSim.DirectorsDrawer.Awake | ( |  | ) |

private

## CalculateArrowHeadPositions()

Vector3[] GuidewireSim.DirectorsDrawer.CalculateArrowHeadPositions | ( | Vector3 | startPosition,
|  | Vector3 | endPosition
| ) |  |

private

Calculates the end position of each line of each arrow head. E.g. an arrow head consists of four lines, each of them starting at `endPosition` and spreading in different directions to form the shape of an arrow tip.

Parameters

  startPosition | The start position of the director, i.e. the position of the orientation.
  endPosition | The position of the tip of the arrow head.

Returns
  The end positions of the four lines that form the arrow head.

Requirements:
  `arrowHeadPositions` has a length of 4.

## DrawArrowHeadConnectionLines()

void GuidewireSim.DirectorsDrawer.DrawArrowHeadConnectionLines | ( | int | directorIndex,
|  | Vector3[] | arrowHeadPositions
| ) |  |

private

Draws the four lines that connect the arrow head tips with each other. E.g. draws the line from `arrowHeadPositions` 0 and `arrowHeadPositions` 1.

Parameters

  directorIndex | The index of the director under consideration.
  arrowHeadPositions | The end positions of the four lines that form the arrow head.

## DrawArrowHeadLines()

void GuidewireSim.DirectorsDrawer.DrawArrowHeadLines | ( | int | directorIndex,
|  | Vector3 | endPosition,
|  | Vector3[] | arrowHeadPositions
| ) |  |

private

Draws the four lines that form the arrow head for the director that corresponds to `directorIndex`.

Parameters

  directorIndex | The index of the director under consideration.
  endPosition | The position of the tip of the arrow head.
  arrowHeadPositions | The end positions of the four lines that form the arrow head.

Requirements:
  `arrowHeadPositions` has a length of 4.

## DrawDirectors()

void GuidewireSim.DirectorsDrawer.DrawDirectors | ( | Vector3[] | cylinderPositions,
|  | Vector3 | directors[][]
| ) |  |

private

Draws the director basis of each orientation element as arrows.

Parameters

  cylinderPositions | The center of mass of each cylinder, i.e. the position of each orientation element.
  directors | The orthonormal basis of each orientation element / cylinder, also called directors.

## Update()

void GuidewireSim.DirectorsDrawer.Update | ( |  | ) |

private

## Member Data Documentation

## arrowHeadAngle

float GuidewireSim.DirectorsDrawer.arrowHeadAngle

private

The angle spread of the arrow head.

## arrowHeadPercentage

float GuidewireSim.DirectorsDrawer.arrowHeadPercentage

private

The percentage of the length of the arrow that the arrow head covers.

## directorColors

Color [] GuidewireSim.DirectorsDrawer.directorColors = new Color[3] {Color.red, Color.green, Color.blue}

private

The color that the lines representing the three directors are drawn with.

Note
  The i-th director is drawn in the i-th Color.

## directorOneColor

Color GuidewireSim.DirectorsDrawer.directorOneColor = Color.green

private

The color that the lines representing the first director are drawn with.

## directorThreeColor

Color GuidewireSim.DirectorsDrawer.directorThreeColor = Color.red

private

The color that the lines representing the third director are drawn with.

## directorTwoColor

Color GuidewireSim.DirectorsDrawer.directorTwoColor = Color.blue

private

The color that the lines representing the second director are drawn with.

## scaleFactor

float GuidewireSim.DirectorsDrawer.scaleFactor

private

The scale factor that gets multiplied to the length of the respective director.

## simulationLoop

SimulationLoop GuidewireSim.DirectorsDrawer.simulationLoop

private

The component SimulationLoop.

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

- DirectorsDrawer.cs