Surface2

Trait Surface2 

Source
pub trait Surface2 {
Show 18 methods // Required methods fn closest_point_local(&self, other_point: &Vector2D) -> Vector2D; fn bounding_box_local(&self) -> BoundingBox2D; fn closest_intersection_local(&self, ray: &Ray2D) -> SurfaceRayIntersection2; fn closest_normal_local(&self, other_point: &Vector2D) -> Vector2D; fn view(&self) -> &Surface2Data; // Provided methods fn intersects_local(&self, ray_local: &Ray2D) -> bool { ... } fn closest_distance_local(&self, other_point_local: &Vector2D) -> f64 { ... } fn is_inside_local(&self, other_point_local: &Vector2D) -> bool { ... } fn closest_point(&self, other_point: &Vector2D) -> Vector2D { ... } fn bounding_box(&self) -> BoundingBox2D { ... } fn intersects(&self, ray: &Ray2D) -> bool { ... } fn closest_distance(&self, other_point: &Vector2D) -> f64 { ... } fn closest_intersection(&self, ray: &Ray2D) -> SurfaceRayIntersection2 { ... } fn closest_normal(&self, other_point: &Vector2D) -> Vector2D { ... } fn update_query_engine(&self) { ... } fn is_bounded(&self) -> bool { ... } fn is_valid_geometry(&self) -> bool { ... } fn is_inside(&self, other_point: &Vector2D) -> bool { ... }
}
Expand description

Abstract base class for 2-D surface.

Required Methods§

Source

fn closest_point_local(&self, other_point: &Vector2D) -> Vector2D

Returns the closest point from the given point \p other_point to the surface in local frame.

Source

fn bounding_box_local(&self) -> BoundingBox2D

Returns the bounding box of this surface object in local frame.

Source

fn closest_intersection_local(&self, ray: &Ray2D) -> SurfaceRayIntersection2

Returns the closest intersection point for given \p ray in local frame.

Source

fn closest_normal_local(&self, other_point: &Vector2D) -> Vector2D

Returns the normal to the closest point on the surface from the given point \p other_point in local frame.

Source

fn view(&self) -> &Surface2Data

Provided Methods§

Source

fn intersects_local(&self, ray_local: &Ray2D) -> bool

Returns true if the given \p ray intersects with this surface object in local frame.

Source

fn closest_distance_local(&self, other_point_local: &Vector2D) -> f64

Returns the closest distance from the given point \p otherPoint to the point on the surface in local frame.

Source

fn is_inside_local(&self, other_point_local: &Vector2D) -> bool

Returns true if \p otherPoint is inside by given \p depth the volume defined by the surface in local frame.

Source

fn closest_point(&self, other_point: &Vector2D) -> Vector2D

Returns the closest point from the given point \p other_point to the surface.

Source

fn bounding_box(&self) -> BoundingBox2D

Returns the bounding box of this surface object.

Source

fn intersects(&self, ray: &Ray2D) -> bool

Returns true if the given \p ray intersects with this surface object.

Source

fn closest_distance(&self, other_point: &Vector2D) -> f64

Returns the closest distance from the given point \p other_point to the point on the surface.

Source

fn closest_intersection(&self, ray: &Ray2D) -> SurfaceRayIntersection2

Returns the closest intersection point for given \p ray.

Source

fn closest_normal(&self, other_point: &Vector2D) -> Vector2D

Returns the normal to the closest point on the surface from the given point \p other_point.

Source

fn update_query_engine(&self)

Updates internal spatial query engine.

Source

fn is_bounded(&self) -> bool

Returns true if bounding box can be defined.

Source

fn is_valid_geometry(&self) -> bool

Returns true if the surface is a valid geometry.

Source

fn is_inside(&self, other_point: &Vector2D) -> bool

Returns true if \p other_point is inside the volume defined by the surface.

Implementors§