GuidewireSimulation
GuidewireSim.ObjectSetter Class Reference
Inheritance diagram for GuidewireSim.ObjectSetter:

Public Member Functions

void SetSpherePositions (GameObject[] spheres, int spheresCount, Vector3[] spherePositions)
 
void SetCylinderPositions (GameObject[] cylinders, int cylinderCount, Vector3[] cylinderPositions)
 
void SetCylinderOrientations (GameObject[] cylinders, int cylinderCount, BSM.Quaternion[] cylinderOrientations, Vector3[][] directors)
 

Private Member Functions

void Awake ()
 

Private Attributes

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

Detailed Description

This class is responsible for setting the transformation positions of the GameObjects in the scene to their respective simulation data like spherePositions.

Member Function Documentation

◆ Awake()

void GuidewireSim.ObjectSetter.Awake ( )
private

◆ SetCylinderOrientations()

void GuidewireSim.ObjectSetter.SetCylinderOrientations ( GameObject[]  cylinders,
int  cylinderCount,
BSM.Quaternion[]  cylinderOrientations,
Vector3  directors[][] 
)

Rotates each cylinder GameObject such that its centerline is parallel with the line segment that is spanned by the two adjacent sphere's center of masses.

Parameters
cylindersAll cylinders that are part of the guidewire.
cylinderCountThe count of all cylinders of the guidewire. Equals the length of cylinderOrientationPredictions.
cylinderOrientationsThe orientation of each cylinder at its center of mass.
directorsThe orthonormal basis of each orientation element / cylinder, also called directors.
Note
appliedTransformation is the rotation that aligns the y-axis of the cylinder with the z-axis of the orientations (the third director). This is needed, because the y-axis of the cylinder is parallel with its centerline, while the z-axis of the orientations (the third director) is also defined as being parallel with the cylinder's centerline. Thus appliedTransformation is necessary.

◆ SetCylinderPositions()

void GuidewireSim.ObjectSetter.SetCylinderPositions ( GameObject[]  cylinders,
int  cylinderCount,
Vector3[]  cylinderPositions 
)

Sets the positions of the GameObjects cylinders to their respective cylinderPositions.

Parameters
cylindersAll cylinders that are part of the guidewire.
cylinderCountThe count of all cylinders of the guidewire. Equals the length of cylinderOrientationPredictions.
cylinderPositionsThe position/ center of mass of each cylinder.

◆ SetSpherePositions()

void GuidewireSim.ObjectSetter.SetSpherePositions ( GameObject[]  spheres,
int  spheresCount,
Vector3[]  spherePositions 
)

Sets the positions of the GameObjects spheres to their respective spherePositions.

Parameters
spheresAll spheres that are part of the guidewire.
spheresCountThe count of all spheres of the guidewire. Equals the length of spherePositionPredictions.
spherePositionsThe position at the current frame of each sphere.

Member Data Documentation

◆ mathHelper

MathHelper GuidewireSim.ObjectSetter.mathHelper
private

The component MathHelper that provides math related helper functions.


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