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

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,


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


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

Trait Implementations

impl Clone for TriangleMesh[src]

Auto Trait Implementations

impl !RefUnwindSafe for TriangleMesh[src]

impl Send for TriangleMesh[src]

impl Sync for TriangleMesh[src]

impl Unpin for TriangleMesh[src]

impl !UnwindSafe for TriangleMesh[src]

Blanket Implementations

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

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

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

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

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

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.