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

NameDescription
Public propertyStatic memberMaxValue Represents the Vector3 with maximum float values per component.
Public propertyStatic memberMinValue Represents the Vector3 with minimum float values per component.
Public propertyStatic memberNaN Represents the NaN vector, an invalid value.

Methods

NameDescription
Public methodStatic memberAbs Computes the absolute value of each component in a vector.
Public methodStatic memberAverage(IEnumerable(Vector3)) Computes the average of a set of vectors.
Public methodStatic memberAverage(Vector3[]) Computes the average of a set of vectors.
Public methodStatic memberClamp Clamps Vector3 values component by component.
Public methodStatic memberClampToBox Checks if a point is inside of a BoxCollider. If it is outside, it is clamped to remain inside.
Public methodStatic memberClampToSphere Checks if a point is inside of a SphereCollider. If it is outside, it is clamped to remain inside.
Public methodStatic memberDifferentComponentCount Gets the number of components that are different between two vectors.
Public methodStatic memberDistanceToLine Computes the distance from a point to a line.
Public methodStatic memberDistanceToPlane Computes the signed distance from a point to a plane.
Public methodStatic memberDistanceToSegment Computes the distance from a point to a segment.
Public methodStatic memberDivide Divides a Vector3 by another, checking for divisions by 0. Divisions by 0 have a result of 0.
Public methodStatic memberFillNanWith Replaces NaN component values with other valid values.
Public methodStatic memberGetClosestAxis Gets the vector which is the dominant negative or positive axis it is mostly pointing towards.
Public methodStatic memberGetClosestPointFromSegment Computes the closest point in a segment to another point.
Public methodStatic memberGetPerpendicularVector Computes a perpendicular vector.
Public methodStatic memberGetRotationAround(Vector3, Vector3, Single) Computes the rotation of a direction around an axis.
Public methodStatic memberGetRotationAround(Vector3, Vector3, Vector3, Single) Computes the rotation of a point around a pivot and an axis.
Public methodStatic memberInverse returns a vector with all components containing 1/component, checking for divisions by 0. Divisions by 0 have a result of 0.
Public methodStatic memberIsInfinity Checks whether the given vector has any infinity component.
Public methodStatic memberIsInsideBox(Vector3, BoxCollider, Vector3, Boolean) Checks if a point is inside of a BoxCollider.
Public methodStatic memberIsInsideBox(Vector3, Vector3, Quaternion, Vector3, Vector3, Vector3, Vector3) Checks if a point is inside of a box.
Public methodStatic memberIsInsideSphere Checks if a point is inside a sphere. Supports spheres without uniform scaling.
Public methodStatic memberIsNaN Checks whether the given vector has any NaN component.
Public methodStatic memberIsValid Checks whether the given vector contains valid data.
Public methodStatic memberMax(IEnumerable(Vector3)) Computes the maximum values of a set of vectors.
Public methodStatic memberMax(Vector3[]) Computes the maximum values of a set of vectors.
Public methodStatic memberMin(IEnumerable(Vector3)) Computes the minimum values of a set of vectors.
Public methodStatic memberMin(Vector3[]) Computes the minimum values of a set of vectors.
Public methodStatic memberMultiply Multiplies two Vector3 component by component.
Public methodStatic memberParse Parses a Vector3 from a string.
Public methodStatic memberParseAsync Tries to parse a Vector3 from a string, asynchronously.
Public methodStatic memberToEuler180 Fixes Euler angles so that they are always in the -180, 180 degrees range.
Public methodStatic memberToVector3 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.
Public methodStatic memberTryParse Tries to parse a Vector3 from a string.

See Also

Reference

UltimateXR.Extensions.Unity.Math Namespace