C# Class ADMQualityManager

Manage the visuals for an Area Description recording's quality. The quality is done by keeping track of all the locations the Project Tango device has been in and remembering which orientations it has faced. A high quality recording is where for every location the device has been in, there has been a 360 degree coverage in locations. To keep things simple, the recording quality assumes a relative flat world.
Inheritance: MonoBehaviour
Mostrar archivo Open project: ekumenlabs/Garkanoid Class Usage Examples

Public Properties

Property Type Description
m_badQualityTransformParent UnityEngine.RectTransform
m_cellVisualsPrefab GameObject
m_poseController Transform
m_qualityText Text

Public Methods

Method Description
GetBoundingBox ( Vector2 &minXZ, Vector2 &maxXZ ) : void

Get the bounding box for the quality visualization in (X, Z) coordinates.

LateUpdate ( ) : void

LateUpdate is called after all Update functions have been called.

OnEnable ( ) : void

This function is called when the object becomes enabled and active.

Private Methods

Method Description
_CalculateQuality ( ) : float

Calculate the quality of the current Area Description, as a percentage.

_DiscretizeTransform ( Transform t, int &cellX, int &cellZ, int &angleIndex ) : bool

Discretize the transform into integral values. This returns true only if the transform is of good quality. A good quality transform is facing roughly forward, not looking too far down or too far up.

_InternCell ( int x, int z ) : QualityCell

Get the cell for a specific coordinate, allocating new cells if necessary. Think string.Intern.

_UpdateVisuals ( QualityCell cell ) : void

Update the visuals for a cell.

Method Details

GetBoundingBox() public method

Get the bounding box for the quality visualization in (X, Z) coordinates.
public GetBoundingBox ( Vector2 &minXZ, Vector2 &maxXZ ) : void
minXZ Vector2 Returns the minimum (X, Z) coordinates of the visualization.
maxXZ Vector2 Returns the maximum (X, Z) coordinates of the visualization.
return void

LateUpdate() public method

LateUpdate is called after all Update functions have been called.
public LateUpdate ( ) : void
return void

OnEnable() public method

This function is called when the object becomes enabled and active.
public OnEnable ( ) : void
return void

Property Details

m_badQualityTransformParent public_oe property

Parent of UI that should be shown when the quality of transforms coming in is bad.
public RectTransform,UnityEngine m_badQualityTransformParent
return UnityEngine.RectTransform

m_cellVisualsPrefab public_oe property

Visualization prefab. This will get instantiated for each instance of QualityCell.
public GameObject m_cellVisualsPrefab
return GameObject

m_poseController public_oe property

The PoseController whose position corresponds to the Project Tango device's position.
public Transform m_poseController
return Transform

m_qualityText public_oe property

Textual description of quality.
public Text m_qualityText
return Text