Function generate_plane

Source
pub fn generate_plane(
    width: f32,
    depth: f32,
    width_segments: usize,
    depth_segments: usize,
) -> (Vec<Point3<f32>>, Vec<Triangle>, Vec<Vector3<f32>>, Vec<Vector2<f32>>)
Expand description

Generate a plane (flat surface) with subdivisions

§Parameters

  • width - Width of the plane along X axis
  • depth - Depth of the plane along Z axis
  • width_segments - Number of subdivisions along width
  • depth_segments - Number of subdivisions along depth

§Returns

Tuple of (positions, indices, normals, uvs)