MeshLib Python Docs
Loading...
Searching...
No Matches
Inheritance diagram for mrmeshpy.ConstBox2i:

Public Member Functions

bool __eq__ (self, ConstBox2i a)
ConstVector2i __getitem__ (self, int e)
 __init__ (self, *args, **kwargs)
bool __ne__ (self, ConstBox2i a)
str __repr__ (self)
typing.Any __rlshift__ (self, typing.Any box)
Vector2i center (self)
bool contains (self, ConstVector2i pt)
bool contains (self, ConstBox2i otherbox)
Vector2i corner (self, ConstVector2b c)
int diagonal (self)
Box2i expanded (self, ConstVector2i expansion)
Vector2i getBoxClosestPointTo (self, ConstVector2i pt)
int getDistanceSq (self, ConstBox2i b)
int getDistanceSq (self, ConstVector2i pt)
Vector2i getProjection (self, ConstVector2i pt)
Box2i insignificantlyExpanded (self)
Box2i intersection (self, ConstBox2i b)
bool intersects (self, ConstBox2i b)
Vector2i size (self)
bool valid (self)
int volume (self)
ConstVector2i max (self)
ConstVector2i min (self)

Static Public Member Functions

Box2i fromMinAndSize (ConstVector2i min, ConstVector2i size)
Vector2b getMaxBoxCorner (ConstVector2i n)
Vector2b getMinBoxCorner (ConstVector2i n)

Static Public Attributes

typing elements = 2

Static Protected Attributes

typing _offsetof_max = 8
typing _offsetof_min = 0

Detailed Description

Generated from:  MR::Box2i

Box given by its min- and max- corners

Constructor & Destructor Documentation

◆ __init__()

mrmeshpy.ConstBox2i.__init__ ( self,
* args,
** kwargs )
__init__(*args, **kwargs)
Overloaded function.

1. __init__(self: meshlib.mrmeshpy.ConstBox2i) -> None

create invalid box by default

2. __init__(self: meshlib.mrmeshpy.ConstBox2i, min: meshlib.mrmeshpy.ConstVector2i, max: meshlib.mrmeshpy.ConstVector2i) -> None

3. __init__(self: meshlib.mrmeshpy.ConstBox2i, : meshlib.mrmeshpy.ConstNoInit) -> None

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

4. __init__(self: meshlib.mrmeshpy.ConstBox2i, arg0: meshlib.mrmeshpy.Box2i) -> None

Implicit copy constructor.

5. __init__(self: meshlib.mrmeshpy.ConstBox2i, : meshlib.mrmeshpy.Box2i) -> None

Member Function Documentation

◆ __eq__()

bool mrmeshpy.ConstBox2i.__eq__ ( self,
ConstBox2i a )

◆ __getitem__()

ConstVector2i mrmeshpy.ConstBox2i.__getitem__ ( self,
int e )
min/max access by 0/1 index

◆ __ne__()

bool mrmeshpy.ConstBox2i.__ne__ ( self,
ConstBox2i a )

◆ __repr__()

str mrmeshpy.ConstBox2i.__repr__ ( self)

◆ __rlshift__()

typing.Any mrmeshpy.ConstBox2i.__rlshift__ ( self,
typing.Any box )

◆ center()

Vector2i mrmeshpy.ConstBox2i.center ( self)
computes center of the box

◆ contains() [1/2]

bool mrmeshpy.ConstBox2i.contains ( self,
ConstBox2i otherbox )
checks whether given box is fully inside (the surfaces may touch) of this box

◆ contains() [2/2]

bool mrmeshpy.ConstBox2i.contains ( self,
ConstVector2i pt )
checks whether given point is inside (including the surface) of this box

◆ corner()

Vector2i mrmeshpy.ConstBox2i.corner ( self,
ConstVector2b c )
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

◆ diagonal()

int mrmeshpy.ConstBox2i.diagonal ( self)
computes length from min to max

◆ expanded()

Box2i mrmeshpy.ConstBox2i.expanded ( self,
ConstVector2i expansion )
decreases min and increased max on given value

◆ fromMinAndSize()

Box2i mrmeshpy.ConstBox2i.fromMinAndSize ( ConstVector2i min,
ConstVector2i size )
static

◆ getBoxClosestPointTo()

Vector2i mrmeshpy.ConstBox2i.getBoxClosestPointTo ( self,
ConstVector2i pt )
returns closest point in the box to given point

◆ getDistanceSq() [1/2]

int mrmeshpy.ConstBox2i.getDistanceSq ( self,
ConstBox2i b )
returns squared distance between this box and given one;
returns zero if the boxes touch or intersect

◆ getDistanceSq() [2/2]

int mrmeshpy.ConstBox2i.getDistanceSq ( self,
ConstVector2i pt )
returns squared distance between this box and given point;
returns zero if the point is inside or on the boundary of the box

◆ getMaxBoxCorner()

Vector2b mrmeshpy.ConstBox2i.getMaxBoxCorner ( ConstVector2i n)
static
considering all planes with given normal and arbitrary shift: dot(n,x) = d
finds the box's corner for which d is maximal

◆ getMinBoxCorner()

Vector2b mrmeshpy.ConstBox2i.getMinBoxCorner ( ConstVector2i n)
static
considering all planes with given normal and arbitrary shift: dot(n,x) = d
finds the box's corner for which d is minimal

◆ getProjection()

Vector2i mrmeshpy.ConstBox2i.getProjection ( self,
ConstVector2i pt )
returns the closest point on the box to the given point
for points outside the box this is equivalent to getBoxClosestPointTo

◆ insignificantlyExpanded()

Box2i mrmeshpy.ConstBox2i.insignificantlyExpanded ( self)
decreases min and increases max to their closest representable value

◆ intersection()

Box2i mrmeshpy.ConstBox2i.intersection ( self,
ConstBox2i b )
computes intersection between this and other box

◆ intersects()

bool mrmeshpy.ConstBox2i.intersects ( self,
ConstBox2i b )
checks whether this box intersects or touches given box

◆ max()

ConstVector2i mrmeshpy.ConstBox2i.max ( self)

Reimplemented in mrmeshpy.Box2i, and mrmeshpy.Box2i.

◆ min()

ConstVector2i mrmeshpy.ConstBox2i.min ( self)

Reimplemented in mrmeshpy.Box2i, and mrmeshpy.Box2i.

◆ size()

Vector2i mrmeshpy.ConstBox2i.size ( self)
computes size of the box in all dimensions

◆ valid()

bool mrmeshpy.ConstBox2i.valid ( self)
true if the box contains at least one point

◆ volume()

int mrmeshpy.ConstBox2i.volume ( self)
computes the volume of this box

Member Data Documentation

◆ _offsetof_max

typing mrmeshpy.ConstBox2i._offsetof_max = 8
staticprotected

◆ _offsetof_min

typing mrmeshpy.ConstBox2i._offsetof_min = 0
staticprotected

◆ elements

typing mrmeshpy.ConstBox2i.elements = 2
static

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