Struct rs_pbrt::shapes::triangle::TriangleMesh
source · 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: u32
the total number of triangles in the mesh
vertex_indices: Vec<u32>
vector of vertex indices
n_vertices: u32
the 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: Transform
§world_to_object: Transform
§reverse_orientation: bool
§transform_swaps_handedness: bool
Implementations§
source§impl 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§
source§impl Clone for TriangleMesh
impl Clone for TriangleMesh
source§fn clone(&self) -> TriangleMesh
fn clone(&self) -> TriangleMesh
Returns a copy 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 moreAuto Trait Implementations§
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