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

Public Member Functions

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

Static Public Member Functions

Box2f fromMinAndSize (ConstVector2f min, ConstVector2f size)
Vector2b getMaxBoxCorner (ConstVector2f n)
Vector2b getMinBoxCorner (ConstVector2f n)

Static Public Attributes

typing elements = 2

Static Protected Attributes

typing _offsetof_max = 8
typing _offsetof_min = 0

Detailed Description

Generated from:  MR::Box2f
Aliases:  AABBTreeBase_AABBTreeTraits_UndirectedEdgeTag_Box2f.BoxT, AABBTreeNode_AABBTreeTraits_UndirectedEdgeTag_Box2f.BoxT, AABBTreeTraits_UndirectedEdgeTag_Box2f.BoxT

Box given by its min- and max- corners

Constructor & Destructor Documentation

◆ __init__()

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

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

create invalid box by default

2. __init__(self: meshlib.mrmeshpy.ConstBox2f, min: meshlib.mrmeshpy.ConstVector2f, max: meshlib.mrmeshpy.ConstVector2f) -> None

3. __init__(self: meshlib.mrmeshpy.ConstBox2f, : 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.ConstBox2f, arg0: meshlib.mrmeshpy.Box2f) -> None

Implicit copy constructor.

5. __init__(self: meshlib.mrmeshpy.ConstBox2f, : meshlib.mrmeshpy.Box2f) -> None

Member Function Documentation

◆ __eq__()

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

◆ __getitem__()

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

◆ __ne__()

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

◆ __repr__()

str mrmeshpy.ConstBox2f.__repr__ ( self)

◆ __rlshift__()

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

◆ center()

Vector2f mrmeshpy.ConstBox2f.center ( self)
computes center of the box

◆ contains() [1/2]

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

◆ contains() [2/2]

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

◆ corner()

Vector2f mrmeshpy.ConstBox2f.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()

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

◆ expanded()

Box2f mrmeshpy.ConstBox2f.expanded ( self,
ConstVector2f expansion )
decreases min and increased max on given value

◆ fromMinAndSize()

Box2f mrmeshpy.ConstBox2f.fromMinAndSize ( ConstVector2f min,
ConstVector2f size )
static

◆ getBoxClosestPointTo()

Vector2f mrmeshpy.ConstBox2f.getBoxClosestPointTo ( self,
ConstVector2f pt )
returns closest point in the box to given point

◆ getDistanceSq() [1/2]

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

◆ getDistanceSq() [2/2]

float mrmeshpy.ConstBox2f.getDistanceSq ( self,
ConstVector2f 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.ConstBox2f.getMaxBoxCorner ( ConstVector2f 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.ConstBox2f.getMinBoxCorner ( ConstVector2f 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()

Vector2f mrmeshpy.ConstBox2f.getProjection ( self,
ConstVector2f pt )
returns the closest point on the box to the given point
for points outside the box this is equivalent to getBoxClosestPointTo

◆ insignificantlyExpanded()

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

◆ intersection()

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

◆ intersects()

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

◆ max()

ConstVector2f mrmeshpy.ConstBox2f.max ( self)

Reimplemented in mrmeshpy.Box2f, and mrmeshpy.Box2f.

◆ min()

ConstVector2f mrmeshpy.ConstBox2f.min ( self)

Reimplemented in mrmeshpy.Box2f, and mrmeshpy.Box2f.

◆ size()

Vector2f mrmeshpy.ConstBox2f.size ( self)
computes size of the box in all dimensions

◆ valid()

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

◆ volume()

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

Member Data Documentation

◆ _offsetof_max

typing mrmeshpy.ConstBox2f._offsetof_max = 8
staticprotected

◆ _offsetof_min

typing mrmeshpy.ConstBox2f._offsetof_min = 0
staticprotected

◆ elements

typing mrmeshpy.ConstBox2f.elements = 2
static

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