Struct truck_rendimpl::polymesh::StructuredMesh
source · [−]pub struct StructuredMesh { /* private fields */ }Expand description
structured quadrangle mesh
Implementations
sourceimpl StructuredMesh
impl StructuredMesh
sourcepub fn from_surface<S>(
surface: &S,
range: ((f64, f64), (f64, f64)),
tol: f64
) -> StructuredMesh where
S: ParametricSurface3D + ParameterDivision2D,
pub fn from_surface<S>(
surface: &S,
range: ((f64, f64), (f64, f64)),
tol: f64
) -> StructuredMesh where
S: ParametricSurface3D + ParameterDivision2D,
meshing the surface
Arguments
bspsurface- bspline surface to meshedtol- standard tolerance for meshing
sourceimpl 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 fn from_positions_unchecked(
positions: Vec<Vec<Point3<f64>, Global>, Global>
) -> StructuredMesh
pub 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 fn from_positions_and_uvs_unchecked(
positions: Vec<Vec<Point3<f64>, Global>, Global>,
uv_divisions: (Vec<f64, Global>, Vec<f64, Global>)
) -> StructuredMesh
pub 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 fn from_positions_and_normals_unchecked(
positions: Vec<Vec<Point3<f64>, Global>, Global>,
normals: Vec<Vec<Vector3<f64>, Global>, Global>
) -> StructuredMesh
pub 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 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 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 fn positions(&self) -> &Vec<Vec<Point3<f64>, Global>, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn positions(&self) -> &Vec<Vec<Point3<f64>, Global>, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Returns the matrix of all positions.
sourcepub fn positions_mut(&mut self) -> Vec<&mut [Point3<f64>], Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn positions_mut(&mut self) -> Vec<&mut [Point3<f64>], Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
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 fn normals(&self) -> Option<&Vec<Vec<Vector3<f64>, Global>, Global>>
pub 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
sourceimpl Clone for StructuredMesh
impl Clone for StructuredMesh
sourcefn clone(&self) -> StructuredMesh
fn clone(&self) -> StructuredMesh
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl CreateBuffers for StructuredMesh
impl CreateBuffers for StructuredMesh
sourcefn 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)
Creates buffer handlers of attributes and indices.
sourceimpl Debug for StructuredMesh
impl Debug for StructuredMesh
sourceimpl<'de> Deserialize<'de> for StructuredMesh
impl<'de> Deserialize<'de> for StructuredMesh
sourcefn 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>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Serialize for StructuredMesh
impl Serialize for StructuredMesh
sourcefn 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,
Serialize this value into the given Serde serializer. Read more
sourceimpl ToInstance<PolygonInstance> for StructuredMesh
impl ToInstance<PolygonInstance> for StructuredMesh
type State = PolygonState
type State = PolygonState
Configuation deacriptor for instance.
sourcefn to_instance(
&self,
handler: &DeviceHandler,
shaders: &PolygonShaders,
state: &PolygonState
) -> PolygonInstance
fn to_instance(
&self,
handler: &DeviceHandler,
shaders: &PolygonShaders,
state: &PolygonState
) -> PolygonInstance
Creates Instance from self.
sourceimpl ToInstance<WireFrameInstance> for StructuredMesh
impl ToInstance<WireFrameInstance> for StructuredMesh
type State = WireFrameState
type State = WireFrameState
Configuation deacriptor for instance.
sourcefn to_instance(
&self,
handler: &DeviceHandler,
shaders: &WireShaders,
state: &WireFrameState
) -> WireFrameInstance
fn to_instance(
&self,
handler: &DeviceHandler,
shaders: &WireShaders,
state: &WireFrameState
) -> WireFrameInstance
Creates Instance from self.
Auto Trait Implementations
impl RefUnwindSafe for StructuredMesh
impl Send for StructuredMesh
impl Sync for StructuredMesh
impl Unpin for StructuredMesh
impl UnwindSafe for StructuredMesh
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more