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>>>) -> StructuredMesh
pub fn from_positions(positions: Vec<Vec<Point3<f64>>>) -> StructuredMesh
Creates a structured polygon without uv_division and normal.
Sourcepub fn try_from_positions(
positions: Vec<Vec<Point3<f64>>>,
) -> Result<StructuredMesh, Error>
pub fn try_from_positions( positions: Vec<Vec<Point3<f64>>>, ) -> Result<StructuredMesh, Error>
Creates a structured polygon without uv_division and normal.
Sourcepub const fn from_positions_unchecked(
positions: Vec<Vec<Point3<f64>>>,
) -> StructuredMesh
pub const fn from_positions_unchecked( positions: Vec<Vec<Point3<f64>>>, ) -> StructuredMesh
Creates a structured polygon without uv_division and normal.
Sourcepub fn from_positions_and_uvs(
positions: Vec<Vec<Point3<f64>>>,
_: (Vec<f64>, Vec<f64>),
) -> StructuredMesh
pub fn from_positions_and_uvs( positions: Vec<Vec<Point3<f64>>>, _: (Vec<f64>, Vec<f64>), ) -> StructuredMesh
Creates a structured polygon without normals.
Sourcepub fn try_from_positions_and_uvs(
positions: Vec<Vec<Point3<f64>>>,
_: (Vec<f64>, Vec<f64>),
) -> Result<StructuredMesh, Error>
pub fn try_from_positions_and_uvs( positions: Vec<Vec<Point3<f64>>>, _: (Vec<f64>, Vec<f64>), ) -> Result<StructuredMesh, Error>
Creates a structured polygon without normals.
Sourcepub const fn from_positions_and_uvs_unchecked(
positions: Vec<Vec<Point3<f64>>>,
uv_divisions: (Vec<f64>, Vec<f64>),
) -> StructuredMesh
pub const fn from_positions_and_uvs_unchecked( positions: Vec<Vec<Point3<f64>>>, uv_divisions: (Vec<f64>, Vec<f64>), ) -> StructuredMesh
Creates a structured polygon without normals.
Sourcepub fn from_positions_and_normals(
positions: Vec<Vec<Point3<f64>>>,
normals: Vec<Vec<Vector3<f64>>>,
) -> StructuredMesh
pub fn from_positions_and_normals( positions: Vec<Vec<Point3<f64>>>, normals: Vec<Vec<Vector3<f64>>>, ) -> StructuredMesh
Creates a structured polygon without uv divisions.
Sourcepub fn try_from_positions_and_normals(
positions: Vec<Vec<Point3<f64>>>,
normals: Vec<Vec<Vector3<f64>>>,
) -> Result<StructuredMesh, Error>
pub fn try_from_positions_and_normals( positions: Vec<Vec<Point3<f64>>>, normals: Vec<Vec<Vector3<f64>>>, ) -> Result<StructuredMesh, Error>
Creates a structured polygon without uv divisions.
Sourcepub const fn from_positions_and_normals_unchecked(
positions: Vec<Vec<Point3<f64>>>,
normals: Vec<Vec<Vector3<f64>>>,
) -> StructuredMesh
pub const fn from_positions_and_normals_unchecked( positions: Vec<Vec<Point3<f64>>>, normals: Vec<Vec<Vector3<f64>>>, ) -> StructuredMesh
Creates a structured polygon without uv divisions.
Sourcepub fn new(
positions: Vec<Vec<Point3<f64>>>,
uv_division: (Vec<f64>, Vec<f64>),
normals: Vec<Vec<Vector3<f64>>>,
) -> StructuredMesh
pub fn new( positions: Vec<Vec<Point3<f64>>>, uv_division: (Vec<f64>, Vec<f64>), normals: Vec<Vec<Vector3<f64>>>, ) -> StructuredMesh
Creates new structured mesh. Checks whether the size of vectors are compatible before creation.
Sourcepub fn try_new(
positions: Vec<Vec<Point3<f64>>>,
_: (Vec<f64>, Vec<f64>),
normals: Vec<Vec<Vector3<f64>>>,
) -> Result<StructuredMesh, Error>
pub fn try_new( positions: Vec<Vec<Point3<f64>>>, _: (Vec<f64>, Vec<f64>), normals: Vec<Vec<Vector3<f64>>>, ) -> Result<StructuredMesh, Error>
Creates new structured mesh. Checks whether the size of vectors are compatible before creation.
Sourcepub const fn new_unchecked(
positions: Vec<Vec<Point3<f64>>>,
uv_division: (Vec<f64>, Vec<f64>),
normals: Vec<Vec<Vector3<f64>>>,
) -> StructuredMesh
pub const fn new_unchecked( positions: Vec<Vec<Point3<f64>>>, uv_division: (Vec<f64>, Vec<f64>), normals: Vec<Vec<Vector3<f64>>>, ) -> StructuredMesh
Creates new structured mesh. Does not check whether the size of vectors are compatible before creation.
Sourcepub fn positions_mut(&mut self) -> Vec<&mut [Point3<f64>]>
pub fn positions_mut(&mut self) -> Vec<&mut [Point3<f64>]>
Returns the vector of the mutable references to the rows of the positions matrix.
Sourcepub fn uv_division(&self) -> Option<(&Vec<f64>, &Vec<f64>)>
pub fn uv_division(&self) -> Option<(&Vec<f64>, &Vec<f64>)>
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>>>>
pub const fn normals(&self) -> Option<&Vec<Vec<Vector3<f64>>>>
Returns the matrix of all normals.
Sourcepub fn normals_mut(&mut self) -> Option<Vec<&mut [Vector3<f64>]>>
pub fn normals_mut(&mut self) -> Option<Vec<&mut [Vector3<f64>]>>
Returns the vector of the mutable references to the rows of the normals matrix.
Sourcepub fn destruct(self) -> PolygonMesh
pub fn destruct(self) -> PolygonMesh
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§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl CreateBuffers for StructuredMesh
impl CreateBuffers for StructuredMesh
Source§fn buffers(
&self,
vertex_usage: BufferUsages,
index_usage: BufferUsages,
device: &Device,
) -> (BufferHandler, BufferHandler)
fn buffers( &self, vertex_usage: BufferUsages, index_usage: BufferUsages, device: &Device, ) -> (BufferHandler, BufferHandler)
Source§impl Debug for StructuredMesh
impl Debug for StructuredMesh
Source§impl<'de> Deserialize<'de> for StructuredMesh
impl<'de> Deserialize<'de> for StructuredMesh
Source§fn deserialize<D>(
deserializer: D,
) -> Result<StructuredMesh, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<StructuredMesh, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Source§impl Serialize for StructuredMesh
impl Serialize for StructuredMesh
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Source§impl ToInstance<PolygonInstance> for StructuredMesh
impl ToInstance<PolygonInstance> for StructuredMesh
Source§type State = PolygonState
type State = PolygonState
Source§fn to_instance(
&self,
handler: &DeviceHandler,
shaders: &PolygonShaders,
state: &PolygonState,
) -> PolygonInstance
fn to_instance( &self, handler: &DeviceHandler, shaders: &PolygonShaders, state: &PolygonState, ) -> PolygonInstance
Instance from self.Source§impl ToInstance<WireFrameInstance> for StructuredMesh
impl ToInstance<WireFrameInstance> for StructuredMesh
Source§type State = WireFrameState
type State = WireFrameState
Source§fn to_instance(
&self,
handler: &DeviceHandler,
shaders: &WireShaders,
state: &WireFrameState,
) -> WireFrameInstance
fn to_instance( &self, handler: &DeviceHandler, shaders: &WireShaders, state: &WireFrameState, ) -> WireFrameInstance
Instance from self.Auto Trait Implementations§
impl Freeze for StructuredMesh
impl RefUnwindSafe for StructuredMesh
impl Send for StructuredMesh
impl Sync for StructuredMesh
impl Unpin for StructuredMesh
impl UnwindSafe for StructuredMesh
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more