pub struct NoMaterial {
pub id: usize,
}
Expand description
No material (mockup material)
Fields§
§id: usize
Implementations§
Source§impl NoMaterial
impl NoMaterial
pub fn new() -> NoMaterial
Trait Implementations§
Source§impl Material for NoMaterial
impl Material for NoMaterial
fn get_id(&self) -> usize
Source§fn scatter(
&self,
_self_material: Arc<dyn Material>,
_: &Ray,
_: &HitRecord,
) -> Option<ScatterRecord>
fn scatter( &self, _self_material: Arc<dyn Material>, _: &Ray, _: &HitRecord, ) -> Option<ScatterRecord>
Scatter a ray at a point on the material.
Returns a tuple with the color attenuation and outgoing ray and
fn scattering_pdf(&self, _: &Ray, _: &HitRecord, _: &Ray) -> FSize
fn has_alpha(&self) -> bool
fn accept(&self, visitor: &mut dyn Visitor) -> Result<(), Box<dyn Error>>
fn material(&self) -> Option<Arc<dyn Material>>
fn color_channels(&self, _: &TextureCoordinate, _: &Point3) -> ColorRGBA
Auto Trait Implementations§
impl Freeze for NoMaterial
impl RefUnwindSafe for NoMaterial
impl Send for NoMaterial
impl Sync for NoMaterial
impl Unpin for NoMaterial
impl UnwindSafe for NoMaterial
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