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

Public Member Functions

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

Static Public Member Functions

None __init__ (*args, **kwargs)
 
None __init__ (*args, **kwargs)
 
Box2d fromMinAndSize (Vector2d min, Vector2d size)
 
Vector2b getMinBoxCorner (Vector2d n)
 

Static Public Attributes

typing elements = 2
 

Protected Member Functions

Vector2d _Subscript (self, int e)
 
Vector2d _Subscript (self, int e)
 

Detailed Description

Generated from:  MR::Box2d

Box given by its min- and max- corners

Constructor & Destructor Documentation

◆ __init__() [1/5]

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

◆ __init__() [2/5]

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

◆ __init__() [3/5]

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

◆ __init__() [4/5]

None mrmeshpy.Box2d.__init__ ( self,
Vector2d min,
Vector2d max )

◆ __init__() [5/5]

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

Member Function Documentation

◆ __eq__()

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

◆ __ne__()

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

◆ __repr__()

str mrmeshpy.Box2d.__repr__ ( self)

◆ _Subscript() [1/2]

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

◆ _Subscript() [2/2]

Vector2d mrmeshpy.Box2d._Subscript ( self,
int e )
protected

◆ center()

Vector2d mrmeshpy.Box2d.center ( self)
computes center of the box

◆ contains()

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

◆ corner()

Vector2d mrmeshpy.Box2d.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()

float mrmeshpy.Box2d.diagonal ( self)
computes length from min to max

◆ expanded()

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

◆ fromMinAndSize()

Box2d mrmeshpy.Box2d.fromMinAndSize ( Vector2d min,
Vector2d size )
static

◆ getBoxClosestPointTo()

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

◆ getDistanceSq() [1/2]

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

◆ getDistanceSq() [2/2]

float mrmeshpy.Box2d.getDistanceSq ( self,
Vector2d 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.Box2d.getMinBoxCorner ( Vector2d 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.Box2d.include ( self,
Box2d b )
minimally increases the box to include another box

◆ include() [2/2]

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

◆ insignificantlyExpanded()

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

◆ intersect()

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

◆ intersection()

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

◆ intersects()

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

◆ size()

Vector2d mrmeshpy.Box2d.size ( self)
computes size of the box in all dimensions

◆ valid()

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

◆ volume()

float mrmeshpy.Box2d.volume ( self)
computes the volume of this box

Member Data Documentation

◆ elements

typing mrmeshpy.Box2d.elements = 2
static

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