Module point_gen

Source
Expand description

This module covers generating points in a hexagonal fashion.

Structsยง

HexTerrainMesh
Represents terrain, however it contains the vertices only once.
HexWaterMesh
Water mesh which contains vertex data for the water mesh.
TerrainVertex
Represents the center of a single hexagon.
TerrainVertexAttributes
WaterVertexAttributes

Constantsยง

A ๐Ÿ”’
X multiplication factor. 1.0 / sqrt(2)
B ๐Ÿ”’
Y multiplication factor. sqrt(3) / sqrt(2) == sqrt(1.5)
C45 ๐Ÿ”’
cos(45deg) is used to rotate the points.
S45 ๐Ÿ”’
sin(45deg) is used to rotate the points.
SQRT_3 ๐Ÿ”’

Functionsยง

calculate_normal
Used in calculating terrain normals.
q_given_r ๐Ÿ”’
Given the radius, how large of a square do we need to make a unit hexagon grid?
surrounding_hexagonal_points ๐Ÿ”’
Gets the surrounding hexagonal points from a point.
surrounding_point_values_iter ๐Ÿ”’