AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
HoloToolkit.Unity.TransformExtensions Class Reference

Static Public Member Functions

static string GetFullPath (this Transform transform, string delimiter=".", string prefix="/")
 An extension method that will get you the full path to an object. More...
 
static IEnumerable< Transform > EnumerateHierarchy (this Transform root)
 Enumerates all children in the hierarchy starting at the root object. More...
 
static IEnumerable< Transform > EnumerateHierarchy (this Transform root, ICollection< Transform > ignore)
 Enumerates all children in the hierarchy starting at the root object except for the branches in ignore. More...
 
static Bounds GetColliderBounds (this Transform transform)
 Calculates the bounds of all the colliders attached to this GameObject and all it's children More...
 
static bool IsParentOrChildOf (this Transform transform1, Transform transform2)
 Checks if the provided transforms are child/parent related. More...
 

Detailed Description

Definition at line 11 of file TransformExtensions.cs.

Member Function Documentation

§ EnumerateHierarchy() [1/2]

static IEnumerable<Transform> HoloToolkit.Unity.TransformExtensions.EnumerateHierarchy ( this Transform  root)
static

Enumerates all children in the hierarchy starting at the root object.

Parameters
rootStart point of the traversion set

Definition at line 45 of file TransformExtensions.cs.

§ EnumerateHierarchy() [2/2]

static IEnumerable<Transform> HoloToolkit.Unity.TransformExtensions.EnumerateHierarchy ( this Transform  root,
ICollection< Transform >  ignore 
)
static

Enumerates all children in the hierarchy starting at the root object except for the branches in ignore.

Parameters
rootStart point of the traversion set
ignoreTransforms and all its children to be ignored

Definition at line 56 of file TransformExtensions.cs.

§ GetColliderBounds()

static Bounds HoloToolkit.Unity.TransformExtensions.GetColliderBounds ( this Transform  transform)
static

Calculates the bounds of all the colliders attached to this GameObject and all it's children

Parameters
transformTransform of root GameObject the colliders are attached to
Returns
The total bounds of all colliders attached to this GameObject. If no colliders attached, returns a bounds of center and extents 0

Definition at line 97 of file TransformExtensions.cs.

§ GetFullPath()

static string HoloToolkit.Unity.TransformExtensions.GetFullPath ( this Transform  transform,
string  delimiter = ".",
string  prefix = "/" 
)
static

An extension method that will get you the full path to an object.

Parameters
transformThe transform you wish a full path to.
delimiterThe delimiter with which each object is delimited in the string.
prefixPrefix with which the full path to the object should start.
Returns
A delimited string that is the full path to the game object in the hierarchy.

Definition at line 20 of file TransformExtensions.cs.

§ IsParentOrChildOf()

static bool HoloToolkit.Unity.TransformExtensions.IsParentOrChildOf ( this Transform  transform1,
Transform  transform2 
)
static

Checks if the provided transforms are child/parent related.

Returns
True if either transform is the parent of the other or if they are the same

Definition at line 114 of file TransformExtensions.cs.


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