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

Public Member Functions

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

Static Public Member Functions

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

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

Constructor & Destructor Documentation

◆ Box3f() [1/4]

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

◆ Box3f() [2/4]

meshlib.Box3f.Box3f ( )

create invalid box by default

Calls MR_Box3f_DefaultConstruct().

◆ Box3f() [3/4]

meshlib.Box3f.Box3f ( meshlib.Vector3f min,
meshlib.Vector3f max )

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

◆ Box3f() [4/4]

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

Calls MR_Box3f_Construct_1().

Member Function Documentation

◆ center()

meshlib.Vector3f meshlib.Box3f.center ( )

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

Calls MR_Box3f_center().

◆ contains() [1/2]

boolean meshlib.Box3f.contains ( meshlib.Box3f otherbox)

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

Calls MR_Box3f_contains_MR_Box3f().

◆ contains() [2/2]

boolean meshlib.Box3f.contains ( meshlib.Vector3f pt)

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

Calls MR_Box3f_contains_MR_Vector3f().

◆ copy()

Box3f meshlib.Box3f.copy ( )

A copy of the struct, in its own memory.

◆ corner()

meshlib.Vector3f meshlib.Box3f.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::Box3f::corner.

Calls MR_Box3f_corner().

◆ diagonal()

float meshlib.Box3f.diagonal ( )

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

Calls MR_Box3f_diagonal().

◆ elements()

int meshlib.Box3f.elements ( )
static

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

Calls MR_Box3f_Get_elements().

◆ expanded()

meshlib.Box3f meshlib.Box3f.expanded ( meshlib.Vector3f expansion)

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

Calls MR_Box3f_expanded().

◆ fromMinAndSize()

meshlib.Box3f meshlib.Box3f.fromMinAndSize ( meshlib.Vector3f min,
meshlib.Vector3f size )
static

Generated from method MR::Box3f::fromMinAndSize.

Calls MR_Box3f_fromMinAndSize().

◆ getBoxClosestPointTo()

meshlib.Vector3f meshlib.Box3f.getBoxClosestPointTo ( meshlib.Vector3f pt)

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

Calls MR_Box3f_getBoxClosestPointTo().

◆ getDistanceSq() [1/2]

float meshlib.Box3f.getDistanceSq ( meshlib.Box3f b)

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

Calls MR_Box3f_getDistanceSq_MR_Box3f().

◆ getDistanceSq() [2/2]

float meshlib.Box3f.getDistanceSq ( meshlib.Vector3f 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::Box3f::getDistanceSq.

Calls MR_Box3f_getDistanceSq_MR_Vector3f().

◆ getMaxBoxCorner()

meshlib.Vector3b meshlib.Box3f.getMaxBoxCorner ( meshlib.Vector3f 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::Box3f::getMaxBoxCorner.

Calls MR_Box3f_getMaxBoxCorner().

◆ getMinBoxCorner()

meshlib.Vector3b meshlib.Box3f.getMinBoxCorner ( meshlib.Vector3f 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::Box3f::getMinBoxCorner.

Calls MR_Box3f_getMinBoxCorner().

◆ getProjection()

meshlib.Vector3f meshlib.Box3f.getProjection ( meshlib.Vector3f 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::Box3f::getProjection.

Calls MR_Box3f_getProjection().

◆ include() [1/2]

void meshlib.Box3f.include ( meshlib.Box3f b)

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

Calls MR_Box3f_include_MR_Box3f().

◆ include() [2/2]

void meshlib.Box3f.include ( meshlib.Vector3f pt)

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

Calls MR_Box3f_include_MR_Vector3f().

◆ index()

meshlib.Vector3f meshlib.Box3f.index ( int e)

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

Calls MR_Box3f_index().

◆ index_mut()

meshlib.Vector3f meshlib.Box3f.index_mut ( int e)

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

Calls MR_Box3f_index_mut().

◆ insignificantlyExpanded()

meshlib.Box3f meshlib.Box3f.insignificantlyExpanded ( )

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

Calls MR_Box3f_insignificantlyExpanded().

◆ intersect()

meshlib.Box3f meshlib.Box3f.intersect ( meshlib.Box3f b)

Generated from method MR::Box3f::intersect.

Calls MR_Box3f_intersect().

◆ intersection()

meshlib.Box3f meshlib.Box3f.intersection ( meshlib.Box3f b)

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

Calls MR_Box3f_intersection().

◆ intersects()

boolean meshlib.Box3f.intersects ( meshlib.Box3f b)

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

Calls MR_Box3f_intersects().

◆ max()

meshlib.Vector3f meshlib.Box3f.max ( )

◆ min()

meshlib.Vector3f meshlib.Box3f.min ( )

◆ opEqual()

boolean meshlib.Box3f.opEqual ( meshlib.Box3f a)

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

Calls MR_equal_MR_Box3f().

◆ opNotEqual()

boolean meshlib.Box3f.opNotEqual ( meshlib.Box3f a)

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

Calls MR_not_equal_MR_Box3f().

◆ set()

void meshlib.Box3f.set ( Box3f other)

Overwrites the contents with those of another struct.

◆ setMax()

void meshlib.Box3f.setMax ( meshlib.Vector3f value)

◆ setMin()

void meshlib.Box3f.setMin ( meshlib.Vector3f value)

◆ size()

meshlib.Vector3f meshlib.Box3f.size ( )

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

Calls MR_Box3f_size().

◆ valid()

boolean meshlib.Box3f.valid ( )

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

Calls MR_Box3f_valid().

◆ volume()

float meshlib.Box3f.volume ( )

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

Calls MR_Box3f_volume().

Member Data Documentation

◆ LAYOUT

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

The native layout of the struct.

◆ OFF_max

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

◆ OFF_min

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

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