Box

class Box(pointer: <Error class: unknown class><<Error class: unknown class>>)

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: Point3D

  • parameter vectors: Vec3

  • field min: Record field min is private

  • field max: Record field max is private

Since

1.2

Constructors

Link copied to clipboard
constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

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: Float, 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

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

Link copied to clipboard

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

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.