Struct Rectanglei
- Namespace
- Vintagestory.API.MathTools
- Assembly
- VintagestoryAPI.dll
public struct Rectanglei
- Inherited Members
- Extension Methods
Constructors
Rectanglei(int, int, int, int)
public Rectanglei(int X, int Y, int width, int height)
Parameters
Properties
X1
Same as X
public int X1 { get; }
Property Value
X2
Same as X + Width
public int X2 { get; }
Property Value
Y1
Same as Y
public int Y1 { get; }
Property Value
Y2
Same as Y + Height
public int Y2 { get; }
Property Value
Methods
Bottom()
public int Bottom()
Returns
Clone()
[Obsolete("Rectanglei is a struct and there is no point cloning a struct")]
public Rectanglei Clone()
Returns
Contains(int, int)
Returns if the given point is inside the cuboid
public bool Contains(int x, int y)
Parameters
Returns
Contains(Vec2i)
Returns if the given point is inside the cuboid
public bool Contains(Vec2i pos)
Parameters
pos
Vec2i
Returns
GrowBy(int)
public Rectanglei GrowBy(int size)
Parameters
size
int
Returns
Intersects(Rectanglei)
If the given cuboid intersects with this cubiod
public bool Intersects(Rectanglei with)
Parameters
with
Rectanglei
Returns
IntersectsOrTouches(int, int, int, int)
public bool IntersectsOrTouches(int withX1, int withY1, int withX2, int withY2)
Parameters
Returns
IntersectsOrTouches(Rectanglei)
If the given cuboid intersects with or is adjacent to this cubiod
public bool IntersectsOrTouches(Rectanglei with)
Parameters
with
Rectanglei
Returns
PointInside(int, int)
public bool PointInside(int x, int y)
Parameters
Returns
PointInside(Vec2i)
public bool PointInside(Vec2i pos)
Parameters
pos
Vec2i