MeshLib Rust Docs
Loading...
Searching...
No Matches
Inheritance diagram for meshlib::Box2d:

Public Member Functions

auto index (e:core::ffi::c_int) const -> &meshlib::Vector2d
auto index_mut (e:core::ffi::c_int) -> &mut meshlib::Vector2d
auto valid () const -> bool
auto center () const -> meshlib::Vector2d
auto corner (c:&meshlib::Vector2b) const -> meshlib::Vector2d
auto size () const -> meshlib::Vector2d
auto diagonal () const -> f64
auto volume () const -> f64
void include_mr_vector2d (pt:&meshlib::Vector2d)
void include_mr_box2d (b:&meshlib::Box2d)
auto contains_mr_vector2d (pt:&meshlib::Vector2d) const -> bool
auto contains_mr_box2d (otherbox:&meshlib::Box2d) const -> bool
auto get_box_closest_point_to (pt:&meshlib::Vector2d) const -> meshlib::Vector2d
auto intersects (b:&meshlib::Box2d) const -> bool
auto intersection (b:&meshlib::Box2d) const -> meshlib::Box2d
auto intersect (b:&meshlib::Box2d) -> &mut meshlib::Box2d
auto get_distance_sq_mr_box2d (b:&meshlib::Box2d) const -> f64
auto get_distance_sq_mr_vector2d (pt:&meshlib::Vector2d) const -> f64
auto get_projection (pt:&meshlib::Vector2d) const -> meshlib::Vector2d
auto expanded (expansion:&meshlib::Vector2d) const -> meshlib::Box2d
auto insignificantly_expanded () const -> meshlib::Box2d
auto op_equal (a:&meshlib::Box2d) const -> bool
auto op_not_equal (a:&meshlib::Box2d) const -> bool

Static Public Member Functions

static auto new () -> meshlib::Box2d
static auto construct_2 (min:&meshlib::Vector2d, max:&meshlib::Vector2d) -> meshlib::Box2d
static auto construct_1 (_1:&meshlib::NoInit) -> meshlib::Box2d
static auto from_min_and_size (min:&meshlib::Vector2d, size:&meshlib::Vector2d) -> meshlib::Box2d
static auto get_min_box_corner (n:&meshlib::Vector2d) -> meshlib::Vector2b
static auto get_max_box_corner (n:&meshlib::Vector2d) -> meshlib::Vector2b
static auto elements () -> *const core::ffi::c_int

Public Attributes

meshlib::Vector2d min
meshlib::Vector2d max

Detailed Description

Box given by its min- and max- corners Generated from class MR::Box2d.

Generated from struct MR::Box2d. The fields are accessed directly.

Member Function Documentation

◆ center()

auto meshlib::Box2d::center ( ) const -> meshlib::Vector2d

computes center of the box Generated from method MR::Box2d::center.

Calls MR_Box2d_center().

◆ construct_1()

auto meshlib::Box2d::construct_1 ( _1:&meshlib::NoInit ) -> meshlib::Box2d
static

If the compiler supports requires, use that instead of std::enable_if here. Not (only) because it looks cooler, but because of a bug in our binding generator that makes it choke on it: https://github.com/MeshInspector/mrbind/issues/19 Generated from constructor MR::Box2d::Box2d.

Calls MR_Box2d_Construct_1(). The reference to the parameter _1 might be preserved in the constructed object.

◆ construct_2()

auto meshlib::Box2d::construct_2 ( min:&meshlib::Vector2d ,
max:&meshlib::Vector2d  ) -> meshlib::Box2d
static

Generated from constructor MR::Box2d::Box2d.

Calls MR_Box2d_Construct_2(). The reference to the parameter min might be preserved in the constructed object. The reference to the parameter max might be preserved in the constructed object.

◆ contains_mr_box2d()

auto meshlib::Box2d::contains_mr_box2d ( otherbox:&meshlib::Box2d ) const -> bool

checks whether given box is fully inside (the surfaces may touch) of this box Generated from method MR::Box2d::contains.

Calls MR_Box2d_contains_MR_Box2d().

◆ contains_mr_vector2d()

auto meshlib::Box2d::contains_mr_vector2d ( pt:&meshlib::Vector2d ) const -> bool

checks whether given point is inside (including the surface) of this box Generated from method MR::Box2d::contains.

Calls MR_Box2d_contains_MR_Vector2d().

◆ corner()

auto meshlib::Box2d::corner ( c:&meshlib::Vector2b ) const -> meshlib::Vector2d

returns the corner of this box as specified by given bool-vector: 0 element in (c) means take min's coordinate, 1 element in (c) means take max's coordinate Generated from method MR::Box2d::corner.

Calls MR_Box2d_corner().

◆ diagonal()

auto meshlib::Box2d::diagonal ( ) const -> f64

computes length from min to max Generated from method MR::Box2d::diagonal.

Calls MR_Box2d_diagonal().

◆ elements()

auto meshlib::Box2d::elements ( ) -> *const core::ffi::c_int
static

Returns a pointer to a member variable of class MR::Box2d named elements.

Calls MR_Box2d_Get_elements().

◆ expanded()

auto meshlib::Box2d::expanded ( expansion:&meshlib::Vector2d ) const -> meshlib::Box2d

decreases min and increased max on given value Generated from method MR::Box2d::expanded.

Calls MR_Box2d_expanded().

◆ from_min_and_size()

auto meshlib::Box2d::from_min_and_size ( min:&meshlib::Vector2d ,
size:&meshlib::Vector2d  ) -> meshlib::Box2d
static

Generated from method MR::Box2d::fromMinAndSize.

Calls MR_Box2d_fromMinAndSize().

◆ get_box_closest_point_to()

auto meshlib::Box2d::get_box_closest_point_to ( pt:&meshlib::Vector2d ) const -> meshlib::Vector2d

returns closest point in the box to given point Generated from method MR::Box2d::getBoxClosestPointTo.

Calls MR_Box2d_getBoxClosestPointTo().

◆ get_distance_sq_mr_box2d()

auto meshlib::Box2d::get_distance_sq_mr_box2d ( b:&meshlib::Box2d ) const -> f64

returns squared distance between this box and given one; returns zero if the boxes touch or intersect Generated from method MR::Box2d::getDistanceSq.

Calls MR_Box2d_getDistanceSq_MR_Box2d().

◆ get_distance_sq_mr_vector2d()

auto meshlib::Box2d::get_distance_sq_mr_vector2d ( pt:&meshlib::Vector2d ) const -> f64

returns squared distance between this box and given point; returns zero if the point is inside or on the boundary of the box Generated from method MR::Box2d::getDistanceSq.

Calls MR_Box2d_getDistanceSq_MR_Vector2d().

◆ get_max_box_corner()

auto meshlib::Box2d::get_max_box_corner ( n:&meshlib::Vector2d ) -> meshlib::Vector2b
static

considering all planes with given normal and arbitrary shift: dot(n,x) = d finds the box's corner for which d is maximal Generated from method MR::Box2d::getMaxBoxCorner.

Calls MR_Box2d_getMaxBoxCorner().

◆ get_min_box_corner()

auto meshlib::Box2d::get_min_box_corner ( n:&meshlib::Vector2d ) -> meshlib::Vector2b
static

considering all planes with given normal and arbitrary shift: dot(n,x) = d finds the box's corner for which d is minimal Generated from method MR::Box2d::getMinBoxCorner.

Calls MR_Box2d_getMinBoxCorner().

◆ get_projection()

auto meshlib::Box2d::get_projection ( pt:&meshlib::Vector2d ) const -> meshlib::Vector2d

returns the closest point on the box to the given point for points outside the box this is equivalent to getBoxClosestPointTo Generated from method MR::Box2d::getProjection.

Calls MR_Box2d_getProjection().

◆ include_mr_box2d()

void meshlib::Box2d::include_mr_box2d ( b:&meshlib::Box2d )

minimally increases the box to include another box Generated from method MR::Box2d::include.

Calls MR_Box2d_include_MR_Box2d().

◆ include_mr_vector2d()

void meshlib::Box2d::include_mr_vector2d ( pt:&meshlib::Vector2d )

minimally increases the box to include given point Generated from method MR::Box2d::include.

Calls MR_Box2d_include_MR_Vector2d().

◆ index()

auto meshlib::Box2d::index ( e:core::ffi::c_int ) const -> &meshlib::Vector2d

min/max access by 0/1 index Generated from method MR::Box2d::operator[].

Calls MR_Box2d_index().

◆ index_mut()

auto meshlib::Box2d::index_mut ( e:core::ffi::c_int ) -> &mut meshlib::Vector2d

Generated from method MR::Box2d::operator[].

Calls MR_Box2d_index_mut().

◆ insignificantly_expanded()

auto meshlib::Box2d::insignificantly_expanded ( ) const -> meshlib::Box2d

decreases min and increases max to their closest representable value Generated from method MR::Box2d::insignificantlyExpanded.

Calls MR_Box2d_insignificantlyExpanded().

◆ intersect()

auto meshlib::Box2d::intersect ( b:&meshlib::Box2d ) -> &mut meshlib::Box2d

Generated from method MR::Box2d::intersect.

Calls MR_Box2d_intersect().

◆ intersection()

auto meshlib::Box2d::intersection ( b:&meshlib::Box2d ) const -> meshlib::Box2d

computes intersection between this and other box Generated from method MR::Box2d::intersection.

Calls MR_Box2d_intersection().

◆ intersects()

auto meshlib::Box2d::intersects ( b:&meshlib::Box2d ) const -> bool

checks whether this box intersects or touches given box Generated from method MR::Box2d::intersects.

Calls MR_Box2d_intersects().

◆ new()

auto meshlib::Box2d::new ( ) -> meshlib::Box2d
static

create invalid box by default

Calls MR_Box2d_DefaultConstruct().

◆ op_equal()

auto meshlib::Box2d::op_equal ( a:&meshlib::Box2d ) const -> bool

Generated from method MR::Box2d::operator==.

Calls MR_equal_MR_Box2d().

◆ op_not_equal()

auto meshlib::Box2d::op_not_equal ( a:&meshlib::Box2d ) const -> bool

Generated from method MR::Box2d::operator!=.

Calls MR_not_equal_MR_Box2d().

◆ size()

auto meshlib::Box2d::size ( ) const -> meshlib::Vector2d

computes size of the box in all dimensions Generated from method MR::Box2d::size.

Calls MR_Box2d_size().

◆ valid()

auto meshlib::Box2d::valid ( ) const -> bool

true if the box contains at least one point Generated from method MR::Box2d::valid.

Calls MR_Box2d_valid().

◆ volume()

auto meshlib::Box2d::volume ( ) const -> f64

computes the volume of this box Generated from method MR::Box2d::volume.

Calls MR_Box2d_volume().

Member Data Documentation

◆ max

meshlib::Vector2d meshlib::Box2d::max

◆ min

meshlib::Vector2d meshlib::Box2d::min

The documentation for this struct was generated from the following file: