pub struct Triangle {
pub id: u32,
/* private fields */
}
Fields
id: u32
Implementations
sourceimpl Triangle
impl Triangle
pub fn new(mesh: Arc<TriangleMesh>, tri_number: u32) -> Self
pub fn get_uvs(&self) -> [Point2f; 3]
pub fn object_bound(&self) -> Bounds3f
pub fn world_bound(&self) -> Bounds3f
pub fn intersect(
&self,
ray: &Ray,
t_hit: &mut Float,
isect: &mut SurfaceInteraction<'_>
) -> bool
pub fn intersect_p(&self, ray: &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 Triangle
impl Send for Triangle
impl Sync for Triangle
impl Unpin for Triangle
impl !UnwindSafe for Triangle
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