MeshLib Java Docs
Loading...
Searching...
No Matches
Inheritance diagram for meshlib.Box2i:

Public Member Functions

 Box2i (java.lang.foreign.MemorySegment segment, java.lang.Object owner)
Box2i copy ()
void set (Box2i other)
meshlib.Vector2i min ()
void setMin (meshlib.Vector2i value)
meshlib.Vector2i max ()
void setMax (meshlib.Vector2i value)
 Box2i ()
 Box2i (meshlib.Vector2i min, meshlib.Vector2i max)
 Box2i (meshlib.NoInit _1)
meshlib.Vector2i index (int e)
meshlib.Vector2i index_mut (int e)
boolean valid ()
meshlib.Vector2i center ()
meshlib.Vector2i corner (meshlib.Vector2b c)
meshlib.Vector2i size ()
int diagonal ()
int volume ()
void include (meshlib.Vector2i pt)
void include (meshlib.Box2i b)
boolean contains (meshlib.Vector2i pt)
boolean contains (meshlib.Box2i otherbox)
meshlib.Vector2i getBoxClosestPointTo (meshlib.Vector2i pt)
boolean intersects (meshlib.Box2i b)
meshlib.Box2i intersection (meshlib.Box2i b)
meshlib.Box2i intersect (meshlib.Box2i b)
int getDistanceSq (meshlib.Box2i b)
int getDistanceSq (meshlib.Vector2i pt)
meshlib.Vector2i getProjection (meshlib.Vector2i pt)
meshlib.Box2i expanded (meshlib.Vector2i expansion)
meshlib.Box2i insignificantlyExpanded ()
boolean opEqual (meshlib.Box2i a)
boolean opNotEqual (meshlib.Box2i a)
Public Member Functions inherited from meshlib.CppStruct
final java.lang.foreign.MemorySegment rawPointer ()

Static Public Member Functions

static meshlib.Box2i fromMinAndSize (meshlib.Vector2i min, meshlib.Vector2i size)
static meshlib.Vector2b getMinBoxCorner (meshlib.Vector2i n)
static meshlib.Vector2b getMaxBoxCorner (meshlib.Vector2i n)
static int elements ()

Static Public Attributes

static final java.lang.foreign.StructLayout LAYOUT = meshlib.Ffi.structLayout(new java.lang.String[]{"min", "max"}, new java.lang.foreign.MemoryLayout[]{meshlib.Vector2i.LAYOUT, meshlib.Vector2i.LAYOUT})
static final long OFF_min = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("min"))
static final long OFF_max = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("max"))

Additional Inherited Members

Protected Member Functions inherited from meshlib.CppStruct
 CppStruct (java.lang.foreign.MemorySegment segment, java.lang.Object owner)
Protected Attributes inherited from meshlib.CppStruct
final java.lang.foreign.MemorySegment segment

Detailed Description

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

Has the same layout as the C++ struct, the fields are accessed in place in native memory.

Constructor & Destructor Documentation

◆ Box2i() [1/4]

meshlib.Box2i.Box2i ( java.lang.foreign.MemorySegment segment,
java.lang.Object owner )

Wraps a segment holding the struct. owner is kept alive as long as this wrapper is. Not for normal use.

◆ Box2i() [2/4]

meshlib.Box2i.Box2i ( )

create invalid box by default

Calls MR_Box2i_DefaultConstruct().

◆ Box2i() [3/4]

meshlib.Box2i.Box2i ( meshlib.Vector2i min,
meshlib.Vector2i max )

Generated from constructor MR::Box2i::Box2i. 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.

Calls MR_Box2i_Construct_2().

◆ Box2i() [4/4]

meshlib.Box2i.Box2i ( meshlib.NoInit _1)

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::Box2i::Box2i. The reference to the parameter _1 might be preserved in the constructed object.

Calls MR_Box2i_Construct_1().

Member Function Documentation

◆ center()

meshlib.Vector2i meshlib.Box2i.center ( )

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

Calls MR_Box2i_center().

◆ contains() [1/2]

boolean meshlib.Box2i.contains ( meshlib.Box2i otherbox)

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

Calls MR_Box2i_contains_MR_Box2i().

◆ contains() [2/2]

boolean meshlib.Box2i.contains ( meshlib.Vector2i pt)

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

Calls MR_Box2i_contains_MR_Vector2i().

◆ copy()

Box2i meshlib.Box2i.copy ( )

A copy of the struct, in its own memory.

◆ corner()

meshlib.Vector2i meshlib.Box2i.corner ( meshlib.Vector2b 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 Generated from method MR::Box2i::corner.

Calls MR_Box2i_corner().

◆ diagonal()

int meshlib.Box2i.diagonal ( )

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

Calls MR_Box2i_diagonal().

◆ elements()

int meshlib.Box2i.elements ( )
static

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

Calls MR_Box2i_Get_elements().

◆ expanded()

meshlib.Box2i meshlib.Box2i.expanded ( meshlib.Vector2i expansion)

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

Calls MR_Box2i_expanded().

◆ fromMinAndSize()

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

Generated from method MR::Box2i::fromMinAndSize.

Calls MR_Box2i_fromMinAndSize().

◆ getBoxClosestPointTo()

meshlib.Vector2i meshlib.Box2i.getBoxClosestPointTo ( meshlib.Vector2i pt)

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

Calls MR_Box2i_getBoxClosestPointTo().

◆ getDistanceSq() [1/2]

int meshlib.Box2i.getDistanceSq ( meshlib.Box2i b)

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

Calls MR_Box2i_getDistanceSq_MR_Box2i().

◆ getDistanceSq() [2/2]

int meshlib.Box2i.getDistanceSq ( meshlib.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 Generated from method MR::Box2i::getDistanceSq.

Calls MR_Box2i_getDistanceSq_MR_Vector2i().

◆ getMaxBoxCorner()

meshlib.Vector2b meshlib.Box2i.getMaxBoxCorner ( meshlib.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 maximal Generated from method MR::Box2i::getMaxBoxCorner.

Calls MR_Box2i_getMaxBoxCorner().

◆ getMinBoxCorner()

meshlib.Vector2b meshlib.Box2i.getMinBoxCorner ( meshlib.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 Generated from method MR::Box2i::getMinBoxCorner.

Calls MR_Box2i_getMinBoxCorner().

◆ getProjection()

meshlib.Vector2i meshlib.Box2i.getProjection ( meshlib.Vector2i pt)

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

Calls MR_Box2i_getProjection().

◆ include() [1/2]

void meshlib.Box2i.include ( meshlib.Box2i b)

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

Calls MR_Box2i_include_MR_Box2i().

◆ include() [2/2]

void meshlib.Box2i.include ( meshlib.Vector2i pt)

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

Calls MR_Box2i_include_MR_Vector2i().

◆ index()

meshlib.Vector2i meshlib.Box2i.index ( int e)

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

Calls MR_Box2i_index().

◆ index_mut()

meshlib.Vector2i meshlib.Box2i.index_mut ( int e)

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

Calls MR_Box2i_index_mut().

◆ insignificantlyExpanded()

meshlib.Box2i meshlib.Box2i.insignificantlyExpanded ( )

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

Calls MR_Box2i_insignificantlyExpanded().

◆ intersect()

meshlib.Box2i meshlib.Box2i.intersect ( meshlib.Box2i b)

Generated from method MR::Box2i::intersect.

Calls MR_Box2i_intersect().

◆ intersection()

meshlib.Box2i meshlib.Box2i.intersection ( meshlib.Box2i b)

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

Calls MR_Box2i_intersection().

◆ intersects()

boolean meshlib.Box2i.intersects ( meshlib.Box2i b)

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

Calls MR_Box2i_intersects().

◆ max()

meshlib.Vector2i meshlib.Box2i.max ( )

◆ min()

meshlib.Vector2i meshlib.Box2i.min ( )

◆ opEqual()

boolean meshlib.Box2i.opEqual ( meshlib.Box2i a)

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

Calls MR_equal_MR_Box2i().

◆ opNotEqual()

boolean meshlib.Box2i.opNotEqual ( meshlib.Box2i a)

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

Calls MR_not_equal_MR_Box2i().

◆ set()

void meshlib.Box2i.set ( Box2i other)

Overwrites the contents with those of another struct.

◆ setMax()

void meshlib.Box2i.setMax ( meshlib.Vector2i value)

◆ setMin()

void meshlib.Box2i.setMin ( meshlib.Vector2i value)

◆ size()

meshlib.Vector2i meshlib.Box2i.size ( )

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

Calls MR_Box2i_size().

◆ valid()

boolean meshlib.Box2i.valid ( )

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

Calls MR_Box2i_valid().

◆ volume()

int meshlib.Box2i.volume ( )

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

Calls MR_Box2i_volume().

Member Data Documentation

◆ LAYOUT

final java.lang.foreign.StructLayout meshlib.Box2i.LAYOUT = meshlib.Ffi.structLayout(new java.lang.String[]{"min", "max"}, new java.lang.foreign.MemoryLayout[]{meshlib.Vector2i.LAYOUT, meshlib.Vector2i.LAYOUT})
static

The native layout of the struct.

◆ OFF_max

final long meshlib.Box2i.OFF_max = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("max"))
static

◆ OFF_min

final long meshlib.Box2i.OFF_min = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("min"))
static

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