pub struct Curve {
pub common: Arc<CurveCommon>,
pub u_min: Float,
pub u_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§
§common: Arc<CurveCommon>
§u_min: Float
§u_max: Float
§object_to_world: Transform
§world_to_object: Transform
§reverse_orientation: bool
§transform_swaps_handedness: bool
§material: Option<Arc<Material>>
Implementations§
source§impl Curve
impl Curve
pub fn new( object_to_world: Transform, world_to_object: Transform, reverse_orientation: bool, common: Arc<CurveCommon>, u_min: Float, u_max: Float ) -> Self
pub fn create( o2w: Transform, w2o: Transform, reverse_orientation: bool, c: &[Point3f; 4], w0: Float, w1: Float, curve_type: CurveType, norm: Option<[Normal3f; 2]>, split_depth: i32 ) -> Vec<Arc<Shape>>
pub fn recursive_intersect( &self, ray: &Ray, cp: &[Point3f; 4], ray_to_object: &Transform, u0: Float, u1: Float, depth: i32, t_hit: &mut Float, _isect: &mut SurfaceInteraction<'_> ) -> bool
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 Curve
impl Send for Curve
impl Sync for Curve
impl Unpin for Curve
impl !UnwindSafe for Curve
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