Module util

Source

Re-exports§

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

Modules§

color 🔒
dir
find_dist
grid_hasher 🔒
option 🔒
plane
projection
spatial_grid 🔒
Contains SpatialGrid which is useful for accelerating queries of nearby entities

Structs§

DISPLAY_VERSION
DISPLAY_VERSION_LONG
GIT_DATE
GIT_DATETIME 🔒
GIT_DATE_TIMESTAMP
GIT_HASH
GIT_TAG
GIT_TIME
GIT_VERSION
GridHasher
SpatialGrid

Constants§

GIT_TAG_BUILD
GIT_VERSION_BUILD
VELOREN_VERSION_STAGE

Functions§

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
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
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