fixed Documentation errors
This commit is contained in:
parent
ad692adece
commit
3b7f50ab13
@ -13,9 +13,9 @@ pub struct PlaneMeshBuilder {
|
||||
///
|
||||
/// 0 - is the original plane geometry, the 4 points in the XZ plane.
|
||||
///
|
||||
/// 1 - is split by 1 line in the middle of the X axis, resulting in a plane with 2 quads / 4 triangles.
|
||||
/// 1 - adds a vertex in the middle of the X axis, resulting in a plane with 2 quads / 4 triangles, and a new edge along the Z axis.
|
||||
///
|
||||
/// 2 - is a plane split by 2 lines on the X axis, subdividing the plane into 3 equal sections along that axis, resulting in a plane with 3 quads / 6 triangles.
|
||||
/// 2 - adds 2 vertices along the X axis, resulting in a plane with 3 quads / 6 triangles.
|
||||
///
|
||||
/// and so on...
|
||||
pub subdivisions_x: u32,
|
||||
@ -24,9 +24,9 @@ pub struct PlaneMeshBuilder {
|
||||
///
|
||||
/// 0 - is the original plane geometry, the 4 points in the XZ plane.
|
||||
///
|
||||
/// 1 - is split by 1 line in the middle of the Z axis, resulting in a plane with 2 quads / 4 triangles.
|
||||
/// 1 - adds a vertex in the middle of the Z axis, resulting in a plane with 2 quads / 4 triangles, and a new edge along the X axis.
|
||||
///
|
||||
/// 2 - is a plane split by 2 lines on the Z axis, subdividing the plane into 3 equal sections along that axis, resulting in a plane with 3 quads / 6 triangles.
|
||||
/// 2 - adds 2 vertices along the Z axis, resulting in a plane with 3 quads / 6 triangles.
|
||||
///
|
||||
/// and so on...
|
||||
pub subdivisions_z: u32,
|
||||
@ -112,9 +112,9 @@ impl PlaneMeshBuilder {
|
||||
///
|
||||
/// 0 - is the original plane geometry, the 4 points in the XZ plane.
|
||||
///
|
||||
/// 1 - is split by 1 line in the middle of the X axis, resulting in a plane with 2 quads / 4 triangles.
|
||||
/// 1 - adds a vertex in the middle of the X axis, resulting in a plane with 2 quads / 4 triangles, and a new edge along the Z axis.
|
||||
///
|
||||
/// 2 - is a plane split by 2 lines on the X axis, subdividing the plane into 3 equal sections along that axis, resulting in a plane with 3 quads / 6 triangles.
|
||||
/// 2 - adds 2 vertices along the X axis, resulting in a plane with 3 quads / 6 triangles.
|
||||
///
|
||||
/// and so on...
|
||||
pub fn subdivisions_x(mut self, subdivisions: u32) -> Self {
|
||||
@ -127,9 +127,9 @@ impl PlaneMeshBuilder {
|
||||
///
|
||||
/// 0 - is the original plane geometry, the 4 points in the XZ plane.
|
||||
///
|
||||
/// 1 - is split by 1 line in the middle of the Z axis, resulting in a plane with 2 quads / 4 triangles.
|
||||
/// 1 - adds a vertex in the middle of the Z axis, resulting in a plane with 2 quads / 4 triangles, and a new edge along the X axis.
|
||||
///
|
||||
/// 2 - is a plane split by 2 lines on the Z axis, subdividing the plane into 3 equal sections along that axis, resulting in a plane with 3 quads / 6 triangles.
|
||||
/// 2 - adds 2 vertices along the Z axis, resulting in a plane with 3 quads / 6 triangles.
|
||||
///
|
||||
/// and so on...
|
||||
pub fn subdivisions_z(mut self, subdivisions: u32) -> Self {
|
||||
@ -141,7 +141,7 @@ impl PlaneMeshBuilder {
|
||||
impl MeshBuilder for PlaneMeshBuilder {
|
||||
fn build(&self) -> Mesh {
|
||||
let z_vertex_count = self.subdivisions_z + 2;
|
||||
let x_vertex_count = self.subdivisions_z + 2;
|
||||
let x_vertex_count = self.subdivisions_x + 2;
|
||||
let num_vertices = (z_vertex_count * x_vertex_count) as usize;
|
||||
let num_indices = ((z_vertex_count - 1) * (x_vertex_count - 1) * 6) as usize;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user