[−][src]Module all_is_cubes::triangulator
Algorithms for converting blocks/voxels to triangle-based rendering (as opposed to raytracing, voxel display hardware, or whatever else).
All of the algorithms here are independent of graphics API but may presume that one exists and has specific data types to specialize in.
Note: Some sources say that “tesselation” would be a better name for this operation than “triangulation”. However, “tesselation” means a specific other operation in OpenGL graphics programming, and “triangulation” seems to be the more commonly used terms.
Structs
BlockRenderData | Describes how to draw a block. Pass it to |
BlockVertex | Generic structure of output from triangulator. Implement |
NullTextureAllocator |
|
Enums
Coloring |
Traits
TextureAllocator | Allocator of 2D textures to paint block faces into. |
TextureTile | 2D texture to paint block faces into. It is assumed that when this value is dropped, the texture allocation will be released. |
ToGfxVertex | Implement this trait along with |
Functions
new_space_buffer | Allocate an output buffer for |
triangulate_blocks | Precomputes vertices for blocks present in a space. |
triangulate_space | Computes a triangle-based representation of a |
Type Definitions
BlocksRenderData | Collection of |
Texel | |
TextureCoordinate |