Class HVRUtilities
Inheritance
System.Object
HVRUtilities
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: HurricaneVR.Framework.dll
Syntax
public static class HVRUtilities
Methods
|
Improve this Doc
View Source
AngularVelocity(Quaternion, Quaternion)
Declaration
public static Vector3 AngularVelocity(this Quaternion current, Quaternion previous)
Parameters
Type |
Name |
Description |
UnityEngine.Quaternion |
current |
|
UnityEngine.Quaternion |
previous |
|
Returns
Type |
Description |
UnityEngine.Vector3 |
|
|
Improve this Doc
View Source
ComputeClosestVector(Vector3, Vector3, Vector3, Boolean)
Declaration
public static Vector3 ComputeClosestVector(Vector3 v, Vector3 v1, Vector3 v2, bool fixDirection = true)
Parameters
Type |
Name |
Description |
UnityEngine.Vector3 |
v |
|
UnityEngine.Vector3 |
v1 |
|
UnityEngine.Vector3 |
v2 |
|
System.Boolean |
fixDirection |
|
Returns
Type |
Description |
UnityEngine.Vector3 |
|
|
Improve this Doc
View Source
CubicBezier(Vector3, Vector3, Vector3, Vector3, Single)
Declaration
public static Vector3 CubicBezier(Vector3 p0, Vector3 p1, Vector3 p2, Vector3 p3, float t)
Parameters
Type |
Name |
Description |
UnityEngine.Vector3 |
p0 |
|
UnityEngine.Vector3 |
p1 |
|
UnityEngine.Vector3 |
p2 |
|
UnityEngine.Vector3 |
p3 |
|
System.Single |
t |
|
Returns
Type |
Description |
UnityEngine.Vector3 |
|
|
Improve this Doc
View Source
DrawBounds(Bounds)
Declaration
public static void DrawBounds(this Bounds bounds)
Parameters
Type |
Name |
Description |
UnityEngine.Bounds |
bounds |
|
|
Improve this Doc
View Source
EnsureComponent<T>(GameObject)
Declaration
public static T EnsureComponent<T>(this GameObject obj)
where T : Component
Parameters
Type |
Name |
Description |
UnityEngine.GameObject |
obj |
|
Returns
Type Parameters
|
Improve this Doc
View Source
Declaration
public static T EnsureComponent<T>(this Transform t)
where T : Component
Parameters
Type |
Name |
Description |
UnityEngine.Transform |
t |
|
Returns
Type Parameters
|
Improve this Doc
View Source
FindNearestPointOnLine(Vector3, Vector3, Vector3)
Declaration
public static Vector3 FindNearestPointOnLine(Vector3 origin, Vector3 end, Vector3 point)
Parameters
Type |
Name |
Description |
UnityEngine.Vector3 |
origin |
|
UnityEngine.Vector3 |
end |
|
UnityEngine.Vector3 |
point |
|
Returns
Type |
Description |
UnityEngine.Vector3 |
|
|
Improve this Doc
View Source
GetBottom(CapsuleCollider)
Declaration
public static Vector3 GetBottom(this CapsuleCollider capsule)
Parameters
Type |
Name |
Description |
UnityEngine.CapsuleCollider |
capsule |
|
Returns
Type |
Description |
UnityEngine.Vector3 |
|
|
Improve this Doc
View Source
GetBottom(CharacterController)
Declaration
public static Vector3 GetBottom(this CharacterController capsule)
Parameters
Type |
Name |
Description |
UnityEngine.CharacterController |
capsule |
|
Returns
Type |
Description |
UnityEngine.Vector3 |
|
|
Improve this Doc
View Source
GetColliderBounds(List<Collider>)
Declaration
public static Bounds GetColliderBounds(this List<Collider> colliders)
Parameters
Type |
Name |
Description |
System.Collections.Generic.List<UnityEngine.Collider> |
colliders |
|
Returns
Type |
Description |
UnityEngine.Bounds |
|
|
Improve this Doc
View Source
GetColliderBounds(Collider[])
Declaration
public static Bounds GetColliderBounds(this Collider[] colliders)
Parameters
Type |
Name |
Description |
UnityEngine.Collider[] |
colliders |
|
Returns
Type |
Description |
UnityEngine.Bounds |
|
|
Improve this Doc
View Source
GetColliderBounds(GameObject)
Declaration
public static Bounds GetColliderBounds(this GameObject go)
Parameters
Type |
Name |
Description |
UnityEngine.GameObject |
go |
|
Returns
Type |
Description |
UnityEngine.Bounds |
|
|
Improve this Doc
View Source
GetColliderBounds(Rigidbody)
Declaration
public static Bounds GetColliderBounds(this Rigidbody rb)
Parameters
Type |
Name |
Description |
UnityEngine.Rigidbody |
rb |
|
Returns
Type |
Description |
UnityEngine.Bounds |
|
|
Improve this Doc
View Source
Declaration
public static Bounds GetColliderBounds(this Transform transform)
Parameters
Type |
Name |
Description |
UnityEngine.Transform |
transform |
|
Returns
Type |
Description |
UnityEngine.Bounds |
|
|
Improve this Doc
View Source
GetColliders(GameObject, Boolean)
Declaration
public static List<Collider> GetColliders(this GameObject go, bool includedTriggers = false)
Parameters
Type |
Name |
Description |
UnityEngine.GameObject |
go |
|
System.Boolean |
includedTriggers |
|
Returns
Type |
Description |
System.Collections.Generic.List<UnityEngine.Collider> |
|
|
Improve this Doc
View Source
GetColliders(Rigidbody, Boolean)
Declaration
public static IEnumerable<Collider> GetColliders(this Rigidbody rigidbody, bool includeTriggers = false)
Parameters
Type |
Name |
Description |
UnityEngine.Rigidbody |
rigidbody |
|
System.Boolean |
includeTriggers |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<UnityEngine.Collider> |
|
|
Improve this Doc
View Source
GetHVRAxis(Vector3)
Declaration
public static HVRAxis GetHVRAxis(this Vector3 v)
Parameters
Type |
Name |
Description |
UnityEngine.Vector3 |
v |
|
Returns
|
Improve this Doc
View Source
GetRandom<T>(T[])
Declaration
public static T GetRandom<T>(this T[] array)
Parameters
Type |
Name |
Description |
T[] |
array |
|
Returns
Type Parameters
|
Improve this Doc
View Source
GetRelativeRotation(Component, Quaternion)
returns the rotation of rotation relative to 'relativeTo'
Declaration
public static Quaternion GetRelativeRotation(this Component relativeTo, Quaternion rotation)
Parameters
Type |
Name |
Description |
UnityEngine.Component |
relativeTo |
|
UnityEngine.Quaternion |
rotation |
|
Returns
Type |
Description |
UnityEngine.Quaternion |
|
|
Improve this Doc
View Source
GetRelativeValues(Component, Component, out Vector3, out Quaternion)
return the position and rotation of target relative to relativeTo
Declaration
public static void GetRelativeValues(this Component relativeTo, Component target, out Vector3 pos, out Quaternion rot)
Parameters
Type |
Name |
Description |
UnityEngine.Component |
relativeTo |
|
UnityEngine.Component |
target |
|
UnityEngine.Vector3 |
pos |
|
UnityEngine.Quaternion |
rot |
|
|
Improve this Doc
View Source
return the position and rotation of target relative to relativeTo
Declaration
public static void GetRelativeValues(this Component relativeTo, Transform target, out Vector3 pos, out Quaternion rot)
Parameters
Type |
Name |
Description |
UnityEngine.Component |
relativeTo |
|
UnityEngine.Transform |
target |
|
UnityEngine.Vector3 |
pos |
|
UnityEngine.Quaternion |
rot |
|
|
Improve this Doc
View Source
return the position and rotation of target relative to relativeTo
Declaration
public static void GetRelativeValues(this Transform relativeTo, Transform target, out Vector3 pos, out Quaternion rot)
Parameters
Type |
Name |
Description |
UnityEngine.Transform |
relativeTo |
|
UnityEngine.Transform |
target |
|
UnityEngine.Vector3 |
pos |
|
UnityEngine.Quaternion |
rot |
|
|
Improve this Doc
View Source
GetVector(HVRAxis)
Declaration
public static Vector3 GetVector(this HVRAxis axis)
Parameters
Returns
Type |
Description |
UnityEngine.Vector3 |
|
|
Improve this Doc
View Source
IsInfinity(Vector3)
Is any component infinity
Declaration
public static bool IsInfinity(this Vector3 v)
Parameters
Type |
Name |
Description |
UnityEngine.Vector3 |
v |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsInvalid(Vector3)
Is any component nan or infinity
Declaration
public static bool IsInvalid(this Vector3 v)
Parameters
Type |
Name |
Description |
UnityEngine.Vector3 |
v |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsNaN(Vector3)
Declaration
public static bool IsNaN(this Vector3 v)
Parameters
Type |
Name |
Description |
UnityEngine.Vector3 |
v |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Declaration
public static string LogFormat(this Vector3 v)
Parameters
Type |
Name |
Description |
UnityEngine.Vector3 |
v |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Declaration
public static string LogFormatF0(this Vector3 v)
Parameters
Type |
Name |
Description |
UnityEngine.Vector3 |
v |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
OrthogonalVector(Vector3)
Declaration
public static Vector3 OrthogonalVector(this Vector3 v)
Parameters
Type |
Name |
Description |
UnityEngine.Vector3 |
v |
|
Returns
Type |
Description |
UnityEngine.Vector3 |
|
|
Improve this Doc
View Source
QuadraticBezier(Vector3, Vector3, Vector3, Single)
Declaration
public static Vector3 QuadraticBezier(Vector3 p0, Vector3 p1, Vector3 p2, float t)
Parameters
Type |
Name |
Description |
UnityEngine.Vector3 |
p0 |
|
UnityEngine.Vector3 |
p1 |
|
UnityEngine.Vector3 |
p2 |
|
System.Single |
t |
|
Returns
Type |
Description |
UnityEngine.Vector3 |
|
|
Improve this Doc
View Source
Remap(Single, Single, Single, Single, Single)
Declaration
public static float Remap(this float num, float lowVal, float highVal, float min, float max)
Parameters
Type |
Name |
Description |
System.Single |
num |
|
System.Single |
lowVal |
|
System.Single |
highVal |
|
System.Single |
min |
|
System.Single |
max |
|
Returns
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
SetKinematic(Rigidbody)
Declaration
public static void SetKinematic(this Rigidbody rb)
Parameters
Type |
Name |
Description |
UnityEngine.Rigidbody |
rb |
|