C# Class GGJ.Utils.Vector3Extensions

Datei anzeigen Open project: TORISOUP/Born_to_Beans_src

Public Methods

Method Description
GetAround2D ( this origin, float radius ) : Vector3

指定座標の周辺ランダムで返す

GetDistance ( this origin, Vector3 target ) : float

ターゲットとの距離を返す

GetDistance2D ( this origin, Vector3 target ) : float

ターゲットとの高さを無視した距離を返す

GetTowardNormalizedVector ( this origin, Vector3 factor ) : Vector3

対象を指す方向ベクトルを計算する

ProductOneToOne ( this origin, Vector3 factor ) : Vector3

ベクトルを各要素1対1に掛け合わせる

ProductOneToOne ( this origin, float x, float y, float z ) : Vector3
SetX ( this origin, float X ) : Vector3

Xを上書きしたベクトルを返す

SetY ( this origin, float Y ) : Vector3
SetZ ( this origin, float Z ) : Vector3
SuppressY ( this origin ) : Vector3

Yを0にして、それを正規化したベクトルを返す

Method Details

GetAround2D() public static method

指定座標の周辺ランダムで返す
public static GetAround2D ( this origin, float radius ) : Vector3
origin this
radius float
return UnityEngine.Vector3

GetDistance() public static method

ターゲットとの距離を返す
public static GetDistance ( this origin, Vector3 target ) : float
origin this
target UnityEngine.Vector3
return float

GetDistance2D() public static method

ターゲットとの高さを無視した距離を返す
public static GetDistance2D ( this origin, Vector3 target ) : float
origin this
target UnityEngine.Vector3
return float

GetTowardNormalizedVector() public static method

対象を指す方向ベクトルを計算する
public static GetTowardNormalizedVector ( this origin, Vector3 factor ) : Vector3
origin this
factor UnityEngine.Vector3
return UnityEngine.Vector3

ProductOneToOne() public static method

ベクトルを各要素1対1に掛け合わせる
public static ProductOneToOne ( this origin, Vector3 factor ) : Vector3
origin this
factor UnityEngine.Vector3
return UnityEngine.Vector3

ProductOneToOne() public static method

public static ProductOneToOne ( this origin, float x, float y, float z ) : Vector3
origin this
x float
y float
z float
return UnityEngine.Vector3

SetX() public static method

Xを上書きしたベクトルを返す
public static SetX ( this origin, float X ) : Vector3
origin this
X float
return UnityEngine.Vector3

SetY() public static method

public static SetY ( this origin, float Y ) : Vector3
origin this
Y float
return UnityEngine.Vector3

SetZ() public static method

public static SetZ ( this origin, float Z ) : Vector3
origin this
Z float
return UnityEngine.Vector3

SuppressY() public static method

Yを0にして、それを正規化したベクトルを返す
public static SuppressY ( this origin ) : Vector3
origin this
return UnityEngine.Vector3