pub struct Disk {
pub height: Float,
pub radius: Float,
pub inner_radius: Float,
pub phi_max: Float,
pub object_to_world: Transform,
pub world_to_object: Transform,
pub reverse_orientation: bool,
pub transform_swaps_handedness: bool,
pub material: Option<Arc<Material>>,
}
Fields§
§height: Float
§radius: Float
§inner_radius: Float
§phi_max: Float
§object_to_world: Transform
§world_to_object: Transform
§reverse_orientation: bool
§transform_swaps_handedness: bool
§material: Option<Arc<Material>>
Implementations§
source§impl Disk
impl Disk
pub fn new( object_to_world: Transform, world_to_object: Transform, reverse_orientation: bool, height: Float, radius: Float, inner_radius: Float, phi_max: Float ) -> Self
pub fn object_bound(&self) -> Bounds3f
pub fn world_bound(&self) -> Bounds3f
pub fn intersect( &self, r: &Ray, t_hit: &mut Float, isect: &mut SurfaceInteraction<'_> ) -> bool
pub fn intersect_p(&self, r: &Ray) -> bool
pub fn get_reverse_orientation(&self) -> bool
pub fn get_transform_swaps_handedness(&self) -> bool
pub fn get_object_to_world(&self) -> Transform
pub fn area(&self) -> Float
pub fn sample(&self, u: Point2f, pdf: &mut Float) -> InteractionCommon
pub fn sample_with_ref_point( &self, iref: &InteractionCommon, u: Point2f, pdf: &mut Float ) -> InteractionCommon
pub fn pdf_with_ref_point(&self, iref: &dyn Interaction, wi: &Vector3f) -> Float
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Disk
impl Send for Disk
impl Sync for Disk
impl Unpin for Disk
impl !UnwindSafe for Disk
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
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for Pwhere
R: Read + ReadEndian<P>,
P: Default,
impl<R, P> ReadPrimitive<R> for Pwhere R: Read + ReadEndian<P>, P: Default,
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian()
.