Empeld
Empeld plugin documentation.
pluginbase.Helpers.Coords.Size3i Struct Reference
Inheritance diagram for pluginbase.Helpers.Coords.Size3i:

Public Member Functions

 Size3i (int width, int length, int height)
 
 Size3i (int cubeSize)
 
bool Equals (Size3i other)
 
override bool Equals (object obj)
 
override int GetHashCode ()
 
override string ToString ()
 

Static Public Member Functions

static bool operator== (Size3i left, Size3i right)
 
static bool operator!= (Size3i left, Size3i right)
 
static operator Vector3i (Size3i size)
 
static operator Size3i (Vector3i vec)
 
static Vector3i operator+ (Vector3i a, Size3i b)
 
static Size3i operator+ (Size3i a, Size3i b)
 

Public Attributes

int Width
 
int Length
 
int Height
 

Static Public Attributes

static readonly Size3i Zero = new Size3i(0,0,0)
 
static readonly Size3i One = new Size3i(1,1,1)
 

Properties

int Volume [get]
 
int ComponentMax [get]
 Gets the largest component More...
 
int ComponentMin [get]
 

Constructor & Destructor Documentation

◆ Size3i() [1/2]

pluginbase.Helpers.Coords.Size3i.Size3i ( int  width,
int  length,
int  height 
)
11  {
12  Width = width;
13  Length = length;
14  Height = height;
15  }
int Height
Definition: Size3i.cs:8
int Width
Definition: Size3i.cs:8
int Length
Definition: Size3i.cs:8

◆ Size3i() [2/2]

pluginbase.Helpers.Coords.Size3i.Size3i ( int  cubeSize)
18  {
19  Width = Length = Height = cubeSize;
20  }
int Height
Definition: Size3i.cs:8
int Width
Definition: Size3i.cs:8
int Length
Definition: Size3i.cs:8

Member Function Documentation

◆ Equals() [1/2]

bool pluginbase.Helpers.Coords.Size3i.Equals ( Size3i  other)
64  {
65  return this.Width == other.Width && this.Length == other.Length && this.Height == other.Height;
66  }
int Height
Definition: Size3i.cs:8
int Width
Definition: Size3i.cs:8
int Length
Definition: Size3i.cs:8

◆ Equals() [2/2]

override bool pluginbase.Helpers.Coords.Size3i.Equals ( object  obj)
69  {
70  if (obj is Size3i)
71  {
72  return this.Equals((Size3i)obj);
73  }
74  return false;
75  }
Size3i(int width, int length, int height)
Definition: Size3i.cs:10
bool Equals(Size3i other)
Definition: Size3i.cs:63

◆ GetHashCode()

override int pluginbase.Helpers.Coords.Size3i.GetHashCode ( )
121  {
122  return Width << 24 | Length << 12 | Height;
123  }
int Height
Definition: Size3i.cs:8
int Width
Definition: Size3i.cs:8
int Length
Definition: Size3i.cs:8

◆ operator Size3i()

static pluginbase.Helpers.Coords.Size3i.operator Size3i ( Vector3i  vec)
explicitstatic
100  {
101  return new Size3i(vec.X, vec.Y, vec.Z);
102  }
Size3i(int width, int length, int height)
Definition: Size3i.cs:10

◆ operator Vector3i()

static pluginbase.Helpers.Coords.Size3i.operator Vector3i ( Size3i  size)
explicitstatic
95  {
96  return new Vector3i(size.Width, size.Length, size.Height);
97  }
static readonly Vector3i
All directions, including diagnols
Definition: Vector3i.cs:111

◆ operator!=()

static bool pluginbase.Helpers.Coords.Size3i.operator!= ( Size3i  left,
Size3i  right 
)
static
85  {
86  return left.Width != right.Width
87  || left.Length != right.Length
88  || left.Height != right.Height;
89  }

◆ operator+() [1/2]

static Vector3i pluginbase.Helpers.Coords.Size3i.operator+ ( Vector3i  a,
Size3i  b 
)
static
109  {
110  return new Vector3i(a.X + b.Width, a.Y + b.Length, a.Z + b.Height);
111  }
static readonly Vector3i
All directions, including diagnols
Definition: Vector3i.cs:111

◆ operator+() [2/2]

static Size3i pluginbase.Helpers.Coords.Size3i.operator+ ( Size3i  a,
Size3i  b 
)
static
114  {
115  return new Size3i(a.Width + b.Width, a.Length + b.Length, a.Height + b.Height);
116  }
Size3i(int width, int length, int height)
Definition: Size3i.cs:10

◆ operator==()

static bool pluginbase.Helpers.Coords.Size3i.operator== ( Size3i  left,
Size3i  right 
)
static
78  {
79  return left.Width == right.Width
80  && left.Length == right.Length
81  && left.Height == right.Height;
82  }

◆ ToString()

override string pluginbase.Helpers.Coords.Size3i.ToString ( )
126  {
127  return string.Format("({0}, {1}, {2})", Width, Length, Height);
128  }
int Height
Definition: Size3i.cs:8
int Width
Definition: Size3i.cs:8
int Length
Definition: Size3i.cs:8

Member Data Documentation

◆ Height

int pluginbase.Helpers.Coords.Size3i.Height

◆ Length

int pluginbase.Helpers.Coords.Size3i.Length

◆ One

readonly Size3i pluginbase.Helpers.Coords.Size3i.One = new Size3i(1,1,1)
static

◆ Width

int pluginbase.Helpers.Coords.Size3i.Width

◆ Zero

readonly Size3i pluginbase.Helpers.Coords.Size3i.Zero = new Size3i(0,0,0)
static

Property Documentation

◆ ComponentMax

int pluginbase.Helpers.Coords.Size3i.ComponentMax
get

Gets the largest component

The component max.

◆ ComponentMin

int pluginbase.Helpers.Coords.Size3i.ComponentMin
get

◆ Volume

int pluginbase.Helpers.Coords.Size3i.Volume
get

The documentation for this struct was generated from the following file: