C# Class Box2D.Common.Vec2

Afficher le fichier Open project: gerich-home/box2dnet Class Usage Examples

Méthodes publiques

Свойство Type Description
X float
Y float

Méthodes publiques

Méthode 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

Méthode Description
FloatToIntBits ( float number ) : int

Method Details

Abs() public méthode

Return a new vector that has positive components.
public Abs ( ) : Vec2
Résultat Vec2

Abs() public static méthode

public static Abs ( Vec2 a ) : Vec2
a Vec2
Résultat Vec2

AbsLocal() public méthode

public AbsLocal ( ) : void
Résultat void

AbsToOut() public static méthode

public static AbsToOut ( Vec2 a, Vec2 result ) : void
a Vec2
result Vec2
Résultat void

Add() public méthode

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

AddLocal() public méthode

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

AddLocal() public méthode

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

Clone() public méthode

Return a copy of this vector.
public Clone ( ) : Vec2
Résultat Vec2

Cross() public static méthode

public static Cross ( Vec2 a, float s ) : Vec2
a Vec2
s float
Résultat Vec2

Cross() public static méthode

public static Cross ( float s, Vec2 a ) : Vec2
s float
a Vec2
Résultat Vec2

Cross() public static méthode

public static Cross ( Vec2 a, Vec2 b ) : float
a Vec2
b Vec2
Résultat float

CrossToOut() public static méthode

public static CrossToOut ( Vec2 a, float s, Vec2 result ) : void
a Vec2
s float
result Vec2
Résultat void

CrossToOut() public static méthode

public static CrossToOut ( float s, Vec2 a, Vec2 result ) : void
s float
a Vec2
result Vec2
Résultat void

CrossToOutUnsafe() public static méthode

public static CrossToOutUnsafe ( Vec2 a, float s, Vec2 result ) : void
a Vec2
s float
result Vec2
Résultat void

CrossToOutUnsafe() public static méthode

public static CrossToOutUnsafe ( float s, Vec2 a, Vec2 result ) : void
s float
a Vec2
result Vec2
Résultat void

Dot() public static méthode

public static Dot ( Vec2 a, Vec2 b ) : float
a Vec2
b Vec2
Résultat float

Equals() public méthode

public Equals ( Object obj ) : bool
obj Object
Résultat bool

GetHashCode() public méthode

public GetHashCode ( ) : int
Résultat int

Length() public méthode

Return the length of this vector.
public Length ( ) : float
Résultat float

LengthSquared() public méthode

Return the squared length of this vector.
public LengthSquared ( ) : float
Résultat float

Max() public static méthode

public static Max ( Vec2 a, Vec2 b ) : Vec2
a Vec2
b Vec2
Résultat Vec2

MaxToOut() public static méthode

public static MaxToOut ( Vec2 a, Vec2 b, Vec2 result ) : void
a Vec2
b Vec2
result Vec2
Résultat void

Min() public static méthode

public static Min ( Vec2 a, Vec2 b ) : Vec2
a Vec2
b Vec2
Résultat Vec2

MinToOut() public static méthode

public static MinToOut ( Vec2 a, Vec2 b, Vec2 result ) : void
a Vec2
b Vec2
result Vec2
Résultat void

Mul() public méthode

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

MulLocal() public méthode

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

Negate() public méthode

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

NegateLocal() public méthode

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

NegateToOut() public static méthode

public static NegateToOut ( Vec2 a, Vec2 result ) : void
a Vec2
result Vec2
Résultat void

Normalize() public méthode

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

Set() public méthode

Set this vector to another vector.
public Set ( Vec2 v ) : Vec2
v Vec2
Résultat Vec2

Set() public méthode

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

SetZero() public méthode

Zero out this vector.
public SetZero ( ) : void
Résultat void

Skew() public méthode

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

Skew() public méthode

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

Sub() public méthode

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

SubLocal() public méthode

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

ToString() public méthode

public ToString ( ) : String
Résultat String

Vec2() public méthode

public Vec2 ( ) : System
Résultat System

Vec2() public méthode

public Vec2 ( Vec2 toCopy ) : System
toCopy Vec2
Résultat System

Vec2() public méthode

public Vec2 ( float x, float y ) : System
x float
y float
Résultat System

Property Details

X public_oe property

public float X
Résultat float

Y public_oe property

public float Y
Résultat float