Module mesh

Source
Expand description

Mesh related structs, enums and functions.

§Examples

which are also unit tests:

Mesh Vertex Mesh bounds Mesh set_verts Mesh set_inds Mesh draw Mesh intersect

Structs§

Mesh
A Mesh is a single collection of triangular faces with extra surface information to enhance rendering! StereoKit meshes are composed of a list of vertices, and a list of indices to connect the vertices into faces. Nothing more than that is stored here, so typically meshes are combined with Materials, or added to Models in order to draw them.
Vertex
This represents a single vertex in a Mesh, all StereoKit Meshes currently use this exact layout! It’s good to fill out all values of a Vertex explicitly, as default values for the normal (0,0,0) and color (0,0,0,0) will cause your mesh to appear completely black, or even transparent in most shaders! https://stereokit.net/Pages/StereoKit/Vertex.html
_MeshT
StereoKit internal type.

Enums§

Memory
For performance sensitive areas, or places dealing with large chunks of memory, it can be faster to get a reference to that memory rather than copying it! However, if this isn’t explicitly stated, it isn’t necessarily clear what’s happening. So this enum allows us to visibly specify what type of memory reference is occurring. https://stereokit.net/Pages/StereoKit/Memory.html

Functions§

mesh_addref
mesh_copy
mesh_create
mesh_draw
mesh_find
mesh_gen_circle
mesh_gen_cone
mesh_gen_cube
mesh_gen_cylinder
mesh_gen_plane
mesh_gen_rounded_cube
mesh_gen_sphere
mesh_get_bounds
mesh_get_id
mesh_get_ind_count
mesh_get_inds
mesh_get_keep_data
mesh_get_triangle
mesh_get_vert_count
mesh_get_verts
mesh_has_skin
mesh_ray_intersect
mesh_ray_intersect_bvh
mesh_release
mesh_set_bounds
mesh_set_data
mesh_set_draw_inds
mesh_set_id
mesh_set_inds
mesh_set_keep_data
mesh_set_skin
mesh_set_verts
mesh_update_skin

Type Aliases§

Inds
Mesh index data https://stereokit.net/Pages/StereoKit/Mesh.html
MeshT
StereoKit ffi type.
VindT
StereoKit ffi type.