stbvox_input_description class final

This is the data structure you fill out. Most of the arrays can be NULL, except when one is required to get the value to index another.

The compass system used in the following descriptions is: east means increasing x north means increasing y up means increasing z

Inheritance
Implemented types
Available extensions

Constructors

stbvox_input_description()

Properties

address Pointer<T>

Available on T, provided by the StructAddress extension

The memory address of the underlying data.
no setter
block_color Pointer<ma_uint8>
Indexed by 3D coordinate. Contains the color for all faces of the block. The core color value is 0..63. Encode with STBVOX_MAKE_COLOR(color_number, tex1_enable, tex2_enable)
getter/setter pair
block_color_face Pointer<Pointer<ma_uint8>>
Array indexed by blocktype containing the color value to apply to the faces. The core color value is 0..63. Encode with STBVOX_MAKE_COLOR(color_number, tex1_enable, tex2_enable)
getter/setter pair
block_geometry Pointer<ma_uint8>
Indexed by 3D coordinate. Contains the geometry type for the block. Also contains a 2-bit rotation for how the whole block is rotated. Also includes a 2-bit vheight value when using shared vheight values. See the separate vheight documentation. Encode with STBVOX_MAKE_GEOMETRY(geom, rot, vheight)
getter/setter pair
block_selector Pointer<ma_uint8>
Array indexed by 3D coordinates indicating which output mesh to select.
getter/setter pair
block_side_texrot Pointer<ma_uint8>
Array indexed by 3D coordinates encoding 2-bit texture rotations for the faces on the E/N/W/S sides of the block. Encode with STBVOX_MAKE_SIDE_TEXROT(rot_e, rot_n, rot_w, rot_s)
getter/setter pair
block_tex1 Pointer<ma_uint8>
Array indexed by blocktype containing the geometry for this block, plus a 2-bit "simple rotation". Note rotation has limited use since it's not independent of blocktype.
getter/setter pair
block_tex1_face Pointer<Pointer<ma_uint8>>
Array indexed by blocktype containing the texture id for texture #1.
getter/setter pair
block_tex2 Pointer<ma_uint8>
Indexed by 3D coordinate. Contains the texture id for texture #2 to use on all faces of the block.
getter/setter pair
block_tex2_face Pointer<Pointer<ma_uint8>>
Array indexed by blocktype containing the texture id for texture #2.
getter/setter pair
block_texlerp Pointer<ma_uint8>
Array indexed by blocktype and face containing the color value to apply to that face. The core color value is 0..63. Encode with STBVOX_MAKE_COLOR(color_number, tex1_enable, tex2_enable)
getter/setter pair
block_texlerp_face Pointer<Pointer<ma_uint8>>
Array indexed by blocktype containing 3-bit scalar for texture #2 alpha (known throughout as 'texlerp'). This is constant over every face even though the property is potentially per-vertex.
getter/setter pair
block_vheight Pointer<ma_uint8>
Array indexed by blocktype and face containing 3-bit scalar for texture #2 alpha. This is constant over the face even though the property is potentially per-vertex.
getter/setter pair
blocktype Pointer<ma_uint8>
Indexed by 3D coordinate. The lighting value / ambient occlusion value that is used to define the vertex lighting values. The raw lighting values are defined at the center of blocks (or at vertex if 'lighting_at_vertices' is true).
getter/setter pair
color Pointer<ma_uint8>
Array indexed by blocktype and face containing the texture id for texture #2. The N/E/S/W face choices can be rotated by one of the rotation selectors; The top & bottom face textures will rotate to match.
getter/setter pair
color2 Pointer<ma_uint8>
Indexed by extended_color value, this specifies which faces the color in ecolor_color should be applied to. The faces can be independently rotated by the ecolor value of 'rotate', if it exists. Encode with STBVOX_MAKE_FACE_MASK(e,n,w,s,u,d)
getter/setter pair
color2_facemask Pointer<ma_uint8>
Indexed by 3D coordinates, specifies an alternative color to apply to some of the faces of the block. Encode with STBVOX_MAKE_COLOR(color_number, tex1_enable, tex2_enable)
getter/setter pair
color3 Pointer<ma_uint8>
Indexed by 3D coordinates, specifies which faces should use the color defined in color2. No rotation value is applied. Encode with STBVOX_MAKE_FACE_MASK(e,n,w,s,u,d)
getter/setter pair
color3_facemask Pointer<ma_uint8>
Indexed by 3D coordinates, specifies an alternative color to apply to some of the faces of the block. Encode with STBVOX_MAKE_COLOR(color_number, tex1_enable, tex2_enable)
getter/setter pair
ecolor_color Pointer<ma_uint8>
Indexed by 3D coordinate. Specifies a value that indexes into the ecolor arrays below (both of which must be defined).
getter/setter pair
ecolor_facemask Pointer<ma_uint8>
Indexed by extended_color value, specifies an optional override for the color value on some faces. Encode with STBVOX_MAKE_COLOR(color_number, tex1_enable, tex2_enable)
getter/setter pair
extended_color Pointer<ma_uint8>
Indexed by 3D coordinate. Specifies which of the six faces should have their tex2 replaced by the value of tex2_replace. In this case, all 8 bits of tex2_replace are used as the texture id. Encode with STBVOX_MAKE_FACE_MASK(east,north,west,south,up,down)
getter/setter pair
geometry Pointer<ma_uint8>
Indexed by 3D coordinate. This is a core "block type" value, which is used to index into other arrays; essentially a "palette". This is much more memory-efficient and performance-friendly than storing the values explicitly, but only makes sense if the values are always synchronized.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
lighting Pointer<ma_uint8>
Indexed by 3D coordinate. 24-bit voxel color for STBVOX_CONFIG_MODE = 20 or 21 only
getter/setter pair
lighting_at_vertices int
getter/setter pair
overlay Pointer<ma_uint8>
index into palettes listed below
getter/setter pair
overlay_color Pointer<Pointer<ma_uint8>>
Array indexed by overlay value and face, containing an override value for the texture id for texture #2. If 0, the value defined by blocktype is used.
getter/setter pair
overlay_side_texrot Pointer<ma_uint8>
Array indexed by overlay value and face, containing an override value for the face color. If 0, the value defined by blocktype is used.
getter/setter pair
overlay_tex1 Pointer<Pointer<ma_uint8>>
Indexed by 3D coordinate. If 0, there is no overlay. If non-zero, it indexes into to the below arrays and overrides the values defined by the blocktype.
getter/setter pair
overlay_tex2 Pointer<Pointer<ma_uint8>>
Array indexed by overlay value and face, containing an override value for the texture id for texture #1. If 0, the value defined by blocktype is used.
getter/setter pair
packed_compact Pointer<ma_uint8>
Indexed by 3D coordinates, this defines the four vheight values to use if the geometry is STBVOX_GEOM_vheight*. See the vheight discussion.
getter/setter pair
rgb Pointer<stbvox_rgb>
these are mostly 3D maps you use to define your voxel world, using x_stride and y_stride note that for cache efficiency, you want to use the block_foo palettes as much as possible instead
getter/setter pair
rotate Pointer<ma_uint8>
Array indexed by overlay value, encoding 2-bit texture rotations for the faces on the E/N/W/S sides of the block. Encode with STBVOX_MAKE_SIDE_TEXROT(rot_e, rot_n, rot_w, rot_s)
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selector Pointer<ma_uint8>
Array indexed by blocktype containing the vheight values for the top or bottom face of this block. These will rotate properly if the block is rotated. See discussion of vheight. Encode with STBVOX_MAKE_VHEIGHT(sw_height, se_height, nw_height, ne_height)
getter/setter pair
side_texrot Pointer<ma_uint8>
Array indexed by blocktype indicating which output mesh to select.
getter/setter pair
tex2 Pointer<ma_uint8>
Array indexed by blocktype and face containing the texture id for texture #1. The N/E/S/W face choices can be rotated by one of the rotation selectors; The top & bottom face textures will rotate to match. Note that it only makes sense to use one of block_tex1 or block_tex1_face; this pattern repeats throughout and this notice is not repeated.
getter/setter pair
tex2_facemask Pointer<ma_uint8>
Indexed by 3D coordinate. Specifies the texture id for texture #2 to use on a single face of the voxel, which must be E/N/W/S (not U/D). The texture id is limited to 6 bits unless tex2_facemask is also defined (see below). Encode with STBVOX_MAKE_TEX2_REPLACE(tex2, face)
getter/setter pair
tex2_for_tex1 Pointer<ma_uint8>
Indexed by 3D coordinate. Allows independent rotation of several parts of the voxel, where by rotation I mean swapping textures and colors between E/N/S/W faces. Block: rotates anything indexed by blocktype Overlay: rotates anything indexed by overlay EColor: rotates faces defined in ecolor_facemask Encode with STBVOX_MAKE_MATROT(block,overlay,ecolor)
getter/setter pair
tex2_replace Pointer<ma_uint8>
Array indexed by tex1 containing the texture id for texture #2. You can use this if the two are always/almost-always strictly correlated (e.g. if tex2 is a detail texture for tex1), as it will be more efficient (touching fewer cache lines) than using e.g. block_tex2_face.
getter/setter pair
texlerp Pointer<ma_uint8>
The following texlerp encodings are experimental and maybe not that useful.
getter/setter pair
texlerp_face3 Pointer<stbi_us>
e:3,n:3,w:3,s:3,u:2,d:2
getter/setter pair
texlerp_simple Pointer<ma_uint8>
Indexed by 3D coordinates, specifies which faces should use the color defined in color3. No rotation value is applied. Encode with STBVOX_MAKE_FACE_MASK(e,n,w,s,u,d)
getter/setter pair
texlerp_vert3 Pointer<stbi_us>
Indexed by 3D coordinates, this defines four values: vertlerp is a lerp value at every vertex of the mesh (using STBVOX_TEXLERP_BASE values). ud is the value to use on up and down faces, from STBVOX_TEXLERP_FACE values ew is the value to use on east and west faces, from STBVOX_TEXLERP_FACE values ns is the value to use on north and south faces, from STBVOX_TEXLERP_FACE values If any of ud, ew, or ns is STBVOX_TEXLERP_FACE_use_vert, then the vertlerp values for the vertices are gathered and used for those faces. Encode with STBVOX_MAKE_TEXLERP(vertlerp,ud,ew,sw)
getter/setter pair
vheight Pointer<ma_uint8>
STBVOX_MAKE_VHEIGHT -- sw:2, se:2, nw:2, ne:2, doesn't rotate
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited