Box

class Box(val grapheneBoxPointer: <Error class: unknown class><<Error class: unknown class>>, cleaner: <Error class: unknown class>? = null)

A 3D box, described as the volume between a minimum and a maximum vertices.

Skipped during bindings generation

  • parameter vertices: vertices: Out parameter is not supported

  • parameter points: Array parameter of type Point3D is not supported

  • parameter vectors: Array parameter of type Vec3 is not supported

Since

1.2

Constructors

Link copied to clipboard
constructor()

Allocate a new Box.

constructor(scope: <Error class: unknown class>)

Allocate a new Box using the provided AutofreeScope.

constructor(grapheneBoxPointer: <Error class: unknown class><<Error class: unknown class>>, cleaner: <Error class: unknown class>? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val grapheneBoxPointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard

Checks whether the #graphene_box_t @a contains the given #graphene_box_t @b.

Link copied to clipboard

Checks whether @box contains the given @point.

Link copied to clipboard
fun equal(b: Box): Boolean

Checks whether the two given boxes are equal.

Link copied to clipboard
fun expand(point: Point3d, res: Box)

Expands the dimensions of @box to include the coordinates at @point.

Link copied to clipboard
fun expandScalar(scalar: <Error class: unknown class>, res: Box)

Expands the dimensions of @box by the given @scalar value.

Link copied to clipboard
fun expandVec3(vec: Vec3, res: Box)

Expands the dimensions of @box to include the coordinates of the given vector.

Link copied to clipboard
fun free()

Frees the resources allocated by graphene_box_alloc().

Link copied to clipboard

Computes the bounding #graphene_sphere_t capable of containing the given #graphene_box_t.

Link copied to clipboard
fun getCenter(center: Point3d)

Retrieves the coordinates of the center of a #graphene_box_t.

Link copied to clipboard
fun getDepth(): <Error class: unknown class>

Retrieves the size of the @box on the Z axis.

Link copied to clipboard
fun getHeight(): <Error class: unknown class>

Retrieves the size of the @box on the Y axis.

Link copied to clipboard
fun getMax(max: Point3d)

Retrieves the coordinates of the maximum point of the given #graphene_box_t.

Link copied to clipboard
fun getMin(min: Point3d)

Retrieves the coordinates of the minimum point of the given #graphene_box_t.

Link copied to clipboard
fun getSize(size: Vec3)

Retrieves the size of the box on all three axes, and stores it into the given @size vector.

Link copied to clipboard
fun getWidth(): <Error class: unknown class>

Retrieves the size of the @box on the X axis.

Link copied to clipboard
fun init(min: Point3d? = null, max: Point3d? = null): Box

Initializes the given #graphene_box_t with two vertices.

Link copied to clipboard
fun initFromBox(src: Box): Box

Initializes the given #graphene_box_t with the vertices of another #graphene_box_t.

Link copied to clipboard
fun initFromVec3(min: Vec3? = null, max: Vec3? = null): Box

Initializes the given #graphene_box_t with two vertices stored inside #graphene_vec3_t.

Link copied to clipboard
fun intersection(b: Box, res: Box?): Boolean

Intersects the two given #graphene_box_t.

Link copied to clipboard
fun union(b: Box, res: Box)

Unions the two given #graphene_box_t.