Struct truck_meshalgo::rexport_polymesh::StructuredMesh
source · pub struct StructuredMesh { /* private fields */ }
Expand description
structured quadrangle mesh
Implementations§
source§impl StructuredMesh
impl StructuredMesh
sourcepub fn from_surface<S>(
surface: &S,
range: ((f64, f64), (f64, f64)),
tol: f64
) -> StructuredMeshwhere
S: ParametricSurface3D + ParameterDivision2D,
pub fn from_surface<S>(
surface: &S,
range: ((f64, f64), (f64, f64)),
tol: f64
) -> StructuredMeshwhere
S: ParametricSurface3D + ParameterDivision2D,
meshing the surface
Arguments
bspsurface
- bspline surface to meshedtol
- standard tolerance for meshing
source§impl StructuredMesh
impl StructuredMesh
sourcepub fn from_positions(
positions: Vec<Vec<Point3<f64>, Global>, Global>
) -> StructuredMesh
pub fn from_positions(
positions: Vec<Vec<Point3<f64>, Global>, Global>
) -> StructuredMesh
Creates a structured polygon without uv_division
and normal
.
sourcepub fn try_from_positions(
positions: Vec<Vec<Point3<f64>, Global>, Global>
) -> Result<StructuredMesh, Error<StandardVertex>>
pub fn try_from_positions(
positions: Vec<Vec<Point3<f64>, Global>, Global>
) -> Result<StructuredMesh, Error<StandardVertex>>
Creates a structured polygon without uv_division
and normal
.
sourcepub const fn from_positions_unchecked(
positions: Vec<Vec<Point3<f64>, Global>, Global>
) -> StructuredMesh
pub const fn from_positions_unchecked(
positions: Vec<Vec<Point3<f64>, Global>, Global>
) -> StructuredMesh
Creates a structured polygon without uv_division
and normal
.
sourcepub fn from_positions_and_uvs(
positions: Vec<Vec<Point3<f64>, Global>, Global>,
_: (Vec<f64, Global>, Vec<f64, Global>)
) -> StructuredMesh
pub fn from_positions_and_uvs(
positions: Vec<Vec<Point3<f64>, Global>, Global>,
_: (Vec<f64, Global>, Vec<f64, Global>)
) -> StructuredMesh
Creates a structured polygon without normals.
sourcepub fn try_from_positions_and_uvs(
positions: Vec<Vec<Point3<f64>, Global>, Global>,
_: (Vec<f64, Global>, Vec<f64, Global>)
) -> Result<StructuredMesh, Error<StandardVertex>>
pub fn try_from_positions_and_uvs(
positions: Vec<Vec<Point3<f64>, Global>, Global>,
_: (Vec<f64, Global>, Vec<f64, Global>)
) -> Result<StructuredMesh, Error<StandardVertex>>
Creates a structured polygon without normals.
sourcepub const fn from_positions_and_uvs_unchecked(
positions: Vec<Vec<Point3<f64>, Global>, Global>,
uv_divisions: (Vec<f64, Global>, Vec<f64, Global>)
) -> StructuredMesh
pub const fn from_positions_and_uvs_unchecked(
positions: Vec<Vec<Point3<f64>, Global>, Global>,
uv_divisions: (Vec<f64, Global>, Vec<f64, Global>)
) -> StructuredMesh
Creates a structured polygon without normals.
sourcepub fn from_positions_and_normals(
positions: Vec<Vec<Point3<f64>, Global>, Global>,
normals: Vec<Vec<Vector3<f64>, Global>, Global>
) -> StructuredMesh
pub fn from_positions_and_normals(
positions: Vec<Vec<Point3<f64>, Global>, Global>,
normals: Vec<Vec<Vector3<f64>, Global>, Global>
) -> StructuredMesh
Creates a structured polygon without uv divisions.
sourcepub fn try_from_positions_and_normals(
positions: Vec<Vec<Point3<f64>, Global>, Global>,
normals: Vec<Vec<Vector3<f64>, Global>, Global>
) -> Result<StructuredMesh, Error<StandardVertex>>
pub fn try_from_positions_and_normals(
positions: Vec<Vec<Point3<f64>, Global>, Global>,
normals: Vec<Vec<Vector3<f64>, Global>, Global>
) -> Result<StructuredMesh, Error<StandardVertex>>
Creates a structured polygon without uv divisions.
sourcepub const fn from_positions_and_normals_unchecked(
positions: Vec<Vec<Point3<f64>, Global>, Global>,
normals: Vec<Vec<Vector3<f64>, Global>, Global>
) -> StructuredMesh
pub const fn from_positions_and_normals_unchecked(
positions: Vec<Vec<Point3<f64>, Global>, Global>,
normals: Vec<Vec<Vector3<f64>, Global>, Global>
) -> StructuredMesh
Creates a structured polygon without uv divisions.
sourcepub fn new(
positions: Vec<Vec<Point3<f64>, Global>, Global>,
uv_division: (Vec<f64, Global>, Vec<f64, Global>),
normals: Vec<Vec<Vector3<f64>, Global>, Global>
) -> StructuredMesh
pub fn new(
positions: Vec<Vec<Point3<f64>, Global>, Global>,
uv_division: (Vec<f64, Global>, Vec<f64, Global>),
normals: Vec<Vec<Vector3<f64>, Global>, Global>
) -> StructuredMesh
Creates new structured mesh. Checks whether the size of vectors are compatible before creation.
sourcepub fn try_new(
positions: Vec<Vec<Point3<f64>, Global>, Global>,
_: (Vec<f64, Global>, Vec<f64, Global>),
normals: Vec<Vec<Vector3<f64>, Global>, Global>
) -> Result<StructuredMesh, Error<StandardVertex>>
pub fn try_new(
positions: Vec<Vec<Point3<f64>, Global>, Global>,
_: (Vec<f64, Global>, Vec<f64, Global>),
normals: Vec<Vec<Vector3<f64>, Global>, Global>
) -> Result<StructuredMesh, Error<StandardVertex>>
Creates new structured mesh. Checks whether the size of vectors are compatible before creation.
sourcepub const fn new_unchecked(
positions: Vec<Vec<Point3<f64>, Global>, Global>,
uv_division: (Vec<f64, Global>, Vec<f64, Global>),
normals: Vec<Vec<Vector3<f64>, Global>, Global>
) -> StructuredMesh
pub const fn new_unchecked(
positions: Vec<Vec<Point3<f64>, Global>, Global>,
uv_division: (Vec<f64, Global>, Vec<f64, Global>),
normals: Vec<Vec<Vector3<f64>, Global>, Global>
) -> StructuredMesh
Creates new structured mesh. Does not check whether the size of vectors are compatible before creation.
sourcepub const fn positions(&self) -> &Vec<Vec<Point3<f64>, Global>, Global> ⓘ
pub const fn positions(&self) -> &Vec<Vec<Point3<f64>, Global>, Global> ⓘ
Returns the matrix of all positions.
sourcepub fn positions_mut(&mut self) -> Vec<&mut [Point3<f64>], Global> ⓘ
pub fn positions_mut(&mut self) -> Vec<&mut [Point3<f64>], Global> ⓘ
Returns the vector of the mutable references to the rows of the positions matrix.
sourcepub fn uv_division(&self) -> Option<(&Vec<f64, Global>, &Vec<f64, Global>)>
pub fn uv_division(&self) -> Option<(&Vec<f64, Global>, &Vec<f64, Global>)>
Returns the divisions of uv coordinates.
sourcepub fn uv_division_mut(&mut self) -> Option<(&mut [f64], &mut [f64])>
pub fn uv_division_mut(&mut self) -> Option<(&mut [f64], &mut [f64])>
Returns the mutable slice of uv coordinates division.
sourcepub const fn normals(&self) -> Option<&Vec<Vec<Vector3<f64>, Global>, Global>>
pub const fn normals(&self) -> Option<&Vec<Vec<Vector3<f64>, Global>, Global>>
Returns the matrix of all normals.
sourcepub fn normals_mut(&mut self) -> Option<Vec<&mut [Vector3<f64>], Global>>
pub fn normals_mut(&mut self) -> Option<Vec<&mut [Vector3<f64>], Global>>
Returns the vector of the mutable references to the rows of the normals matrix.
sourcepub fn destruct(self) -> PolygonMesh<StandardVertex, StandardAttributes>
pub fn destruct(self) -> PolygonMesh<StandardVertex, StandardAttributes>
Creates new polygon mesh by destructing self
.
Trait Implementations§
source§impl Clone for StructuredMesh
impl Clone for StructuredMesh
source§fn clone(&self) -> StructuredMesh
fn clone(&self) -> StructuredMesh
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more