Skip to main content

add_primitive_with_material

Function add_primitive_with_material 

Source
pub fn add_primitive_with_material(
    p: &mut Project,
    parent: Option<NodeId>,
    name: &str,
    kind: PrimitiveKind,
    a: f32,
    b: f32,
    segments: u32,
    transform: Transform,
    material: Option<MaterialId>,
) -> (NodeId, MeshId)
Expand description

Like add_primitive, but immediately assigns a material to the instance.