UI.GenQuadrantMesh

static Mesh GenQuadrantMesh(UICorner roundedCorners, float cornerRadius, uint cornerResolution, bool deleteFlatSides, UILathePt[] lathePts)

This generates a quadrantified mesh meant for UI buttons by sweeping a lathe over the rounded corners of a rectangle! Note that this mesh is quadrantified, so it requires special shaders to draw properly!

   
UICorner roundedCorners A bit-flag indicating which corners should be rounded, and which should be sharp!
float cornerRadius The radius of each rounded corner.
uint cornerResolution How many slices/verts go into each corner? More is smoother, but more expensive to render.
bool deleteFlatSides If two adjacent corners are sharp, should we skip connecting them with triangles? If this edge will always be covered, then deleting these faces may save you some performance.
UILathePt[] lathePts The lathe points to sweep around the edge.
RETURNS: Mesh The final Mesh, ready for use in SK’s theming system.
static Mesh GenQuadrantMesh(UICorner roundedCorners, float cornerRadius, uint cornerResolution, bool deleteFlatSides, bool quadrantify, UILathePt[] lathePts)

This generates a quadrantified mesh meant for UI buttons by sweeping a lathe over the rounded corners of a rectangle! Note that this mesh is quadrantified, so it requires special shaders to draw properly!

   
UICorner roundedCorners A bit-flag indicating which corners should be rounded, and which should be sharp!
float cornerRadius The radius of each rounded corner.
uint cornerResolution How many slices/verts go into each corner? More is smoother, but more expensive to render.
bool deleteFlatSides If two adjacent corners are sharp, should we skip connecting them with triangles? If this edge will always be covered, then deleting these faces may save you some performance.
UILathePt[] lathePts The lathe points to sweep around the edge.
bool quadrantify Does this generate a mesh compatible with StereoKit’s quadrant shader system, or is this just a traditional mesh? In most cases, this should be true, but UI elements such as the rounded button may be exceptions.
RETURNS: Mesh The final Mesh, ready for use in SK’s theming system.




Found an issue with these docs, or have some additional questions? Create an Issue on Github!