PositionExtensions

Namespace: Murder.Utilities
Assembly: Murder.dll

public static class PositionExtensions

⭐ Methods

IsSameCell(IMurderTransformComponent, IMurderTransformComponent)

public bool IsSameCell(IMurderTransformComponent this, IMurderTransformComponent other)

Parameters
this IMurderTransformComponent
other IMurderTransformComponent

Returns
bool

GetGlobalTransform(Entity)

public IMurderTransformComponent GetGlobalTransform(Entity entity)

Parameters
entity Entity

Returns
IMurderTransformComponent

CellPoint(IMurderTransformComponent)

public Point CellPoint(IMurderTransformComponent this)

Parameters
this IMurderTransformComponent

Returns
Point

FromCellToPointPosition(Point&)

public Point FromCellToPointPosition(Point& point)

Parameters
point Point&

Returns
Point

FromWorldToLowerBoundGridPosition(Point&)

public Point FromWorldToLowerBoundGridPosition(Point& point)

Parameters
point Point&

Returns
Point

ToCellPoint(IMurderTransformComponent)

public Point ToCellPoint(IMurderTransformComponent position)

Parameters
position IMurderTransformComponent

Returns
Point

ToPoint(PositionComponent)

public Point ToPoint(PositionComponent position)

Parameters
position PositionComponent

Returns
Point

Add(PositionComponent, Point)

public PositionComponent Add(PositionComponent position, Point delta)

Parameters
position PositionComponent
delta Point

Returns
PositionComponent

Add(PositionComponent, float, float)

public PositionComponent Add(PositionComponent position, float dx, float dy)

Parameters
position PositionComponent
dx float
dy float

Returns
PositionComponent

Add(PositionComponent, Vector2)

public PositionComponent Add(PositionComponent position, Vector2 delta)

Parameters
position PositionComponent
delta Vector2

Returns
PositionComponent

ToPosition(Point&)

public PositionComponent ToPosition(Point& position)

Parameters
position Point&

Returns
PositionComponent

ToPosition(Vector2&)

public PositionComponent ToPosition(Vector2& position)

Parameters
position Vector2&

Returns
PositionComponent

AddToVector2(IMurderTransformComponent, Vector2)

public Vector2 AddToVector2(IMurderTransformComponent position, Vector2 delta)

Parameters
position IMurderTransformComponent
delta Vector2

Returns
Vector2

AddToVector2(PositionComponent, float, float)

public Vector2 AddToVector2(PositionComponent position, float dx, float dy)

Parameters
position PositionComponent
dx float
dy float

Returns
Vector2

FromCellToVector2CenterPosition(Point&)

public Vector2 FromCellToVector2CenterPosition(Point& point)

Parameters
point Point&

Returns
Vector2

FromCellToVector2Position(Point&)

public Vector2 FromCellToVector2Position(Point& point)

Parameters
point Point&

Returns
Vector2

ToSysVector2(PositionComponent)

public Vector2 ToSysVector2(PositionComponent position)

Parameters
position PositionComponent

Returns
Vector2

ToVector2(IMurderTransformComponent)

public Vector2 ToVector2(IMurderTransformComponent position)

Parameters
position IMurderTransformComponent

Returns
Vector2

SetGlobalPosition(Entity, Vector2)

public void SetGlobalPosition(Entity entity, Vector2 position)

Parameters
entity Entity
position Vector2

SetGlobalTransform(Entity, T)

public void SetGlobalTransform(Entity entity, T transform)

Parameters
entity Entity
transform T

SetLocalPosition(Entity, Vector2)

public void SetLocalPosition(Entity entity, Vector2 position)

Parameters
entity Entity
position Vector2