Class: VoxelSpace
Math/Spaces/VoxelSpace.VoxelSpace
Constructors
constructor
• new VoxelSpace(data): VoxelSpace
Parameters
| Name | Type |
|---|---|
data | Object |
data.getIndex | (space: VoxelSpace) => number |
data.getPosition | (space: VoxelSpace) => VSVec3 |
data.getPostionFromIndex | (space: VoxelSpace, index: number) => VSVec3 |
Returns
Defined in
divinevoxel/core/src/Math/Spaces/VoxelSpace.ts:102
Properties
_bounds
• _bounds: VSVec3
Defined in
divinevoxel/core/src/Math/Spaces/VoxelSpace.ts:98
_boundsPower2
• _boundsPower2: VSVec3
Defined in
divinevoxel/core/src/Math/Spaces/VoxelSpace.ts:99
_boundsSet
• _boundsSet: boolean = false
Defined in
divinevoxel/core/src/Math/Spaces/VoxelSpace.ts:100
_hashedPosition
• _hashedPosition: VSVec3
Defined in
divinevoxel/core/src/Math/Spaces/VoxelSpace.ts:97
_location
• _location: LocationData
Defined in
divinevoxel/core/src/Math/Spaces/VoxelSpace.ts:95
_position
• _position: VSVec3
Defined in
divinevoxel/core/src/Math/Spaces/VoxelSpace.ts:96
data
• data: Object
Type declaration
| Name | Type |
|---|---|
getIndex | (space: VoxelSpace) => number |
getPosition | (space: VoxelSpace) => VSVec3 |
getPostionFromIndex | (space: VoxelSpace, index: number) => VSVec3 |
Defined in
divinevoxel/core/src/Math/Spaces/VoxelSpace.ts:103
WholeVec3
▪ Static WholeVec3: VSVec3
Defined in
divinevoxel/core/src/Math/Spaces/VoxelSpace.ts:72
index
▪ Static index: Flat3DIndex
Defined in
divinevoxel/core/src/Math/Spaces/VoxelSpace.ts:36
Methods
getArea
▸ getArea(): number
Returns
number
Defined in
divinevoxel/core/src/Math/Spaces/VoxelSpace.ts:114
getDepth
▸ getDepth(): number
Returns
number
Defined in
divinevoxel/core/src/Math/Spaces/VoxelSpace.ts:126
getHeight
▸ getHeight(): number
Returns
number
Defined in
divinevoxel/core/src/Math/Spaces/VoxelSpace.ts:118
getIndex
▸ getIndex(): number
Returns
number
Defined in
divinevoxel/core/src/Math/Spaces/VoxelSpace.ts:205
getIndexLocation
▸ getIndexLocation(location): number
Parameters
| Name | Type |
|---|---|
location | LocationData |
Returns
number
Defined in
divinevoxel/core/src/Math/Spaces/VoxelSpace.ts:217
getIndexToXYZ
▸ getIndexToXYZ(index): VSVec3
Parameters
| Name | Type |
|---|---|
index | number |
Returns
VSVec3
Defined in
divinevoxel/core/src/Math/Spaces/VoxelSpace.ts:213
getIndexXYZ
▸ getIndexXYZ(x, y, z): number
Parameters
| Name | Type |
|---|---|
x | number |
y | number |
z | number |
Returns
number
Defined in
divinevoxel/core/src/Math/Spaces/VoxelSpace.ts:209
getKey
▸ getKey(): string
Returns
string
Defined in
divinevoxel/core/src/Math/Spaces/VoxelSpace.ts:225
getKeyLocation
▸ getKeyLocation(location): string
Parameters
| Name | Type |
|---|---|
location | LocationData |
Returns
string
Defined in
divinevoxel/core/src/Math/Spaces/VoxelSpace.ts:233
getKeyXYZ
▸ getKeyXYZ(x, y, z): string
Parameters
| Name | Type |
|---|---|
x | number |
y | number |
z | number |
Returns
string
Defined in
divinevoxel/core/src/Math/Spaces/VoxelSpace.ts:229
getLocation
▸ getLocation(): LocationData
Returns
Defined in
divinevoxel/core/src/Math/Spaces/VoxelSpace.ts:147
getLocationXYZ
▸ getLocationXYZ(x, y, z): LocationData
Parameters
| Name | Type |
|---|---|
x | number |
y | number |
z | number |
Returns
Defined in
divinevoxel/core/src/Math/Spaces/VoxelSpace.ts:153
getPosition
▸ getPosition(): VSVec3
Returns
VSVec3
Defined in
divinevoxel/core/src/Math/Spaces/VoxelSpace.ts:193
getPositionFromIndex
▸ getPositionFromIndex(index): VSVec3
Parameters
| Name | Type |
|---|---|
index | number |
Returns
VSVec3
Defined in
divinevoxel/core/src/Math/Spaces/VoxelSpace.ts:221
getPositionLocation
▸ getPositionLocation(location): VSVec3
Parameters
| Name | Type |
|---|---|
location | LocationData |
Returns
VSVec3
Defined in
divinevoxel/core/src/Math/Spaces/VoxelSpace.ts:201
getPositionXYZ
▸ getPositionXYZ(x, y, z): VSVec3
Parameters
| Name | Type |
|---|---|
x | number |
y | number |
z | number |
Returns
VSVec3
Defined in
divinevoxel/core/src/Math/Spaces/VoxelSpace.ts:197
getVolume
▸ getVolume(): number
Returns
number
Defined in
divinevoxel/core/src/Math/Spaces/VoxelSpace.ts:110
getWidth
▸ getWidth(): number
Returns
number
Defined in
divinevoxel/core/src/Math/Spaces/VoxelSpace.ts:122
setBounds
▸ setBounds(bounds): undefined | VoxelSpace
Parameters
| Name | Type |
|---|---|
bounds | Vector3 |
Returns
undefined | VoxelSpace
Defined in
divinevoxel/core/src/Math/Spaces/VoxelSpace.ts:184
setCubeBounds
▸ setCubeBounds(bounds): undefined | VoxelSpace
Parameters
| Name | Type |
|---|---|
bounds | Vector3 |
Returns
undefined | VoxelSpace
Defined in
divinevoxel/core/src/Math/Spaces/VoxelSpace.ts:172
setLocation
▸ setLocation(location): VoxelSpace
Parameters
| Name | Type |
|---|---|
location | LocationData |
Returns
Defined in
divinevoxel/core/src/Math/Spaces/VoxelSpace.ts:159
setXYZ
▸ setXYZ(x, y, z): VoxelSpace
Parameters
| Name | Type |
|---|---|
x | number |
y | number |
z | number |
Returns
Defined in
divinevoxel/core/src/Math/Spaces/VoxelSpace.ts:130
setXZ
▸ setXZ(x, z): VoxelSpace
Parameters
| Name | Type |
|---|---|
x | number |
z | number |
Returns
Defined in
divinevoxel/core/src/Math/Spaces/VoxelSpace.ts:139
updateLoaction
▸ updateLoaction(location): VoxelSpace
Parameters
| Name | Type |
|---|---|
location | LocationData |
Returns
Defined in
divinevoxel/core/src/Math/Spaces/VoxelSpace.ts:164
getIndex
▸ getIndex(position, bounds): number
Parameters
| Name | Type |
|---|---|
position | Vector3 |
bounds | Vector3 |
Returns
number
Defined in
divinevoxel/core/src/Math/Spaces/VoxelSpace.ts:67
getPositionFromIndex
▸ getPositionFromIndex(position, bounds, index): VSVec3
Parameters
| Name | Type |
|---|---|
position | VSVec3 |
bounds | Vector3 | VSVec3 |
index | number |
Returns
VSVec3
Defined in
divinevoxel/core/src/Math/Spaces/VoxelSpace.ts:53
mapLocationToVec3
▸ mapLocationToVec3(location, vector): void
Parameters
| Name | Type |
|---|---|
location | LocationData |
vector | Vector3 |
Returns
void
Defined in
divinevoxel/core/src/Math/Spaces/VoxelSpace.ts:89
simpleCubeHash
▸ simpleCubeHash(space): VSVec3
Parameters
| Name | Type |
|---|---|
space | VoxelSpace |
Returns
VSVec3
Defined in
divinevoxel/core/src/Math/Spaces/VoxelSpace.ts:37
spatialHash
▸ spatialHash(space, parentSpace, divisor?): VSVec3
Parameters
| Name | Type | Default value |
|---|---|---|
space | VoxelSpace | undefined |
parentSpace | VoxelSpace | undefined |
divisor | Vector3 | VoxelSpace.WholeVec3 |
Returns
VSVec3