Module util

Source
Expand description

Many utility structs, enums and functions.

Modules§

named_colors
Named colors https://www.w3.org/wiki/CSS/Properties/color/keywords

Structs§

Color32
A 32 bit color struct! This is often directly used by StereoKit data structures, and so is often necessary for setting texture data, or mesh data. Note that the Color type implicitly converts to Color32, so you can use the static methods there to create Color32 values!
Color128
A color value stored as 4 floats with values that are generally between 0 and 1! Note that there’s also a Color32 structure, and that 4 floats is generally a lot more than you need. So, use this for calculating individual colors at quality, but maybe store them en-masse with Color32!
Device
This class describes the device that is running this application! It contains identifiers, capabilities, and a few adjustable settings here and there. https://stereokit.net/Pages/StereoKit/Device.html
FileFilter
file extension to filter ie “.txt” “.gltf” https://stereokit.net/Pages/StereoKit/Platform.html
FovInfo
TODO: waiting for C# implementation https://stereokit.net/Pages/StereoKit/FovInfo.html
Gradient
A Gradient is a sparse collection of color keys that are used to represent a ramp of colors! This class is largely just storing colors and allowing you to sample between them.
GradientKey
A color/position pair for Gradient values! https://stereokit.net/Pages/StereoKit/GradientKey.html
Hash
This class contains some tools for hashing data within StereoKit! Certain systems in StereoKit use string hashes instead of full strings for faster search and compare, like UI and Materials, so this class gives access to the code SK uses for hashing. StereoKit currently internally uses a 64 bit FNV hash, though this detail should be pretty transparent to developers
Platform
This class provides some platform related code that runs cross-platform. You might be able to do many of these things with rust or C#, but you might not be able to do them in as a portable manner as these methods do! https://stereokit.net/Pages/StereoKit/Platform.html
SHLight
A light source used for creating SphericalHarmonics data. https://stereokit.net/Pages/StereoKit/SHLight.html
SphericalHarmonics
Spherical Harmonics are kinda like Fourier, but on a sphere. That doesn’t mean terribly much to me, and could be wrong, but check out here for more details about how Spherical Harmonics work in this context!
Time
This class contains time information for the current session and frame! https://stereokit.net/Pages/StereoKit/Time.html
_GradientT
StereoKit internal type.

Enums§

DeviceTracking
What type of user motion is the device capable of tracking? For the normal fully capable XR headset, this should be 6dof (rotation and translation), but more limited headsets may be restricted to 3dof (rotation) and flatscreen computers with the simulator off would be none. https://stereokit.net/Pages/StereoKit/DeviceTracking.html
DisplayType
This describes a type of display hardware! https://stereokit.net/Pages/StereoKit/DisplayType.html
PickerMode
TODO: UNSTABLE: When opening the Platform.FilePicker, this enum describes how the picker should look and behave. https://stereokit.net/Pages/StereoKit/PickerMode.html

Functions§

color_hsv
color_lab
color_to_gamma
color_to_hsv
color_to_lab
color_to_linear
device_display_get_blend
device_display_get_fov
device_display_get_height
device_display_get_refresh_rate
device_display_get_type
device_display_get_width
device_display_set_blend
device_display_valid_blend
device_get_gpu
device_get_name
device_get_runtime
device_get_tracking
device_has_eye_gaze
device_has_hand_tracking
gradient_add
gradient_count
gradient_create
gradient_create_keys
gradient_destroy
gradient_get
gradient_get32
gradient_remove
gradient_set
hash_int
hash_int_with
hash_string
hash_string_with
platform_file_picker
platform_file_picker_close
platform_file_picker_sz
platform_file_picker_visible
platform_keyboard_get_force_fallback
platform_keyboard_set_force_fallback
platform_keyboard_set_layout
platform_keyboard_show
platform_keyboard_visible
platform_read_file
platform_write_file
platform_write_file_text
sh_add
sh_brightness
sh_create
sh_dominant_dir
sh_lookup
time_frame
time_scale
time_set_time
time_step
time_step_unscaled
time_stepf
time_stepf_unscaled
time_total
time_total_raw
time_total_unscaled
time_totalf
time_totalf_unscaled

Type Aliases§

GradientT
StereoKit ffi type.