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
sourceimpl 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>>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more