Class AdvancedGrid3Holder<T>
Type parameters
-
T: string | number | Record<string, unknown>
Constructors
constructor
- new AdvancedGrid3Holder<T>(x: number, y: number, z: number, _origin?: { x: number; y: number; z: number }): AdvancedGrid3Holder<T>
-
Type parameters
-
T: string | number | Record<string, unknown>
Parameters
-
x: number
-
y: number
-
z: number
-
_origin: { x: number; y: number; z: number } = ...
-
x: number
-
y: number
-
z: number
Methods
drawLine
- drawLine(relX1: number, relY1: number, relZ1: number, relX2: number, relY2: number, relZ2: number, provider: (x: number, y: number, z: number) => T): void
-
Parameters
-
relX1: number
-
relY1: number
-
relZ1: number
-
relX2: number
-
relY2: number
-
relZ2: number
-
provider: (x: number, y: number, z: number) => T
-
- (x: number, y: number, z: number): T
-
Parameters
-
x: number
-
y: number
-
z: number
Returns T
Returns void
fill
- fill(value: T | ((x: number, y: number, z: number) => T)): void
-
Parameters
-
value: T | ((x: number, y: number, z: number) => T)
Returns void
forEach
- forEach(callback: (block: T, x: number, y: number, z: number) => boolean | void): void
-
Parameters
-
callback: (block: T, x: number, y: number, z: number) => boolean | void
-
- (block: T, x: number, y: number, z: number): boolean | void
-
Parameters
-
block: T
-
x: number
-
y: number
-
z: number
Returns boolean | void
Returns void
get
- get(x: number, y: number, z: number): T
-
Parameters
-
x: number
-
y: number
-
z: number
Returns T
isPointInside
- isPointInside(x: number, y: number, z: number): boolean
-
Parameters
-
x: number
-
y: number
-
z: number
Returns boolean
isRelativePointInside
- isRelativePointInside(x: number, y: number, z: number): boolean
-
Parameters
-
x: number
-
y: number
-
z: number
Returns boolean
set
- set(x: number, y: number, z: number, item: T): void
-
Parameters
-
x: number
-
y: number
-
z: number
-
item: T
Returns void
setOrigin
- setOrigin(x: number, y: number, z: number): void
-
Parameters
-
x: number
-
y: number
-
z: number
Returns void
Private setRelativeBlock
- setRelativeBlock(x: number, y: number, z: number, block: T): boolean
-
Parameters
-
x: number
-
y: number
-
z: number
-
block: T
Returns boolean
swap
- swap(relX1: number, relY1: number, relZ1: number, relX2: number, relY2: number, relZ2: number): boolean
-
Parameters
-
relX1: number
-
relY1: number
-
relZ1: number
-
relX2: number
-
relY2: number
-
relZ2: number
Returns boolean