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§
Sourcefn closest_point_local(&self, other_point: &Vector2D) -> Vector2D
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.
Sourcefn bounding_box_local(&self) -> BoundingBox2D
fn bounding_box_local(&self) -> BoundingBox2D
Returns the bounding box of this surface object in local frame.
Sourcefn closest_intersection_local(&self, ray: &Ray2D) -> SurfaceRayIntersection2
fn closest_intersection_local(&self, ray: &Ray2D) -> SurfaceRayIntersection2
Returns the closest intersection point for given \p ray in local frame.
Sourcefn closest_normal_local(&self, other_point: &Vector2D) -> Vector2D
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.
fn view(&self) -> &Surface2Data
Provided Methods§
Sourcefn intersects_local(&self, ray_local: &Ray2D) -> bool
fn intersects_local(&self, ray_local: &Ray2D) -> bool
Returns true if the given \p ray intersects with this surface object in local frame.
Sourcefn closest_distance_local(&self, other_point_local: &Vector2D) -> f64
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.
Sourcefn is_inside_local(&self, other_point_local: &Vector2D) -> bool
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.
Sourcefn closest_point(&self, other_point: &Vector2D) -> Vector2D
fn closest_point(&self, other_point: &Vector2D) -> Vector2D
Returns the closest point from the given point \p other_point to the surface.
Sourcefn bounding_box(&self) -> BoundingBox2D
fn bounding_box(&self) -> BoundingBox2D
Returns the bounding box of this surface object.
Sourcefn intersects(&self, ray: &Ray2D) -> bool
fn intersects(&self, ray: &Ray2D) -> bool
Returns true if the given \p ray intersects with this surface object.
Sourcefn closest_distance(&self, other_point: &Vector2D) -> f64
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.
Sourcefn closest_intersection(&self, ray: &Ray2D) -> SurfaceRayIntersection2
fn closest_intersection(&self, ray: &Ray2D) -> SurfaceRayIntersection2
Returns the closest intersection point for given \p ray.
Sourcefn closest_normal(&self, other_point: &Vector2D) -> Vector2D
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.
Sourcefn update_query_engine(&self)
fn update_query_engine(&self)
Updates internal spatial query engine.
Sourcefn is_bounded(&self) -> bool
fn is_bounded(&self) -> bool
Returns true if bounding box can be defined.
Sourcefn is_valid_geometry(&self) -> bool
fn is_valid_geometry(&self) -> bool
Returns true if the surface is a valid geometry.