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

Public Member Functions

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

Static Public Member Functions

static meshlib.Box3i fromMinAndSize (meshlib.Vector3i min, meshlib.Vector3i size)
static meshlib.Vector3b getMinBoxCorner (meshlib.Vector3i n)
static meshlib.Vector3b getMaxBoxCorner (meshlib.Vector3i 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.Vector3i.LAYOUT, meshlib.Vector3i.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::Box3i.

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

Constructor & Destructor Documentation

◆ Box3i() [1/4]

meshlib.Box3i.Box3i ( 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.

◆ Box3i() [2/4]

meshlib.Box3i.Box3i ( )

create invalid box by default

Calls MR_Box3i_DefaultConstruct().

◆ Box3i() [3/4]

meshlib.Box3i.Box3i ( meshlib.Vector3i min,
meshlib.Vector3i max )

Generated from constructor MR::Box3i::Box3i. 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_Box3i_Construct_2().

◆ Box3i() [4/4]

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

Calls MR_Box3i_Construct_1().

Member Function Documentation

◆ center()

meshlib.Vector3i meshlib.Box3i.center ( )

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

Calls MR_Box3i_center().

◆ contains() [1/2]

boolean meshlib.Box3i.contains ( meshlib.Box3i otherbox)

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

Calls MR_Box3i_contains_MR_Box3i().

◆ contains() [2/2]

boolean meshlib.Box3i.contains ( meshlib.Vector3i pt)

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

Calls MR_Box3i_contains_MR_Vector3i().

◆ copy()

Box3i meshlib.Box3i.copy ( )

A copy of the struct, in its own memory.

◆ corner()

meshlib.Vector3i meshlib.Box3i.corner ( meshlib.Vector3b 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::Box3i::corner.

Calls MR_Box3i_corner().

◆ diagonal()

int meshlib.Box3i.diagonal ( )

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

Calls MR_Box3i_diagonal().

◆ elements()

int meshlib.Box3i.elements ( )
static

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

Calls MR_Box3i_Get_elements().

◆ expanded()

meshlib.Box3i meshlib.Box3i.expanded ( meshlib.Vector3i expansion)

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

Calls MR_Box3i_expanded().

◆ fromMinAndSize()

meshlib.Box3i meshlib.Box3i.fromMinAndSize ( meshlib.Vector3i min,
meshlib.Vector3i size )
static

Generated from method MR::Box3i::fromMinAndSize.

Calls MR_Box3i_fromMinAndSize().

◆ getBoxClosestPointTo()

meshlib.Vector3i meshlib.Box3i.getBoxClosestPointTo ( meshlib.Vector3i pt)

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

Calls MR_Box3i_getBoxClosestPointTo().

◆ getDistanceSq() [1/2]

int meshlib.Box3i.getDistanceSq ( meshlib.Box3i b)

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

Calls MR_Box3i_getDistanceSq_MR_Box3i().

◆ getDistanceSq() [2/2]

int meshlib.Box3i.getDistanceSq ( meshlib.Vector3i 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::Box3i::getDistanceSq.

Calls MR_Box3i_getDistanceSq_MR_Vector3i().

◆ getMaxBoxCorner()

meshlib.Vector3b meshlib.Box3i.getMaxBoxCorner ( meshlib.Vector3i 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::Box3i::getMaxBoxCorner.

Calls MR_Box3i_getMaxBoxCorner().

◆ getMinBoxCorner()

meshlib.Vector3b meshlib.Box3i.getMinBoxCorner ( meshlib.Vector3i 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::Box3i::getMinBoxCorner.

Calls MR_Box3i_getMinBoxCorner().

◆ getProjection()

meshlib.Vector3i meshlib.Box3i.getProjection ( meshlib.Vector3i 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::Box3i::getProjection.

Calls MR_Box3i_getProjection().

◆ include() [1/2]

void meshlib.Box3i.include ( meshlib.Box3i b)

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

Calls MR_Box3i_include_MR_Box3i().

◆ include() [2/2]

void meshlib.Box3i.include ( meshlib.Vector3i pt)

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

Calls MR_Box3i_include_MR_Vector3i().

◆ index()

meshlib.Vector3i meshlib.Box3i.index ( int e)

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

Calls MR_Box3i_index().

◆ index_mut()

meshlib.Vector3i meshlib.Box3i.index_mut ( int e)

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

Calls MR_Box3i_index_mut().

◆ insignificantlyExpanded()

meshlib.Box3i meshlib.Box3i.insignificantlyExpanded ( )

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

Calls MR_Box3i_insignificantlyExpanded().

◆ intersect()

meshlib.Box3i meshlib.Box3i.intersect ( meshlib.Box3i b)

Generated from method MR::Box3i::intersect.

Calls MR_Box3i_intersect().

◆ intersection()

meshlib.Box3i meshlib.Box3i.intersection ( meshlib.Box3i b)

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

Calls MR_Box3i_intersection().

◆ intersects()

boolean meshlib.Box3i.intersects ( meshlib.Box3i b)

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

Calls MR_Box3i_intersects().

◆ max()

meshlib.Vector3i meshlib.Box3i.max ( )

◆ min()

meshlib.Vector3i meshlib.Box3i.min ( )

◆ opEqual()

boolean meshlib.Box3i.opEqual ( meshlib.Box3i a)

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

Calls MR_equal_MR_Box3i().

◆ opNotEqual()

boolean meshlib.Box3i.opNotEqual ( meshlib.Box3i a)

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

Calls MR_not_equal_MR_Box3i().

◆ set()

void meshlib.Box3i.set ( Box3i other)

Overwrites the contents with those of another struct.

◆ setMax()

void meshlib.Box3i.setMax ( meshlib.Vector3i value)

◆ setMin()

void meshlib.Box3i.setMin ( meshlib.Vector3i value)

◆ size()

meshlib.Vector3i meshlib.Box3i.size ( )

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

Calls MR_Box3i_size().

◆ valid()

boolean meshlib.Box3i.valid ( )

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

Calls MR_Box3i_valid().

◆ volume()

int meshlib.Box3i.volume ( )

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

Calls MR_Box3i_volume().

Member Data Documentation

◆ LAYOUT

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

The native layout of the struct.

◆ OFF_max

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

◆ OFF_min

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

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