[][src]Struct pbrt::shapes::triangle::TriangleMesh

pub struct TriangleMesh {
    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: Transformworld_to_object: Transformreverse_orientation: booltransform_swaps_handedness: bool

Implementations

impl TriangleMesh[src]

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
[src]

Trait Implementations

impl Clone for TriangleMesh[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.