C# Class Utils.TileMath

Datei anzeigen Open project: geofftnz/TestBench1

Public Properties

Property Type Description
C1024 Func
CX1024 int>.Func
CY1024 int>.Func

Public Methods

Method Description
CellIndex ( this pos, int width, int height ) : int
CellX ( this pos, int width ) : int
CellY ( this pos, int height ) : int
FallVectorShit ( Vector3 normal, Vector3 up ) : Vector3
TileIntersect ( Vector2 pos, Vector2 dir, int cx, int cy, int &nx, int &ny ) : Vector2

Find the next tile intersection in the specified direction. Assumes tiles are on whole number boundaries. Does not correct for world boundaries.

Method Details

CellIndex() public static method

public static CellIndex ( this pos, int width, int height ) : int
pos this
width int
height int
return int

CellX() public static method

public static CellX ( this pos, int width ) : int
pos this
width int
return int

CellY() public static method

public static CellY ( this pos, int height ) : int
pos this
height int
return int

FallVectorShit() public static method

public static FallVectorShit ( Vector3 normal, Vector3 up ) : Vector3
normal Vector3
up Vector3
return Vector3

TileIntersect() public static method

Find the next tile intersection in the specified direction. Assumes tiles are on whole number boundaries. Does not correct for world boundaries.
public static TileIntersect ( Vector2 pos, Vector2 dir, int cx, int cy, int &nx, int &ny ) : Vector2
pos Vector2
dir Vector2
cx int
cy int
nx int
ny int
return Vector2

Property Details

C1024 public_oe static_oe property

public static Func C1024
return Func

CX1024 public_oe static_oe property

public static Func CX1024
return int>.Func

CY1024 public_oe static_oe property

public static Func CY1024
return int>.Func