Home Reference Source
import {Voxel} from 'rabbit-hole'
public class | source

Voxel

A cubic voxel that holds information about the surface of a volume.

Constructor Summary

Public Constructor
public

Constructs a new voxel.

Member Summary

Public Members
public

The amount of edges that exhibit a material change in this voxel.

public

A generated index for this voxel's vertex. Used during the construction of the final polygons.

public

Holds binary material information about all eight corners of this voxel.

public

normal: Vector3

The normal of the vertex that lies inside this voxel.

public

position: Vector3

The vertex that lies inside this voxel.

public

A QEF data construct.

Public Constructors

public constructor() source

Constructs a new voxel.

Public Members

public edgeCount: Number source

The amount of edges that exhibit a material change in this voxel.

public index: Number source

A generated index for this voxel's vertex. Used during the construction of the final polygons.

public materials: Number source

Holds binary material information about all eight corners of this voxel.

A value of 0 means that this voxel is completely outside of the volume, whereas a value of 255 means that it's fully inside of it. Any other value indicates a material change which implies that the voxel contains the surface.

public normal: Vector3 source

The normal of the vertex that lies inside this voxel.

public position: Vector3 source

The vertex that lies inside this voxel.

public qefData: QEFData source

A QEF data construct. Used to calculate the vertex position.