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

Public Member Functions

auto index (e:core::ffi::c_int) const -> &meshlib::Vector2f
auto index_mut (e:core::ffi::c_int) -> &mut meshlib::Vector2f
auto valid () const -> bool
auto center () const -> meshlib::Vector2f
auto corner (c:&meshlib::Vector2b) const -> meshlib::Vector2f
auto size () const -> meshlib::Vector2f
auto diagonal () const -> f32
auto volume () const -> f32
void include_mr_vector2f (pt:&meshlib::Vector2f)
void include_mr_box2f (b:&meshlib::Box2f)
auto contains_mr_vector2f (pt:&meshlib::Vector2f) const -> bool
auto contains_mr_box2f (otherbox:&meshlib::Box2f) const -> bool
auto get_box_closest_point_to (pt:&meshlib::Vector2f) const -> meshlib::Vector2f
auto intersects (b:&meshlib::Box2f) const -> bool
auto intersection (b:&meshlib::Box2f) const -> meshlib::Box2f
auto intersect (b:&meshlib::Box2f) -> &mut meshlib::Box2f
auto get_distance_sq_mr_box2f (b:&meshlib::Box2f) const -> f32
auto get_distance_sq_mr_vector2f (pt:&meshlib::Vector2f) const -> f32
auto get_projection (pt:&meshlib::Vector2f) const -> meshlib::Vector2f
auto expanded (expansion:&meshlib::Vector2f) const -> meshlib::Box2f
auto insignificantly_expanded () const -> meshlib::Box2f
auto op_equal (a:&meshlib::Box2f) const -> bool
auto op_not_equal (a:&meshlib::Box2f) const -> bool

Static Public Member Functions

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

Public Attributes

meshlib::Vector2f min
meshlib::Vector2f max

Detailed Description

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

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

Member Function Documentation

◆ center()

auto meshlib::Box2f::center ( ) const -> meshlib::Vector2f

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

Calls MR_Box2f_center().

◆ construct_1()

auto meshlib::Box2f::construct_1 ( _1:&meshlib::NoInit ) -> meshlib::Box2f
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::Box2f::Box2f.

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

◆ construct_2()

auto meshlib::Box2f::construct_2 ( min:&meshlib::Vector2f ,
max:&meshlib::Vector2f  ) -> meshlib::Box2f
static

Generated from constructor MR::Box2f::Box2f.

Calls MR_Box2f_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_box2f()

auto meshlib::Box2f::contains_mr_box2f ( otherbox:&meshlib::Box2f ) const -> bool

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

Calls MR_Box2f_contains_MR_Box2f().

◆ contains_mr_vector2f()

auto meshlib::Box2f::contains_mr_vector2f ( pt:&meshlib::Vector2f ) const -> bool

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

Calls MR_Box2f_contains_MR_Vector2f().

◆ corner()

auto meshlib::Box2f::corner ( c:&meshlib::Vector2b ) const -> meshlib::Vector2f

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::Box2f::corner.

Calls MR_Box2f_corner().

◆ diagonal()

auto meshlib::Box2f::diagonal ( ) const -> f32

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

Calls MR_Box2f_diagonal().

◆ elements()

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

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

Calls MR_Box2f_Get_elements().

◆ expanded()

auto meshlib::Box2f::expanded ( expansion:&meshlib::Vector2f ) const -> meshlib::Box2f

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

Calls MR_Box2f_expanded().

◆ from_min_and_size()

auto meshlib::Box2f::from_min_and_size ( min:&meshlib::Vector2f ,
size:&meshlib::Vector2f  ) -> meshlib::Box2f
static

Generated from method MR::Box2f::fromMinAndSize.

Calls MR_Box2f_fromMinAndSize().

◆ get_box_closest_point_to()

auto meshlib::Box2f::get_box_closest_point_to ( pt:&meshlib::Vector2f ) const -> meshlib::Vector2f

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

Calls MR_Box2f_getBoxClosestPointTo().

◆ get_distance_sq_mr_box2f()

auto meshlib::Box2f::get_distance_sq_mr_box2f ( b:&meshlib::Box2f ) const -> f32

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

Calls MR_Box2f_getDistanceSq_MR_Box2f().

◆ get_distance_sq_mr_vector2f()

auto meshlib::Box2f::get_distance_sq_mr_vector2f ( pt:&meshlib::Vector2f ) const -> f32

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::Box2f::getDistanceSq.

Calls MR_Box2f_getDistanceSq_MR_Vector2f().

◆ get_max_box_corner()

auto meshlib::Box2f::get_max_box_corner ( n:&meshlib::Vector2f ) -> 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::Box2f::getMaxBoxCorner.

Calls MR_Box2f_getMaxBoxCorner().

◆ get_min_box_corner()

auto meshlib::Box2f::get_min_box_corner ( n:&meshlib::Vector2f ) -> 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::Box2f::getMinBoxCorner.

Calls MR_Box2f_getMinBoxCorner().

◆ get_projection()

auto meshlib::Box2f::get_projection ( pt:&meshlib::Vector2f ) const -> meshlib::Vector2f

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::Box2f::getProjection.

Calls MR_Box2f_getProjection().

◆ include_mr_box2f()

void meshlib::Box2f::include_mr_box2f ( b:&meshlib::Box2f )

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

Calls MR_Box2f_include_MR_Box2f().

◆ include_mr_vector2f()

void meshlib::Box2f::include_mr_vector2f ( pt:&meshlib::Vector2f )

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

Calls MR_Box2f_include_MR_Vector2f().

◆ index()

auto meshlib::Box2f::index ( e:core::ffi::c_int ) const -> &meshlib::Vector2f

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

Calls MR_Box2f_index().

◆ index_mut()

auto meshlib::Box2f::index_mut ( e:core::ffi::c_int ) -> &mut meshlib::Vector2f

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

Calls MR_Box2f_index_mut().

◆ insignificantly_expanded()

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

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

Calls MR_Box2f_insignificantlyExpanded().

◆ intersect()

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

Generated from method MR::Box2f::intersect.

Calls MR_Box2f_intersect().

◆ intersection()

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

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

Calls MR_Box2f_intersection().

◆ intersects()

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

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

Calls MR_Box2f_intersects().

◆ new()

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

create invalid box by default

Calls MR_Box2f_DefaultConstruct().

◆ op_equal()

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

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

Calls MR_equal_MR_Box2f().

◆ op_not_equal()

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

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

Calls MR_not_equal_MR_Box2f().

◆ size()

auto meshlib::Box2f::size ( ) const -> meshlib::Vector2f

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

Calls MR_Box2f_size().

◆ valid()

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

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

Calls MR_Box2f_valid().

◆ volume()

auto meshlib::Box2f::volume ( ) const -> f32

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

Calls MR_Box2f_volume().

Member Data Documentation

◆ max

meshlib::Vector2f meshlib::Box2f::max

◆ min

meshlib::Vector2f meshlib::Box2f::min

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