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

Public Member Functions

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

Static Public Member Functions

static meshlib.Box1f fromMinAndSize (float min, float size)
static boolean getMinBoxCorner (float n)
static boolean getMaxBoxCorner (float 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[]{java.lang.foreign.ValueLayout.JAVA_FLOAT, java.lang.foreign.ValueLayout.JAVA_FLOAT})
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::Box1f. Derived classes: Direct: (non-virtual) MR::SimpleVolumeMinMax MR::VdbVolume

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

Constructor & Destructor Documentation

◆ Box1f() [1/4]

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

◆ Box1f() [2/4]

meshlib.Box1f.Box1f ( )

create invalid box by default

Calls MR_Box1f_DefaultConstruct().

◆ Box1f() [3/4]

meshlib.Box1f.Box1f ( float min,
float max )

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

◆ Box1f() [4/4]

meshlib.Box1f.Box1f ( meshlib.NoInit _1)

Generated from constructor MR::Box1f::Box1f. The reference to the parameter _1 might be preserved in the constructed object.

Calls MR_Box1f_Construct_1().

Member Function Documentation

◆ center()

float meshlib.Box1f.center ( )

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

Calls MR_Box1f_center().

◆ contains() [1/2]

boolean meshlib.Box1f.contains ( float pt)

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

Calls MR_Box1f_contains_float().

◆ contains() [2/2]

boolean meshlib.Box1f.contains ( meshlib.Box1f otherbox)

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

Calls MR_Box1f_contains_MR_Box1f().

◆ copy()

Box1f meshlib.Box1f.copy ( )

A copy of the struct, in its own memory.

◆ corner()

float meshlib.Box1f.corner ( boolean 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::Box1f::corner.

Calls MR_Box1f_corner().

◆ diagonal()

float meshlib.Box1f.diagonal ( )

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

Calls MR_Box1f_diagonal().

◆ elements()

int meshlib.Box1f.elements ( )
static

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

Calls MR_Box1f_Get_elements().

◆ expanded()

meshlib.Box1f meshlib.Box1f.expanded ( float expansion)

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

Calls MR_Box1f_expanded().

◆ fromMinAndSize()

meshlib.Box1f meshlib.Box1f.fromMinAndSize ( float min,
float size )
static

Generated from method MR::Box1f::fromMinAndSize.

Calls MR_Box1f_fromMinAndSize().

◆ getBoxClosestPointTo()

float meshlib.Box1f.getBoxClosestPointTo ( float pt)

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

Calls MR_Box1f_getBoxClosestPointTo().

◆ getDistanceSq() [1/2]

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

Calls MR_Box1f_getDistanceSq_float().

◆ getDistanceSq() [2/2]

float meshlib.Box1f.getDistanceSq ( meshlib.Box1f b)

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

Calls MR_Box1f_getDistanceSq_MR_Box1f().

◆ getMaxBoxCorner()

boolean meshlib.Box1f.getMaxBoxCorner ( float 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::Box1f::getMaxBoxCorner.

Calls MR_Box1f_getMaxBoxCorner().

◆ getMinBoxCorner()

boolean meshlib.Box1f.getMinBoxCorner ( float 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::Box1f::getMinBoxCorner.

Calls MR_Box1f_getMinBoxCorner().

◆ getProjection()

float meshlib.Box1f.getProjection ( float 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::Box1f::getProjection.

Calls MR_Box1f_getProjection().

◆ include() [1/2]

void meshlib.Box1f.include ( float pt)

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

Calls MR_Box1f_include_float().

◆ include() [2/2]

void meshlib.Box1f.include ( meshlib.Box1f b)

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

Calls MR_Box1f_include_MR_Box1f().

◆ index()

float meshlib.Box1f.index ( int e)

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

Calls MR_Box1f_index().

◆ index_mut()

java.lang.foreign.MemorySegment meshlib.Box1f.index_mut ( int e)

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

Calls MR_Box1f_index_mut(). Some types are raw C types, see the C bindings for the details.

◆ insignificantlyExpanded()

meshlib.Box1f meshlib.Box1f.insignificantlyExpanded ( )

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

Calls MR_Box1f_insignificantlyExpanded().

◆ intersect()

meshlib.Box1f meshlib.Box1f.intersect ( meshlib.Box1f b)

Generated from method MR::Box1f::intersect.

Calls MR_Box1f_intersect().

◆ intersection()

meshlib.Box1f meshlib.Box1f.intersection ( meshlib.Box1f b)

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

Calls MR_Box1f_intersection().

◆ intersects()

boolean meshlib.Box1f.intersects ( meshlib.Box1f b)

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

Calls MR_Box1f_intersects().

◆ max()

float meshlib.Box1f.max ( )

◆ min()

float meshlib.Box1f.min ( )

◆ opEqual()

boolean meshlib.Box1f.opEqual ( meshlib.Box1f a)

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

Calls MR_equal_MR_Box1f().

◆ opNotEqual()

boolean meshlib.Box1f.opNotEqual ( meshlib.Box1f a)

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

Calls MR_not_equal_MR_Box1f().

◆ set()

void meshlib.Box1f.set ( Box1f other)

Overwrites the contents with those of another struct.

◆ setMax()

void meshlib.Box1f.setMax ( float value)

◆ setMin()

void meshlib.Box1f.setMin ( float value)

◆ size()

float meshlib.Box1f.size ( )

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

Calls MR_Box1f_size().

◆ valid()

boolean meshlib.Box1f.valid ( )

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

Calls MR_Box1f_valid().

◆ volume()

float meshlib.Box1f.volume ( )

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

Calls MR_Box1f_volume().

Member Data Documentation

◆ LAYOUT

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

The native layout of the struct.

◆ OFF_max

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

◆ OFF_min

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

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