C# Class Box2D.Common.Vec2

Datei anzeigen Open project: gerich-home/box2dnet Class Usage Examples

Public Properties

Property Type Description
X float
Y float

Public Methods

Method Description
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

Private Methods

Method Description
FloatToIntBits ( float number ) : int

Method Details

Abs() public method

Return a new vector that has positive components.
public Abs ( ) : Vec2
return Vec2

Abs() public static method

public static Abs ( Vec2 a ) : Vec2
a Vec2
return Vec2

AbsLocal() public method

public AbsLocal ( ) : void
return void

AbsToOut() public static method

public static AbsToOut ( Vec2 a, Vec2 result ) : void
a Vec2
result Vec2
return void

Add() public method

Return the sum of this vector and another; does not alter either one.
public Add ( Vec2 v ) : Vec2
v Vec2
return Vec2

AddLocal() public method

Add another vector to this one and returns result - alters this vector.
public AddLocal ( Vec2 v ) : Vec2
v Vec2
return Vec2

AddLocal() public method

Adds values to this vector and returns result - alters this vector.
public AddLocal ( float x, float y ) : Vec2
x float
y float
return Vec2

Clone() public method

Return a copy of this vector.
public Clone ( ) : Vec2
return Vec2

Cross() public static method

public static Cross ( Vec2 a, float s ) : Vec2
a Vec2
s float
return Vec2

Cross() public static method

public static Cross ( float s, Vec2 a ) : Vec2
s float
a Vec2
return Vec2

Cross() public static method

public static Cross ( Vec2 a, Vec2 b ) : float
a Vec2
b Vec2
return float

CrossToOut() public static method

public static CrossToOut ( Vec2 a, float s, Vec2 result ) : void
a Vec2
s float
result Vec2
return void

CrossToOut() public static method

public static CrossToOut ( float s, Vec2 a, Vec2 result ) : void
s float
a Vec2
result Vec2
return void

CrossToOutUnsafe() public static method

public static CrossToOutUnsafe ( Vec2 a, float s, Vec2 result ) : void
a Vec2
s float
result Vec2
return void

CrossToOutUnsafe() public static method

public static CrossToOutUnsafe ( float s, Vec2 a, Vec2 result ) : void
s float
a Vec2
result Vec2
return void

Dot() public static method

public static Dot ( Vec2 a, Vec2 b ) : float
a Vec2
b Vec2
return float

Equals() public method

public Equals ( Object obj ) : bool
obj Object
return bool

GetHashCode() public method

public GetHashCode ( ) : int
return int

Length() public method

Return the length of this vector.
public Length ( ) : float
return float

LengthSquared() public method

Return the squared length of this vector.
public LengthSquared ( ) : float
return float

Max() public static method

public static Max ( Vec2 a, Vec2 b ) : Vec2
a Vec2
b Vec2
return Vec2

MaxToOut() public static method

public static MaxToOut ( Vec2 a, Vec2 b, Vec2 result ) : void
a Vec2
b Vec2
result Vec2
return void

Min() public static method

public static Min ( Vec2 a, Vec2 b ) : Vec2
a Vec2
b Vec2
return Vec2

MinToOut() public static method

public static MinToOut ( Vec2 a, Vec2 b, Vec2 result ) : void
a Vec2
b Vec2
result Vec2
return void

Mul() public method

Return this vector multiplied by a scalar; does not alter this vector.
public Mul ( float a ) : Vec2
a float
return Vec2

MulLocal() public method

Multiply this vector by a number and return result - alters this vector.
public MulLocal ( float a ) : Vec2
a float
return Vec2

Negate() public method

Return the negation of this vector; does not alter this vector.
public Negate ( ) : Vec2
return Vec2

NegateLocal() public method

Flip the vector and return it - alters this vector.
public NegateLocal ( ) : Vec2
return Vec2

NegateToOut() public static method

public static NegateToOut ( Vec2 a, Vec2 result ) : void
a Vec2
result Vec2
return void

Normalize() public method

Normalize this vector and return the length before normalization. Alters this vector.
public Normalize ( ) : float
return float

Set() public method

Set this vector to another vector.
public Set ( Vec2 v ) : Vec2
v Vec2
return Vec2

Set() public method

Set the vector component-wise.
public Set ( float x, float y ) : Vec2
x float
y float
return Vec2

SetZero() public method

Zero out this vector.
public SetZero ( ) : void
return void

Skew() public method

Get the skew vector such that dot(skew_vec, other) == cross(vec, other)
public Skew ( ) : Vec2
return Vec2

Skew() public method

Get the skew vector such that dot(skew_vec, other) == cross(vec, other)
public Skew ( Vec2 result ) : void
result Vec2
return void

Sub() public method

Return the difference of this vector and another; does not alter either one.
public Sub ( Vec2 v ) : Vec2
v Vec2
return Vec2

SubLocal() public method

Subtract another vector from this one and return result - alters this vector.
public SubLocal ( Vec2 v ) : Vec2
v Vec2
return Vec2

ToString() public method

public ToString ( ) : String
return String

Vec2() public method

public Vec2 ( ) : System
return System

Vec2() public method

public Vec2 ( Vec2 toCopy ) : System
toCopy Vec2
return System

Vec2() public method

public Vec2 ( float x, float y ) : System
x float
y float
return System

Property Details

X public_oe property

public float X
return float

Y public_oe property

public float Y
return float