Struct truck_polymesh::StructuredMesh

source ·
pub struct StructuredMesh { /* private fields */ }
Expand description

structured quadrangle mesh

Implementations§

source§

impl StructuredMesh

source

pub fn from_surface<S>( surface: &S, range: ((f64, f64), (f64, f64)), tol: f64, ) -> StructuredMesh

meshing the surface

§Arguments
  • bspsurface - bspline surface to meshed
  • tol - standard tolerance for meshing
source§

impl StructuredMesh

source

pub fn from_positions(positions: Vec<Vec<Point3>>) -> StructuredMesh

Creates a structured polygon without uv_division and normal.

source

pub fn try_from_positions( positions: Vec<Vec<Point3>>, ) -> Result<StructuredMesh, Error>

Creates a structured polygon without uv_division and normal.

source

pub const fn from_positions_unchecked( positions: Vec<Vec<Point3>>, ) -> StructuredMesh

Creates a structured polygon without uv_division and normal.

source

pub fn from_positions_and_uvs( positions: Vec<Vec<Point3>>, (u_div, v_div): (Vec<f64>, Vec<f64>), ) -> StructuredMesh

Creates a structured polygon without normals.

source

pub fn try_from_positions_and_uvs( positions: Vec<Vec<Point3>>, (u_div, v_div): (Vec<f64>, Vec<f64>), ) -> Result<StructuredMesh, Error>

Creates a structured polygon without normals.

source

pub const fn from_positions_and_uvs_unchecked( positions: Vec<Vec<Point3>>, uv_divisions: (Vec<f64>, Vec<f64>), ) -> StructuredMesh

Creates a structured polygon without normals.

source

pub fn from_positions_and_normals( positions: Vec<Vec<Point3>>, normals: Vec<Vec<Vector3>>, ) -> StructuredMesh

Creates a structured polygon without uv divisions.

source

pub fn try_from_positions_and_normals( positions: Vec<Vec<Point3>>, normals: Vec<Vec<Vector3>>, ) -> Result<StructuredMesh, Error>

Creates a structured polygon without uv divisions.

source

pub const fn from_positions_and_normals_unchecked( positions: Vec<Vec<Point3>>, normals: Vec<Vec<Vector3>>, ) -> StructuredMesh

Creates a structured polygon without uv divisions.

source

pub fn new( positions: Vec<Vec<Point3>>, uv_division: (Vec<f64>, Vec<f64>), normals: Vec<Vec<Vector3>>, ) -> StructuredMesh

Creates new structured mesh. Checks whether the size of vectors are compatible before creation.

source

pub fn try_new( positions: Vec<Vec<Point3>>, (u_div, v_div): (Vec<f64>, Vec<f64>), normals: Vec<Vec<Vector3>>, ) -> Result<StructuredMesh, Error>

Creates new structured mesh. Checks whether the size of vectors are compatible before creation.

source

pub const fn new_unchecked( positions: Vec<Vec<Point3>>, uv_division: (Vec<f64>, Vec<f64>), normals: Vec<Vec<Vector3>>, ) -> StructuredMesh

Creates new structured mesh. Does not check whether the size of vectors are compatible before creation.

source

pub const fn positions(&self) -> &Vec<Vec<Point3>>

Returns the matrix of all positions.

source

pub fn positions_mut(&mut self) -> Vec<&mut [Point3]>

Returns the vector of the mutable references to the rows of the positions matrix.

source

pub fn uv_division(&self) -> Option<(&Vec<f64>, &Vec<f64>)>

Returns the divisions of uv coordinates.

source

pub fn uv_division_mut(&mut self) -> Option<(&mut [f64], &mut [f64])>

Returns the mutable slice of uv coordinates division.

source

pub const fn normals(&self) -> Option<&Vec<Vec<Vector3>>>

Returns the matrix of all normals.

source

pub fn normals_mut(&mut self) -> Option<Vec<&mut [Vector3]>>

Returns the vector of the mutable references to the rows of the normals matrix.

source

pub fn destruct(self) -> PolygonMesh

Creates new polygon mesh by destructing self.

Trait Implementations§

source§

impl Clone for StructuredMesh

source§

fn clone(&self) -> StructuredMesh

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for StructuredMesh

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for StructuredMesh

source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for StructuredMesh

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,