Vector3Ext ClassVector3 extensions.
Inheritance Hierarchy
System.Object
UltimateXR.Extensions.Unity.Math.Vector3Ext
Namespace: UltimateXR.Extensions.Unity.Math
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0
Syntax
C#
public static class Vector3Ext
The Vector3Ext type exposes the following members.
Properties
Name | Description | |
---|---|---|
MaxValue | Represents the Vector3 with maximum float values per component. | |
MinValue | Represents the Vector3 with minimum float values per component. | |
NaN | Represents the NaN vector, an invalid value. |
Methods
Name | Description | |
---|---|---|
Abs | Computes the absolute value of each component in a vector. | |
Average(IEnumerable(Vector3)) | Computes the average of a set of vectors. | |
Average(Vector3[]) | Computes the average of a set of vectors. | |
Clamp | Clamps Vector3 values component by component. | |
ClampToBox | Checks if a point is inside of a BoxCollider. If it is outside, it is clamped to remain inside. | |
ClampToSphere | Checks if a point is inside of a SphereCollider. If it is outside, it is clamped to remain inside. | |
DifferentComponentCount | Gets the number of components that are different between two vectors. | |
DistanceToLine | Computes the distance from a point to a line. | |
DistanceToPlane | Computes the signed distance from a point to a plane. | |
DistanceToSegment | Computes the distance from a point to a segment. | |
Divide | Divides a Vector3 by another, checking for divisions by 0. Divisions by 0 have a result of 0. | |
FillNanWith | Replaces NaN component values with other valid values. | |
GetClosestAxis | Gets the vector which is the dominant negative or positive axis it is mostly pointing towards. | |
GetClosestPointFromSegment | Computes the closest point in a segment to another point. | |
GetPerpendicularVector | Computes a perpendicular vector. | |
GetRotationAround(Vector3, Vector3, Single) | Computes the rotation of a direction around an axis. | |
GetRotationAround(Vector3, Vector3, Vector3, Single) | Computes the rotation of a point around a pivot and an axis. | |
Inverse | returns a vector with all components containing 1/component, checking for divisions by 0. Divisions by 0 have a result of 0. | |
IsInfinity | Checks whether the given vector has any infinity component. | |
IsInsideBox(Vector3, BoxCollider, Vector3, Boolean) | Checks if a point is inside of a BoxCollider. | |
IsInsideBox(Vector3, Vector3, Quaternion, Vector3, Vector3, Vector3, Vector3) | Checks if a point is inside of a box. | |
IsInsideSphere | Checks if a point is inside a sphere. Supports spheres without uniform scaling. | |
IsNaN | Checks whether the given vector has any NaN component. | |
IsValid | Checks whether the given vector contains valid data. | |
Max(IEnumerable(Vector3)) | Computes the maximum values of a set of vectors. | |
Max(Vector3[]) | Computes the maximum values of a set of vectors. | |
Min(IEnumerable(Vector3)) | Computes the minimum values of a set of vectors. | |
Min(Vector3[]) | Computes the minimum values of a set of vectors. | |
Multiply | Multiplies two Vector3 component by component. | |
Parse | Parses a Vector3 from a string. | |
ParseAsync | Tries to parse a Vector3 from a string, asynchronously. | |
ToEuler180 | Fixes Euler angles so that they are always in the -180, 180 degrees range. | |
ToVector3 | Transforms an array of floats to a Vector3 component by component. If there are not enough values to read, the remaining values are set to NaN. | |
TryParse | Tries to parse a Vector3 from a string. |