Struct arendur::component::shape::ShapedPrimitive [] [src]

pub struct ShapedPrimitive<S, M> {
    pub shape: S,
    pub material: M,
    pub lighting_profile: Option<Arc<Texture<Texel = RGBSpectrumf>>>,
}

Represents a primitive made up by a single Shape

Fields

Methods

impl<S, M> ShapedPrimitive<S, M> where
    S: Shape,
    M: Material
[src]

construction

Trait Implementations

impl<S: Clone, M: Clone> Clone for ShapedPrimitive<S, M>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<S, M> Composable for ShapedPrimitive<S, M> where
    S: Shape,
    M: Material
[src]

returns bounding box in parent frame.

test for intersection. Note that its guarantees are from Shape's: - ray is specified in parent frame, - if hit, returns surface interaction data in parent frame. - if hit, ray's tmax would be updated to the hitting t. Read more

test if an intersection can occur. Might be more efficient

impl<S, M> Light for ShapedPrimitive<S, M> where
    S: Shape,
    M: Material
[src]

return the flags of the light

test if the light has delta distribution

Given a position on surface and an direction in local coordinates, evaluate the light's emitted radiance along that direction.

Given a surface pos and norm in local frame with a uniform sample in $[0, 1)$, sample an incoming direction from the light to that location, returns the sampling result in a LightSample.

Generate a photon path from the light source based on the sample info

Given position and direction of a photon path, and the light's normal return its pdfs as (pdfpos, pdfdir) Read more

Given a position and lighting ray wi of an interaction, return the pdf of it Read more

returns an estimation of total power of this light

Given a position and an incoming direction in local coordinates, evaluate the light's radiance along that direction. This method takes an RayDifferential because some light implementations might found thouse differentials helpful. Read more

preporcess with scene components, if necessary. renderers should respect this requirement. Read more

impl<S, M> Primitive for ShapedPrimitive<S, M> where
    S: Shape,
    M: Material
[src]

return the material associated with this primitive

return if the primitive can emit lights