@tolokoban/tgd
Version:
ToloGameDev library for WebGL2
64 lines • 1.95 kB
TypeScript
/**
* Here are the indexes of the voxel's corners.
*
* ```
* 2 +-------------+ 6
* /| /|
* / | / | Y
* / | / | |
* 3 +-------------+ 7 | |
* | | | | |
* | 0 +---------|---+ 4 O------X
* | / | / /
* | / | / /
* |/ |/ Z
* 1 +-------------+ 5
* ```
* @returns 12 pairs of indexes on the voxel corners.
*/
export declare function tgdDataMarchingCubesVoxelEdges(): Readonly<Uint8Array>;
/**
* Here are the indexes of the voxel's corners.
*
* ```
* 2 +-------------+ 6
* /| /|
* / | / | Y
* / | / | |
* 3 +-------------+ 7 | |
* | | | | |
* | 0 +---------|---+ 4 O------X
* | / | / /
* | / | / /
* |/ |/ Z
* 1 +-------------+ 5
* ```
* @returns (x,y,z) coordinates of the 8 voxel's corners.
* Each coord is either 0 or +1.
*/
export declare function tgdDataMarchingCubesVoxelCorners(): Readonly<Float32Array>;
/**
* Mid points are points at the center of the voxel's edges.
* ```
* +------6------+
* /| /|
* 5 | 11 | Y
* / 1 / 9 |
* +------7------+ 7 | |
* | | | | |
* | +------2--|---+ O------X
* 3 / 10 / /
* | 0 | 8 /
* |/ |/ Z
* +------4------+
* ```
*
* @return (x,y,z) coords of the 12 voxel/s midpoints.
*/
export declare function tgdDataMarchingCubesVoxelMidPoints(): Readonly<Float32Array>;
/**
* For each configuration, we create triangles.
* The numbers from 0 to 11 are indexes of MIDPOINTS.
*/
export declare function tgdDataMarchingCubesConfigurations(): Readonly<number[][]>;
//# sourceMappingURL=data.d.ts.map