GuidewireSimulation
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
cylinderAngularVelocitiesThe angular velocity of the current frame of each orientation element/ cylinder.
cylinderCountThe count of all cylinders of the guidewire. Equals the length of cylinderOrientationPredictions.
inertiaTensorThe inertia tensor. Entries are approximates as in the CoRdE paper.
cylinderExternalTorquesThe sum of all current external torques that are applied per orientation element/ cylinder.
inverseInertiaTensorThe 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
cylinderOrientationPredictionsThe prediction of the orientation of each cylinder at its center of mass.
cylinderCountThe count of all cylinders of the guidewire. Equals the length of cylinderOrientationPredictions.
cylinderAngularVelocitiesThe angular velocity of the current frame of each orientation element/ cylinder.
cylinderOrientationsThe 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
spherePositionPredictionsThe prediction of the position at the current frame of each sphere (in this case of the last frame).
spheresCountThe count of all spheres of the guidewire. Equals the length of spherePositionPredictions.
spherePositionsThe position at the current frame of each sphere.
sphereVelocitiesThe 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
sphereVelocitiesThe velocity of the current frame of each sphere.
sphereInverseMassesThe constant inverse masses of each sphere.
sphereExternalForcesThe 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: