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

Public Member Functions

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

Static Public Member Functions

static meshlib.Box2d fromMinAndSize (meshlib.Vector2d min, meshlib.Vector2d size)
static meshlib.Vector2b getMinBoxCorner (meshlib.Vector2d n)
static meshlib.Vector2b getMaxBoxCorner (meshlib.Vector2d 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.Vector2d.LAYOUT, meshlib.Vector2d.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::Box2d.

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

Constructor & Destructor Documentation

◆ Box2d() [1/4]

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

◆ Box2d() [2/4]

meshlib.Box2d.Box2d ( )

create invalid box by default

Calls MR_Box2d_DefaultConstruct().

◆ Box2d() [3/4]

meshlib.Box2d.Box2d ( meshlib.Vector2d min,
meshlib.Vector2d max )

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

◆ Box2d() [4/4]

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

Calls MR_Box2d_Construct_1().

Member Function Documentation

◆ center()

meshlib.Vector2d meshlib.Box2d.center ( )

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

Calls MR_Box2d_center().

◆ contains() [1/2]

boolean meshlib.Box2d.contains ( meshlib.Box2d otherbox)

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

Calls MR_Box2d_contains_MR_Box2d().

◆ contains() [2/2]

boolean meshlib.Box2d.contains ( meshlib.Vector2d pt)

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

Calls MR_Box2d_contains_MR_Vector2d().

◆ copy()

Box2d meshlib.Box2d.copy ( )

A copy of the struct, in its own memory.

◆ corner()

meshlib.Vector2d meshlib.Box2d.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::Box2d::corner.

Calls MR_Box2d_corner().

◆ diagonal()

double meshlib.Box2d.diagonal ( )

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

Calls MR_Box2d_diagonal().

◆ elements()

int meshlib.Box2d.elements ( )
static

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

Calls MR_Box2d_Get_elements().

◆ expanded()

meshlib.Box2d meshlib.Box2d.expanded ( meshlib.Vector2d expansion)

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

Calls MR_Box2d_expanded().

◆ fromMinAndSize()

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

Generated from method MR::Box2d::fromMinAndSize.

Calls MR_Box2d_fromMinAndSize().

◆ getBoxClosestPointTo()

meshlib.Vector2d meshlib.Box2d.getBoxClosestPointTo ( meshlib.Vector2d pt)

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

Calls MR_Box2d_getBoxClosestPointTo().

◆ getDistanceSq() [1/2]

double meshlib.Box2d.getDistanceSq ( meshlib.Box2d b)

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

Calls MR_Box2d_getDistanceSq_MR_Box2d().

◆ getDistanceSq() [2/2]

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

Calls MR_Box2d_getDistanceSq_MR_Vector2d().

◆ getMaxBoxCorner()

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

Calls MR_Box2d_getMaxBoxCorner().

◆ getMinBoxCorner()

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

Calls MR_Box2d_getMinBoxCorner().

◆ getProjection()

meshlib.Vector2d meshlib.Box2d.getProjection ( meshlib.Vector2d 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::Box2d::getProjection.

Calls MR_Box2d_getProjection().

◆ include() [1/2]

void meshlib.Box2d.include ( meshlib.Box2d b)

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

Calls MR_Box2d_include_MR_Box2d().

◆ include() [2/2]

void meshlib.Box2d.include ( meshlib.Vector2d pt)

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

Calls MR_Box2d_include_MR_Vector2d().

◆ index()

meshlib.Vector2d meshlib.Box2d.index ( int e)

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

Calls MR_Box2d_index().

◆ index_mut()

meshlib.Vector2d meshlib.Box2d.index_mut ( int e)

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

Calls MR_Box2d_index_mut().

◆ insignificantlyExpanded()

meshlib.Box2d meshlib.Box2d.insignificantlyExpanded ( )

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

Calls MR_Box2d_insignificantlyExpanded().

◆ intersect()

meshlib.Box2d meshlib.Box2d.intersect ( meshlib.Box2d b)

Generated from method MR::Box2d::intersect.

Calls MR_Box2d_intersect().

◆ intersection()

meshlib.Box2d meshlib.Box2d.intersection ( meshlib.Box2d b)

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

Calls MR_Box2d_intersection().

◆ intersects()

boolean meshlib.Box2d.intersects ( meshlib.Box2d b)

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

Calls MR_Box2d_intersects().

◆ max()

meshlib.Vector2d meshlib.Box2d.max ( )

◆ min()

meshlib.Vector2d meshlib.Box2d.min ( )

◆ opEqual()

boolean meshlib.Box2d.opEqual ( meshlib.Box2d a)

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

Calls MR_equal_MR_Box2d().

◆ opNotEqual()

boolean meshlib.Box2d.opNotEqual ( meshlib.Box2d a)

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

Calls MR_not_equal_MR_Box2d().

◆ set()

void meshlib.Box2d.set ( Box2d other)

Overwrites the contents with those of another struct.

◆ setMax()

void meshlib.Box2d.setMax ( meshlib.Vector2d value)

◆ setMin()

void meshlib.Box2d.setMin ( meshlib.Vector2d value)

◆ size()

meshlib.Vector2d meshlib.Box2d.size ( )

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

Calls MR_Box2d_size().

◆ valid()

boolean meshlib.Box2d.valid ( )

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

Calls MR_Box2d_valid().

◆ volume()

double meshlib.Box2d.volume ( )

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

Calls MR_Box2d_volume().

Member Data Documentation

◆ LAYOUT

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

The native layout of the struct.

◆ OFF_max

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

◆ OFF_min

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

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