C# Class SharpQuake.Mathlib

Quake math functions
Mostra file Open project: Memorix101/SharpQuake Class Usage Examples

Public Methods

Method Description
AngleMod ( double a ) : float

anglemod()

AngleVectors ( Vector3 &angles, Vector3 &forward, Vector3 &right, Vector3 &up ) : void

AngleVectors

BoxOnPlaneSide ( Vector3 &emins, Vector3 &emaxs, mplane_t p ) : int
BoxOnPlaneSide ( v3f &emins, v3f &emaxs, mplane_t p ) : int
CheckNaN ( v3f &v, float defValue ) : bool
Clamp ( v3f &src, Vector3 &min, Vector3 &max, v3f &dest ) : void
Comp ( Vector3 &a, int index ) : float
Comp ( v3f &a, int index ) : float
Copy ( Vector3 &src, v3f &dest ) : void
Copy ( v3f &src, Vector3 &dest ) : void
CorrectAngles180 ( Vector3 &a ) : void
DotProduct ( Vector3 &a, Vector4 &b ) : float
DotProduct ( v3f &a, v3f &b ) : float
Length ( v3f &v ) : float
LengthXY ( v3f &v ) : float
Normalize ( Vector3 &v ) : float
Normalize ( v3f &v ) : float
RotatePointAroundVector ( Vector3 &dst, Vector3 &dir, Vector3 &point, float degrees ) : void
SetComp ( Vector3 &dest, int index, float value ) : void
VectorAdd ( v3f &a, v3f &b, v3f &c ) : void
VectorMA ( v3f &a, float scale, v3f &b, v3f &c ) : void

c = a + b * scale;

VectorScale ( v3f &a, float scale, v3f &b ) : void
VectorSubtract ( v3f &a, v3f &b, v3f &c ) : void

Private Methods

Method Description
_BoxOnPlaneSide ( Vector3 &emins, Vector3 &emaxs, mplane_t p ) : int

Method Details

AngleMod() public static method

anglemod()
public static AngleMod ( double a ) : float
a double
return float

AngleVectors() public static method

AngleVectors
public static AngleVectors ( Vector3 &angles, Vector3 &forward, Vector3 &right, Vector3 &up ) : void
angles Vector3
forward Vector3
right Vector3
up Vector3
return void

BoxOnPlaneSide() public static method

public static BoxOnPlaneSide ( Vector3 &emins, Vector3 &emaxs, mplane_t p ) : int
emins Vector3
emaxs Vector3
p mplane_t
return int

BoxOnPlaneSide() public static method

public static BoxOnPlaneSide ( v3f &emins, v3f &emaxs, mplane_t p ) : int
emins v3f
emaxs v3f
p mplane_t
return int

CheckNaN() public static method

public static CheckNaN ( v3f &v, float defValue ) : bool
v v3f
defValue float
return bool

Clamp() public static method

public static Clamp ( v3f &src, Vector3 &min, Vector3 &max, v3f &dest ) : void
src v3f
min Vector3
max Vector3
dest v3f
return void

Comp() public static method

public static Comp ( Vector3 &a, int index ) : float
a Vector3
index int
return float

Comp() public static method

public static Comp ( v3f &a, int index ) : float
a v3f
index int
return float

Copy() public static method

public static Copy ( Vector3 &src, v3f &dest ) : void
src Vector3
dest v3f
return void

Copy() public static method

public static Copy ( v3f &src, Vector3 &dest ) : void
src v3f
dest Vector3
return void

CorrectAngles180() public static method

public static CorrectAngles180 ( Vector3 &a ) : void
a Vector3
return void

DotProduct() public static method

public static DotProduct ( Vector3 &a, Vector4 &b ) : float
a Vector3
b Vector4
return float

DotProduct() public static method

public static DotProduct ( v3f &a, v3f &b ) : float
a v3f
b v3f
return float

Length() public static method

public static Length ( v3f &v ) : float
v v3f
return float

LengthXY() public static method

public static LengthXY ( v3f &v ) : float
v v3f
return float

Normalize() public static method

public static Normalize ( Vector3 &v ) : float
v Vector3
return float

Normalize() public static method

public static Normalize ( v3f &v ) : float
v v3f
return float

RotatePointAroundVector() public static method

public static RotatePointAroundVector ( Vector3 &dst, Vector3 &dir, Vector3 &point, float degrees ) : void
dst Vector3
dir Vector3
point Vector3
degrees float
return void

SetComp() public static method

public static SetComp ( Vector3 &dest, int index, float value ) : void
dest Vector3
index int
value float
return void

VectorAdd() public static method

public static VectorAdd ( v3f &a, v3f &b, v3f &c ) : void
a v3f
b v3f
c v3f
return void

VectorMA() public static method

c = a + b * scale;
public static VectorMA ( v3f &a, float scale, v3f &b, v3f &c ) : void
a v3f
scale float
b v3f
c v3f
return void

VectorScale() public static method

public static VectorScale ( v3f &a, float scale, v3f &b ) : void
a v3f
scale float
b v3f
return void

VectorSubtract() public static method

public static VectorSubtract ( v3f &a, v3f &b, v3f &c ) : void
a v3f
b v3f
c v3f
return void