Module util

Module util 

Source

Re-exportsยง

pub use plane::Plane;
pub use projection::Projection;
pub use dir::*;

Modulesยง

color ๐Ÿ”’
dir
find_dist
grid_hasher ๐Ÿ”’
lines
macros ๐Ÿ”’
option ๐Ÿ”’
plane
projection
ron_recover ๐Ÿ”’
spatial_grid ๐Ÿ”’
Contains SpatialGrid which is useful for accelerating queries of nearby entities

Structsยง

DISPLAY_VERSION
GIT_HASH
The first 32 bits of the git hash. We donโ€™t need more, the non-collision guarantee isnโ€™t all that important for our purposes.
GIT_TAG
GIT_TIMESTAMP
GridHasher
SpatialGrid
VELOREN_GIT_VERSION ๐Ÿ”’

Constantsยง

VELOREN_GIT_VERSION_BUILD ๐Ÿ”’
VELOREN_VERSION_STAGE

Functionsยง

append_date ๐Ÿ”’
chromify_srgb
Preserves the luma of one color while changing its chromaticity to match the other
either_with
hsv_to_rgb
Convert hsv to rgb. Expects h [0, 360], s [0, 1], v [0, 1]
linear_to_srgb
linear_to_srgba
make_display_version
rgb_to_hsv
Convert rgb to hsv. Expects rgb to be [0, 1].
rgb_to_xyy
Convert linear rgb to CIExyY
rgb_to_xyz
Convert linear rgb to CIEXYZ
ron_from_path_recoverable
Load settings from ron in a recoverable manner. Requires #[serde(default)].
saturate_srgb
srgb_to_linear
directly converted from โ€˜vec3 srgb_to_linear(vec3 srgb)โ€™ function in โ€˜srgb.glslโ€™
srgb_to_linear_fast
This function is optimized for speed over perfect accuracy
srgba_to_linear
xyy_to_rgb
Convert to CIExyY to linear rgb