pub struct TriangleMesh {Show 13 fields
pub n_triangles: u32,
pub vertex_indices: Vec<u32>,
pub n_vertices: u32,
pub p: Vec<Point3f>,
pub n: Vec<Normal3f>,
pub s: Vec<Vector3f>,
pub uv: Vec<Point2f>,
pub alpha_mask: Option<Arc<dyn Texture<Float> + Send + Sync>>,
pub shadow_alpha_mask: Option<Arc<dyn Texture<Float> + Send + Sync>>,
pub object_to_world: Transform,
pub world_to_object: Transform,
pub reverse_orientation: bool,
pub transform_swaps_handedness: bool,
}Fields
n_triangles: u32the total number of triangles in the mesh
vertex_indices: Vec<u32>vector of vertex indices
n_vertices: u32the total number of vertices in the mesh
p: Vec<Point3f>vector of n_vertices vertex positions
n: Vec<Normal3f>an optional vector of normal vectors (can be empty)
s: Vec<Vector3f>an optional vector of tangent vectors (can be empty)
uv: Vec<Point2f>an optional vector of paramtric (u, v) values (texture coordinates)
alpha_mask: Option<Arc<dyn Texture<Float> + Send + Sync>>shadow_alpha_mask: Option<Arc<dyn Texture<Float> + Send + Sync>>object_to_world: Transformworld_to_object: Transformreverse_orientation: booltransform_swaps_handedness: boolImplementations
sourceimpl TriangleMesh
impl TriangleMesh
pub fn new(
object_to_world: Transform,
world_to_object: Transform,
reverse_orientation: bool,
n_triangles: u32,
vertex_indices: Vec<u32>,
n_vertices: u32,
p: Vec<Point3f>,
s: Vec<Vector3f>,
n: Vec<Normal3f>,
uv: Vec<Point2f>,
alpha_mask: Option<Arc<dyn Texture<Float> + Send + Sync>>,
shadow_alpha_mask: Option<Arc<dyn Texture<Float> + Send + Sync>>
) -> Self
Trait Implementations
sourceimpl Clone for TriangleMesh
impl Clone for TriangleMesh
sourcefn clone(&self) -> TriangleMesh
fn clone(&self) -> TriangleMesh
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
Auto Trait Implementations
impl !RefUnwindSafe for TriangleMesh
impl Send for TriangleMesh
impl Sync for TriangleMesh
impl Unpin for TriangleMesh
impl !UnwindSafe for TriangleMesh
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
sourceimpl<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)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more