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

## Public Member Functions

Vector3[] | PredictSphereVelocities (Vector3[] sphereVelocities, float[] sphereInverseMasses, Vector3[] sphereExternalForces)
Vector3[] | PredictSpherePositions (Vector3[] spherePositionPredictions, int spheresCount, Vector3[] spherePositions, Vector3[] sphereVelocities)
Vector3[] | PredictAngularVelocities (Vector3[] cylinderAngularVelocities, int cylinderCount, float[,] inertiaTensor, Vector3[] cylinderExternalTorques, float[,] inverseInertiaTensor)
BSM.Quaternion[] | PredictCylinderOrientations (BSM.Quaternion[] cylinderOrientationPredictions, int cylinderCount, Vector3[] cylinderAngularVelocities, BSM.Quaternion[] cylinderOrientations)

## Private Member Functions

void | Awake ()

## Private Attributes

MathHelper | mathHelper
| The component MathHelper that provides math related helper functions. More...

## Detailed Description

This class implements the prediction step of the algorithm.

## Member Function Documentation

## Awake()

void GuidewireSim.PredictionStep.Awake | ( |  | ) |

private

## PredictAngularVelocities()

Vector3[] GuidewireSim.PredictionStep.PredictAngularVelocities | ( | Vector3[] | cylinderAngularVelocities,
|  | int | cylinderCount,
|  | float | inertiaTensor[,],
|  | Vector3[] | cylinderExternalTorques,
|  | float | inverseInertiaTensor[,]
| ) |  |

Calculates the predictions for the angular velocities for the prediction step of the algorithm.

Parameters

  cylinderAngularVelocities | The angular velocity of the current frame of each orientation element/ cylinder.
  cylinderCount | The count of all cylinders of the guidewire. Equals the length of `cylinderOrientationPredictions`.
  inertiaTensor | The inertia tensor. Entries are approximates as in the CoRdE paper.
  cylinderExternalTorques | The sum of all current external torques that are applied per orientation element/ cylinder.
  inverseInertiaTensor | The inverse of `inertiaTensor`.

Returns
  The angular velocity of the current frame of each orientation element/ cylinder, i.e. `cylinderAngularVelocities`.

Note
  The predictions are again stored in `cylinderAngularVelocities`.

## PredictCylinderOrientations()

BSM.Quaternion[] GuidewireSim.PredictionStep.PredictCylinderOrientations | ( | BSM.Quaternion[] | cylinderOrientationPredictions,
|  | int | cylinderCount,
|  | Vector3[] | cylinderAngularVelocities,
|  | BSM.Quaternion[] | cylinderOrientations
| ) |  |

Calculates the predictions for the cylinder orientations for the prediction step of the algorithm.

Parameters

  cylinderOrientationPredictions | The prediction of the orientation of each cylinder at its center of mass.
  cylinderCount | The count of all cylinders of the guidewire. Equals the length of `cylinderOrientationPredictions`.
  cylinderAngularVelocities | The angular velocity of the current frame of each orientation element/ cylinder.
  cylinderOrientations | The orientation of each cylinder at its center of mass.

Returns
  The prediction of the orientation of each cylinder at its center of mass, i.e. `cylinderOrientationPredictions`.

## PredictSpherePositions()

Vector3[] GuidewireSim.PredictionStep.PredictSpherePositions | ( | Vector3[] | spherePositionPredictions,
|  | int | spheresCount,
|  | Vector3[] | spherePositions,
|  | Vector3[] | sphereVelocities
| ) |  |

Calculates the predictions for the sphere positions for the prediction step of the algorithm.

Parameters

  spherePositionPredictions | The prediction of the position at the current frame of each sphere (in this case of the last frame).
  spheresCount | The count of all spheres of the guidewire. Equals the length of `spherePositionPredictions`.
  spherePositions | The position at the current frame of each sphere.
  sphereVelocities | The velocity of the current frame of each sphere.

Returns
  The prediction of the position at the current frame of each sphere, i.e. spherePositionPredictions.

## PredictSphereVelocities()

Vector3[] GuidewireSim.PredictionStep.PredictSphereVelocities | ( | Vector3[] | sphereVelocities,
|  | float[] | sphereInverseMasses,
|  | Vector3[] | sphereExternalForces
| ) |  |

Calculates the predictions for the sphere velocities for the prediction step of the algorithm.

Parameters

  sphereVelocities | The velocity of the current frame of each sphere.
  sphereInverseMasses | The constant inverse masses of each sphere.
  sphereExternalForces | The sum of all current external forces that are applied per particle/ sphere.

Returns
  The predictions of the positions of the spheres, i.e. `spherePositionPredictions`.

Note
  The predictions are again stored in `sphereVelocities`.

## Member Data Documentation

## mathHelper

MathHelper GuidewireSim.PredictionStep.mathHelper

private

The component MathHelper that provides math related helper functions.

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

- PredictionStep.cs