TransformExt ClassTransform extensions.
Inheritance Hierarchy
System.Object
UltimateXR.Extensions.Unity.TransformExt
Namespace: UltimateXR.Extensions.Unity
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0
Syntax
C#
public static class TransformExt
The TransformExt type exposes the following members.
Methods
Name | Description | |
---|---|---|
AlignChildrenOnAxis | Aligns all children of a given component on an axis. | |
AlignOnAxis | Aligns a set of transforms on an axis. | |
ApplyAlignment(Transform, Quaternion, Quaternion, Single) | Applies the transformation to make a rotation defined by sourceRotation rotate towards targetRotation. | |
ApplyAlignment(Transform, Transform, Transform, Boolean, Boolean, Single) | Applies the transformation required to make sourceAlign align with targetAlign. | |
ApplyAlignment(Transform, Vector3, Quaternion, Vector3, Quaternion, Boolean, Boolean, Single) | Applies the transformation to make a transform defined by sourcePosition and sourceRotation move and rotate to targetPosition and targetRotation. | |
ApplyAlignment(Vector3, Quaternion, Vector3, Quaternion, Vector3, Quaternion, Boolean, Boolean, Single) | Moves rootPosition and rotates rootRotation so that a child defined by childPosition and childRotation gets aligned to targetPosition and targetRotation. | |
ApplyInterpolation | Applies an interpolation between two other transforms. | |
ApplyMirroring(Transform, Transform, UxrAxis, TransformExt.MirrorType, Boolean, Boolean) | Applies a mirroring to a transform. | |
ApplyMirroring(Transform, Vector3, Vector3, TransformExt.MirrorType, Boolean, Boolean) | Applies a mirroring to a transform. | |
CalculateBounds(BoxCollider, Space) | Gets the bounds of a BoxCollider in a given space. | |
CalculateBounds(IEnumerable(Transform), Space, Boolean) | Gets the bounds in a given space of all MeshRenderers in a set of Transforms. | |
CalculateBounds(Transform, Space, Boolean) | Computes the bounds of all MeshRenderers that hang from a parent transform. | |
CalculateRectBounds | Computes the bounds containing a RectTransform’s rect. | |
ClampPositionToBox | Constraints the given transform position to the volume specified by a box collider. | |
DestroyAllChildren(Transform) | Destroys all children using Destroy(). | |
DestroyAllChildren<T>(Transform, Boolean) | Destroys all children GameObjects using Destroy() that have a given component type. | |
DestroyImmediateAllChildren(Transform) | Destroys all children using DestroyImmediate(). | |
DestroyImmediateAllChildren<T>(Transform, Boolean) | Destroys all children GameObjects using DestroyImmediate() that have a given component type. | |
FindRecursive | Tries to find an object by its name in the given Transform or any of its children recursively | |
GetAllChildren | Gets all the children recursively under a given Transform. The list will not contain the source [!:transform] itself. | |
GetClosestAxis | Gets a vector representing the axis from a Transform that has the smallest angle to a given world-space vector. The returned vector may be any of the three positive or negative axes in world space of the Transform. | |
GetClosestLocalAxis | Gets a vector representing the axis from a Transform that has the smallest angle to a given world-space vector. The returned vector may be any of the three positive or negative axes in local space of the Transform. | |
GetCommonRootTransformFromSet | From a set of transforms, returns which one of them is a common root of all if any. The transform must be in the list itself. | |
GetFirstNonNullTransformFromSet | Gets the first non-null transform from a set of transforms. | |
GetLocalDirection | Gets the given direction in transform local coordinates. If transform is null, direction will be returned. | |
GetLocalPosition | Gets the given position in transform local coordinates. If transform is null, position will be returned. | |
GetLocalRotation | Gets the given rotation in transform local coordinates. If transform is null, rotation will be returned. | |
GetNthNonNullTransformFromSet | Gets the n-th non-null transform from a set of transforms. | |
GetParentRotation | Gets the parent rotation or the identity Quaternion if it doesn’t exist. | |
GetParentWorldMatrix | Gets the parent local to world transform matrix. | |
GetPathUnderScene | Gets the full GameObject path of a Transform in the hierarchy. | |
GetScaledVector(Transform, Vector3) | Gets a vector result of adding a Transform’s right, up and forward vectors scaled by the x, y and z values of a vector. | |
GetScaledVector(Transform, Single, Single, Single) | Gets a vector result of adding a Transform’s right, up and forward vectors scaled by x, y and z values respectively. | |
GetTransformsWithoutChildren | Gets all the transforms that don’t have any children. | |
GetUniqueScenePath | Gets a unique path name of Transform in the hierarchy. Adds a sibling index to the path to assure that siblings with the same name create different path names. | |
GetWiderBounds | Gets the bounds in the given transforms children with the largest squared length of the bounds size vector. | |
GetWiderBoundsInChildren | Gets the bounds in the given transform’s children with the largest squared length of the bounds size vector. | |
GetWorldDirection | Transforms a direction to world space. If transform is null, localDirection will be returned. | |
GetWorldPosition | Transforms a position to world space coordinates. If transform is null, localPosition will be returned. | |
GetWorldRotation | Transforms a rotation to world space. If transform is null, localRotation will be returned. | |
HasChild | Checks if a given transform has a given child in its hierarchy or if the transform is the child itself. | |
HasParent | Checks if a given transform has a given parent in its upwards hierarchy, or if it is the transform itself. | |
IncreaseLocalPosition | Adds x, y and z values to the localPosition of a given Transform. | |
IncreasePosition | Adds x, y and z values to the position of a given Transform. | |
InverseTransformBounds | Transforms a given Bounds object in world space to the local space of a Transform. | |
SetLocalPositionAndRotation | Sets the local position and local rotation in one go. | |
SetLocalPositionX | Sets the localPosition.x value of a given Transform. | |
SetLocalPositionY | Sets the localPosition.y value of a given Transform. | |
SetLocalPositionZ | Sets the localPosition.z value of a given Transform. | |
SetPositionAndRotation | Assigns a transform the same position and rotation from another. | |
SetPositionX | Sets the position.x value of a Transform. | |
SetPositionY | Sets the position.y value of a Transform. | |
SetPositionZ | Sets the position.z value of a Transform. | |
TransformBounds | Transforms a given Bounds object in local space using a Transform component. |