instance_from_md2_state

Function instance_from_md2_state 

Source
pub fn instance_from_md2_state(
    x: f64,
    y: f64,
    rad: f64,
    ang: f64,
    tex_zoom: f64,
    tex_ang: f64,
    sides: u32,
    color_center: [f32; 4],
    color_edge: [f32; 4],
    border_color: [f32; 4],
    border_size: f32,
    flags: ShapeFlags,
) -> CustomShapeInstance
Expand description

Build a CustomShapeInstance from MD2-space eval output. rad is converted from preset units (roughly [0, 1] for full-screen) to clip-space half-extent (radius 0.5 = quarter-screen-width before aspect correction).