pub struct TriangleMesh {
pub positions: Vec<Vector3<f32>>,
pub normals: Option<Vec<Vector3<f32>>>,
pub triangle_indices: Vec<Triangle<u32>>,
}Expand description
Triangle mesh
Fields§
§positions: Vec<Vector3<f32>>Mesh Vertices
normals: Option<Vec<Vector3<f32>>>Optional normals.
triangle_indices: Vec<Triangle<u32>>Triangle indices.
Implementations§
Source§impl TriangleMesh
impl TriangleMesh
Sourcepub fn append(&mut self, other: &TriangleMesh)
pub fn append(&mut self, other: &TriangleMesh)
Append a triangle mesh.
Sourcepub fn to_manifold(&self) -> Manifold
pub fn to_manifold(&self) -> Manifold
Convert mesh to manifold.
Trait Implementations§
Source§impl CalcBounds3D for TriangleMesh
impl CalcBounds3D for TriangleMesh
Source§fn calc_bounds_3d(&self) -> Bounds3D
fn calc_bounds_3d(&self) -> Bounds3D
Fetch bounds.
Source§impl Clone for TriangleMesh
impl Clone for TriangleMesh
Source§fn clone(&self) -> TriangleMesh
fn clone(&self) -> TriangleMesh
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for TriangleMesh
impl Default for TriangleMesh
Source§fn default() -> TriangleMesh
fn default() -> TriangleMesh
Returns the “default value” for a type. Read more
Source§impl From<&Geometries3D> for TriangleMesh
impl From<&Geometries3D> for TriangleMesh
Source§fn from(geo: &Geometries3D) -> Self
fn from(geo: &Geometries3D) -> Self
Converts to this type from the input type.
Source§impl From<&Geometry3D> for TriangleMesh
impl From<&Geometry3D> for TriangleMesh
Source§fn from(geo: &Geometry3D) -> Self
fn from(geo: &Geometry3D) -> Self
Converts to this type from the input type.
Source§impl From<Geometry3D> for TriangleMesh
impl From<Geometry3D> for TriangleMesh
Source§fn from(geo: Geometry3D) -> Self
fn from(geo: Geometry3D) -> Self
Converts to this type from the input type.
Source§impl From<Manifold> for TriangleMesh
impl From<Manifold> for TriangleMesh
Source§impl From<Mesh> for TriangleMesh
impl From<Mesh> for TriangleMesh
Source§impl From<TriangleMesh> for Geometry3D
impl From<TriangleMesh> for Geometry3D
Source§fn from(value: TriangleMesh) -> Self
fn from(value: TriangleMesh) -> Self
Converts to this type from the input type.
Source§impl From<TriangleMesh> for Mesh
impl From<TriangleMesh> for Mesh
Source§fn from(mesh: TriangleMesh) -> Self
fn from(mesh: TriangleMesh) -> Self
Converts to this type from the input type.
Source§impl Mirror3D for TriangleMesh
impl Mirror3D for TriangleMesh
Source§fn mirror_3d(self, plane: &Plane) -> Geometries3D
fn mirror_3d(self, plane: &Plane) -> Geometries3D
Mirror operation.
Source§impl Reflect3D for TriangleMesh
impl Reflect3D for TriangleMesh
Source§fn reflect_3d(&self, plane: &Plane) -> Self
fn reflect_3d(&self, plane: &Plane) -> Self
Mirror a 2D geometry.
Source§impl TotalMemory for TriangleMesh
impl TotalMemory for TriangleMesh
Source§fn heap_memory(&self) -> usize
fn heap_memory(&self) -> usize
Get amount of heap memory in bytes.
Source§fn total_memory(&self) -> usize
fn total_memory(&self) -> usize
Total amount of memory in bytes.
Source§fn stack_memory(&self) -> usize
fn stack_memory(&self) -> usize
Get amount of stack memory in bytes.
Source§impl Transformed3D for TriangleMesh
impl Transformed3D for TriangleMesh
Source§fn transformed_3d(&self, mat: &Mat4) -> Self
fn transformed_3d(&self, mat: &Mat4) -> Self
Transform from matrix.
Source§impl VertexCount for TriangleMesh
impl VertexCount for TriangleMesh
Source§fn vertex_count(&self) -> usize
fn vertex_count(&self) -> usize
Return vertex count.
Auto Trait Implementations§
impl Freeze for TriangleMesh
impl RefUnwindSafe for TriangleMesh
impl Send for TriangleMesh
impl Sync for TriangleMesh
impl Unpin for TriangleMesh
impl UnwindSafe for TriangleMesh
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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 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>
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