C# Класс Box2D.Common.Vec2

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
X float
Y float

Открытые методы

Метод Описание
Abs ( ) : Vec2

Return a new vector that has positive components.

Abs ( Vec2 a ) : Vec2
AbsLocal ( ) : void
AbsToOut ( Vec2 a, Vec2 result ) : void
Add ( Vec2 v ) : Vec2

Return the sum of this vector and another; does not alter either one.

AddLocal ( Vec2 v ) : Vec2

Add another vector to this one and returns result - alters this vector.

AddLocal ( float x, float y ) : Vec2

Adds values to this vector and returns result - alters this vector.

Clone ( ) : Vec2

Return a copy of this vector.

Cross ( Vec2 a, float s ) : Vec2
Cross ( float s, Vec2 a ) : Vec2
Cross ( Vec2 a, Vec2 b ) : float
CrossToOut ( Vec2 a, float s, Vec2 result ) : void
CrossToOut ( float s, Vec2 a, Vec2 result ) : void
CrossToOutUnsafe ( Vec2 a, float s, Vec2 result ) : void
CrossToOutUnsafe ( float s, Vec2 a, Vec2 result ) : void
Dot ( Vec2 a, Vec2 b ) : float
Equals ( Object obj ) : bool
GetHashCode ( ) : int
Length ( ) : float

Return the length of this vector.

LengthSquared ( ) : float

Return the squared length of this vector.

Max ( Vec2 a, Vec2 b ) : Vec2
MaxToOut ( Vec2 a, Vec2 b, Vec2 result ) : void
Min ( Vec2 a, Vec2 b ) : Vec2
MinToOut ( Vec2 a, Vec2 b, Vec2 result ) : void
Mul ( float a ) : Vec2

Return this vector multiplied by a scalar; does not alter this vector.

MulLocal ( float a ) : Vec2

Multiply this vector by a number and return result - alters this vector.

Negate ( ) : Vec2

Return the negation of this vector; does not alter this vector.

NegateLocal ( ) : Vec2

Flip the vector and return it - alters this vector.

NegateToOut ( Vec2 a, Vec2 result ) : void
Normalize ( ) : float

Normalize this vector and return the length before normalization. Alters this vector.

Set ( Vec2 v ) : Vec2

Set this vector to another vector.

Set ( float x, float y ) : Vec2

Set the vector component-wise.

SetZero ( ) : void

Zero out this vector.

Skew ( ) : Vec2

Get the skew vector such that dot(skew_vec, other) == cross(vec, other)

Skew ( Vec2 result ) : void

Get the skew vector such that dot(skew_vec, other) == cross(vec, other)

Sub ( Vec2 v ) : Vec2

Return the difference of this vector and another; does not alter either one.

SubLocal ( Vec2 v ) : Vec2

Subtract another vector from this one and return result - alters this vector.

ToString ( ) : String
Vec2 ( ) : System
Vec2 ( Vec2 toCopy ) : System
Vec2 ( float x, float y ) : System

Приватные методы

Метод Описание
FloatToIntBits ( float number ) : int

Описание методов

Abs() публичный метод

Return a new vector that has positive components.
public Abs ( ) : Vec2
Результат Vec2

Abs() публичный статический метод

public static Abs ( Vec2 a ) : Vec2
a Vec2
Результат Vec2

AbsLocal() публичный метод

public AbsLocal ( ) : void
Результат void

AbsToOut() публичный статический метод

public static AbsToOut ( Vec2 a, Vec2 result ) : void
a Vec2
result Vec2
Результат void

Add() публичный метод

Return the sum of this vector and another; does not alter either one.
public Add ( Vec2 v ) : Vec2
v Vec2
Результат Vec2

AddLocal() публичный метод

Add another vector to this one and returns result - alters this vector.
public AddLocal ( Vec2 v ) : Vec2
v Vec2
Результат Vec2

AddLocal() публичный метод

Adds values to this vector and returns result - alters this vector.
public AddLocal ( float x, float y ) : Vec2
x float
y float
Результат Vec2

Clone() публичный метод

Return a copy of this vector.
public Clone ( ) : Vec2
Результат Vec2

Cross() публичный статический метод

public static Cross ( Vec2 a, float s ) : Vec2
a Vec2
s float
Результат Vec2

Cross() публичный статический метод

public static Cross ( float s, Vec2 a ) : Vec2
s float
a Vec2
Результат Vec2

Cross() публичный статический метод

public static Cross ( Vec2 a, Vec2 b ) : float
a Vec2
b Vec2
Результат float

CrossToOut() публичный статический метод

public static CrossToOut ( Vec2 a, float s, Vec2 result ) : void
a Vec2
s float
result Vec2
Результат void

CrossToOut() публичный статический метод

public static CrossToOut ( float s, Vec2 a, Vec2 result ) : void
s float
a Vec2
result Vec2
Результат void

CrossToOutUnsafe() публичный статический метод

public static CrossToOutUnsafe ( Vec2 a, float s, Vec2 result ) : void
a Vec2
s float
result Vec2
Результат void

CrossToOutUnsafe() публичный статический метод

public static CrossToOutUnsafe ( float s, Vec2 a, Vec2 result ) : void
s float
a Vec2
result Vec2
Результат void

Dot() публичный статический метод

public static Dot ( Vec2 a, Vec2 b ) : float
a Vec2
b Vec2
Результат float

Equals() публичный метод

public Equals ( Object obj ) : bool
obj Object
Результат bool

GetHashCode() публичный метод

public GetHashCode ( ) : int
Результат int

Length() публичный метод

Return the length of this vector.
public Length ( ) : float
Результат float

LengthSquared() публичный метод

Return the squared length of this vector.
public LengthSquared ( ) : float
Результат float

Max() публичный статический метод

public static Max ( Vec2 a, Vec2 b ) : Vec2
a Vec2
b Vec2
Результат Vec2

MaxToOut() публичный статический метод

public static MaxToOut ( Vec2 a, Vec2 b, Vec2 result ) : void
a Vec2
b Vec2
result Vec2
Результат void

Min() публичный статический метод

public static Min ( Vec2 a, Vec2 b ) : Vec2
a Vec2
b Vec2
Результат Vec2

MinToOut() публичный статический метод

public static MinToOut ( Vec2 a, Vec2 b, Vec2 result ) : void
a Vec2
b Vec2
result Vec2
Результат void

Mul() публичный метод

Return this vector multiplied by a scalar; does not alter this vector.
public Mul ( float a ) : Vec2
a float
Результат Vec2

MulLocal() публичный метод

Multiply this vector by a number and return result - alters this vector.
public MulLocal ( float a ) : Vec2
a float
Результат Vec2

Negate() публичный метод

Return the negation of this vector; does not alter this vector.
public Negate ( ) : Vec2
Результат Vec2

NegateLocal() публичный метод

Flip the vector and return it - alters this vector.
public NegateLocal ( ) : Vec2
Результат Vec2

NegateToOut() публичный статический метод

public static NegateToOut ( Vec2 a, Vec2 result ) : void
a Vec2
result Vec2
Результат void

Normalize() публичный метод

Normalize this vector and return the length before normalization. Alters this vector.
public Normalize ( ) : float
Результат float

Set() публичный метод

Set this vector to another vector.
public Set ( Vec2 v ) : Vec2
v Vec2
Результат Vec2

Set() публичный метод

Set the vector component-wise.
public Set ( float x, float y ) : Vec2
x float
y float
Результат Vec2

SetZero() публичный метод

Zero out this vector.
public SetZero ( ) : void
Результат void

Skew() публичный метод

Get the skew vector such that dot(skew_vec, other) == cross(vec, other)
public Skew ( ) : Vec2
Результат Vec2

Skew() публичный метод

Get the skew vector such that dot(skew_vec, other) == cross(vec, other)
public Skew ( Vec2 result ) : void
result Vec2
Результат void

Sub() публичный метод

Return the difference of this vector and another; does not alter either one.
public Sub ( Vec2 v ) : Vec2
v Vec2
Результат Vec2

SubLocal() публичный метод

Subtract another vector from this one and return result - alters this vector.
public SubLocal ( Vec2 v ) : Vec2
v Vec2
Результат Vec2

ToString() публичный метод

public ToString ( ) : String
Результат String

Vec2() публичный метод

public Vec2 ( ) : System
Результат System

Vec2() публичный метод

public Vec2 ( Vec2 toCopy ) : System
toCopy Vec2
Результат System

Vec2() публичный метод

public Vec2 ( float x, float y ) : System
x float
y float
Результат System

Описание свойств

X публичное свойство

public float X
Результат float

Y публичное свойство

public float Y
Результат float