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

NameDescription
Public methodStatic memberAlignChildrenOnAxis Aligns all children of a given component on an axis.
Public methodStatic memberAlignOnAxis Aligns a set of transforms on an axis.
Public methodStatic memberApplyAlignment(Transform, Quaternion, Quaternion, Single) Applies the transformation to make a rotation defined by sourceRotation rotate towards targetRotation.
Public methodStatic memberApplyAlignment(Transform, Transform, Transform, Boolean, Boolean, Single) Applies the transformation required to make sourceAlign align with targetAlign.
Public methodStatic memberApplyAlignment(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.
Public methodStatic memberApplyAlignment(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.
Public methodStatic memberApplyInterpolation Applies an interpolation between two other transforms.
Public methodStatic memberApplyMirroring(Transform, Transform, UxrAxis, TransformExt.MirrorType, Boolean, Boolean) Applies a mirroring to a transform.
Public methodStatic memberApplyMirroring(Transform, Vector3, Vector3, TransformExt.MirrorType, Boolean, Boolean) Applies a mirroring to a transform.
Public methodStatic memberCalculateBounds(BoxCollider, Space) Gets the bounds of a BoxCollider in a given space.
Public methodStatic memberCalculateBounds(IEnumerable(Transform), Space, Boolean) Gets the bounds in a given space of all MeshRenderers in a set of Transforms.
Public methodStatic memberCalculateBounds(Transform, Space, Boolean) Computes the bounds of all MeshRenderers that hang from a parent transform.
Public methodStatic memberCalculateRectBounds Computes the bounds containing a RectTransform’s rect.
Public methodStatic memberClampPositionToBox Constraints the given transform position to the volume specified by a box collider.
Public methodStatic memberDestroyAllChildren(Transform) Destroys all children using Destroy().
Public methodStatic memberDestroyAllChildren<T>(Transform, Boolean) Destroys all children GameObjects using Destroy() that have a given component type.
Public methodStatic memberDestroyImmediateAllChildren(Transform) Destroys all children using DestroyImmediate().
Public methodStatic memberDestroyImmediateAllChildren<T>(Transform, Boolean) Destroys all children GameObjects using DestroyImmediate() that have a given component type.
Public methodStatic memberFindRecursive Tries to find an object by its name in the given Transform or any of its children recursively
Public methodStatic memberGetAllChildren Gets all the children recursively under a given Transform. The list will not contain the source [!:transform] itself.
Public methodStatic memberGetClosestAxis 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.
Public methodStatic memberGetClosestLocalAxis 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.
Public methodStatic memberGetCommonRootTransformFromSet 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.
Public methodStatic memberGetFirstNonNullTransformFromSet Gets the first non-null transform from a set of transforms.
Public methodStatic memberGetLocalDirection Gets the given direction in transform local coordinates. If transform is null, direction will be returned.
Public methodStatic memberGetLocalPosition Gets the given position in transform local coordinates. If transform is null, position will be returned.
Public methodStatic memberGetLocalRotation Gets the given rotation in transform local coordinates. If transform is null, rotation will be returned.
Public methodStatic memberGetNthNonNullTransformFromSet Gets the n-th non-null transform from a set of transforms.
Public methodStatic memberGetParentRotation Gets the parent rotation or the identity Quaternion if it doesn’t exist.
Public methodStatic memberGetParentWorldMatrix Gets the parent local to world transform matrix.
Public methodStatic memberGetPathUnderScene Gets the full GameObject path of a Transform in the hierarchy.
Public methodStatic memberGetScaledVector(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.
Public methodStatic memberGetScaledVector(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.
Public methodStatic memberGetTransformsWithoutChildren Gets all the transforms that don’t have any children.
Public methodStatic memberGetUniqueScenePath 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.
Public methodStatic memberGetWiderBounds Gets the bounds in the given transforms children with the largest squared length of the bounds size vector.
Public methodStatic memberGetWiderBoundsInChildren Gets the bounds in the given transform’s children with the largest squared length of the bounds size vector.
Public methodStatic memberGetWorldDirection Transforms a direction to world space. If transform is null, localDirection will be returned.
Public methodStatic memberGetWorldPosition Transforms a position to world space coordinates. If transform is null, localPosition will be returned.
Public methodStatic memberGetWorldRotation Transforms a rotation to world space. If transform is null, localRotation will be returned.
Public methodStatic memberHasChild Checks if a given transform has a given child in its hierarchy or if the transform is the child itself.
Public methodStatic memberHasParent Checks if a given transform has a given parent in its upwards hierarchy, or if it is the transform itself.
Public methodStatic memberIncreaseLocalPosition Adds x, y and z values to the localPosition of a given Transform.
Public methodStatic memberIncreasePosition Adds x, y and z values to the position of a given Transform.
Public methodStatic memberInverseTransformBounds Transforms a given Bounds object in world space to the local space of a Transform.
Public methodStatic memberSetLocalPositionAndRotation Sets the local position and local rotation in one go.
Public methodStatic memberSetLocalPositionX Sets the localPosition.x value of a given Transform.
Public methodStatic memberSetLocalPositionY Sets the localPosition.y value of a given Transform.
Public methodStatic memberSetLocalPositionZ Sets the localPosition.z value of a given Transform.
Public methodStatic memberSetPositionAndRotation Assigns a transform the same position and rotation from another.
Public methodStatic memberSetPositionX Sets the position.x value of a Transform.
Public methodStatic memberSetPositionY Sets the position.y value of a Transform.
Public methodStatic memberSetPositionZ Sets the position.z value of a Transform.
Public methodStatic memberTransformBounds Transforms a given Bounds object in local space using a Transform component.

See Also

Reference

UltimateXR.Extensions.Unity Namespace