MeshLib Python Docs
Loading...
Searching...
No Matches
mrmeshpy.Box2i Class Reference

Public Member Functions

bool __eq__ (self, Box2i a)
 
None __init__ (self)
 
None __init__ (self, Vector2i min, Vector2i max)
 
None __init__ (self, Box2i arg0)
 
bool __ne__ (self, Box2i a)
 
str __repr__ (self)
 
Vector2i center (self)
 
bool contains (self, Vector2i pt)
 
Vector2i corner (self, Vector2b c)
 
int diagonal (self)
 
Box2i expanded (self, Vector2i expansion)
 
Vector2i getBoxClosestPointTo (self, Vector2i pt)
 
int getDistanceSq (self, Box2i b)
 
int getDistanceSq (self, Vector2i pt)
 
None include (self, Vector2i pt)
 
None include (self, Box2i b)
 
Box2i insignificantlyExpanded (self)
 
Box2i intersect (self, Box2i b)
 
Box2i intersection (self, Box2i b)
 
bool intersects (self, Box2i b)
 
Vector2i size (self)
 
bool valid (self)
 
int volume (self)
 

Static Public Member Functions

None __init__ (*args, **kwargs)
 
None __init__ (*args, **kwargs)
 
Box2i fromMinAndSize (Vector2i min, Vector2i size)
 
Vector2b getMinBoxCorner (Vector2i n)
 

Static Public Attributes

typing elements = 2
 

Protected Member Functions

Vector2i _Subscript (self, int e)
 
Vector2i _Subscript (self, int e)
 

Detailed Description

Generated from:  MR::Box2i

Box given by its min- and max- corners

Constructor & Destructor Documentation

◆ __init__() [1/5]

None mrmeshpy.Box2i.__init__ ( * args,
** kwargs )
static
skip initialization of min/max

◆ __init__() [2/5]

None mrmeshpy.Box2i.__init__ ( * args,
** kwargs )
static

◆ __init__() [3/5]

None mrmeshpy.Box2i.__init__ ( self)
create invalid box by default

◆ __init__() [4/5]

None mrmeshpy.Box2i.__init__ ( self,
Vector2i min,
Vector2i max )

◆ __init__() [5/5]

None mrmeshpy.Box2i.__init__ ( self,
Box2i arg0 )
Implicit copy constructor.

Member Function Documentation

◆ __eq__()

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

◆ __ne__()

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

◆ __repr__()

str mrmeshpy.Box2i.__repr__ ( self)

◆ _Subscript() [1/2]

Vector2i mrmeshpy.Box2i._Subscript ( self,
int e )
protected
min/max access by 0/1 index

◆ _Subscript() [2/2]

Vector2i mrmeshpy.Box2i._Subscript ( self,
int e )
protected

◆ center()

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

◆ contains()

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

◆ corner()

Vector2i mrmeshpy.Box2i.corner ( self,
Vector2b c )
returns the corner of this box as specified by given bool-vector:
1 element in (c) means take min's coordinate,
0 element in (c) means take max's coordinate

◆ diagonal()

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

◆ expanded()

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

◆ fromMinAndSize()

Box2i mrmeshpy.Box2i.fromMinAndSize ( Vector2i min,
Vector2i size )
static

◆ getBoxClosestPointTo()

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

◆ getDistanceSq() [1/2]

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

◆ getDistanceSq() [2/2]

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

◆ getMinBoxCorner()

Vector2b mrmeshpy.Box2i.getMinBoxCorner ( Vector2i 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

◆ include() [1/2]

None mrmeshpy.Box2i.include ( self,
Box2i b )
minimally increases the box to include another box

◆ include() [2/2]

None mrmeshpy.Box2i.include ( self,
Vector2i pt )
minimally increases the box to include given point

◆ insignificantlyExpanded()

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

◆ intersect()

Box2i mrmeshpy.Box2i.intersect ( self,
Box2i b )

◆ intersection()

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

◆ intersects()

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

◆ size()

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

◆ valid()

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

◆ volume()

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

Member Data Documentation

◆ elements

typing mrmeshpy.Box2i.elements = 2
static

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