Box

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

Members

Functions

containsBox
bool containsBox(graphene.box.Box b)

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

containsPoint
bool containsPoint(graphene.point3_d.Point3D point)

Checks whether box contains the given point.

equal
bool equal(graphene.box.Box b)

Checks whether the two given boxes are equal.

expand
void expand(graphene.point3_d.Point3D point, graphene.box.Box res)

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

expandScalar
void expandScalar(float scalar, graphene.box.Box res)

Expands the dimensions of box by the given scalar value.

expandVec3
void expandVec3(graphene.vec3.Vec3 vec, graphene.box.Box res)

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

getBoundingSphere
void getBoundingSphere(graphene.sphere.Sphere sphere)

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

getCenter
void getCenter(graphene.point3_d.Point3D center)

Retrieves the coordinates of the center of a #graphene_box_t.

getDepth
float getDepth()

Retrieves the size of the box on the Z axis.

getHeight
float getHeight()

Retrieves the size of the box on the Y axis.

getMax
void getMax(graphene.point3_d.Point3D max)

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

getMin
void getMin(graphene.point3_d.Point3D min)

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

getSize
void getSize(graphene.vec3.Vec3 size)

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

getVertices
void getVertices(graphene.vec3.Vec3[] vertices)

Computes the vertices of the given #graphene_box_t.

getWidth
float getWidth()

Retrieves the size of the box on the X axis.

initFromBox
graphene.box.Box initFromBox(graphene.box.Box src)

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

initFromPoints
graphene.box.Box initFromPoints(graphene.point3_d.Point3D[] points)

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

initFromVec3
graphene.box.Box initFromVec3(graphene.vec3.Vec3 min, graphene.vec3.Vec3 max)

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

initFromVectors
graphene.box.Box initFromVectors(graphene.vec3.Vec3[] vectors)

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

init_
graphene.box.Box init_(graphene.point3_d.Point3D min, graphene.point3_d.Point3D max)

Initializes the given #graphene_box_t with two vertices.

intersection
bool intersection(graphene.box.Box b, graphene.box.Box res)

Intersects the two given #graphene_box_t.

union_
void union_(graphene.box.Box b, graphene.box.Box res)

Unions the two given #graphene_box_t.

Static functions

alloc
graphene.box.Box alloc()

Allocates a new #graphene_box_t.

empty
graphene.box.Box empty()

A degenerate #graphene_box_t that can only be expanded.

infinite
graphene.box.Box infinite()

A degenerate #graphene_box_t that cannot be expanded.

minusOne
graphene.box.Box minusOne()

A #graphene_box_t with the minimum vertex set at (-1, -1, -1) and the maximum vertex set at (0, 0, 0).

one
graphene.box.Box one()

A #graphene_box_t with the minimum vertex set at (0, 0, 0) and the maximum vertex set at (1, 1, 1).

oneMinusOne
graphene.box.Box oneMinusOne()

A #graphene_box_t with the minimum vertex set at (-1, -1, -1) and the maximum vertex set at (1, 1, 1).

zero
graphene.box.Box zero()

A #graphene_box_t with both the minimum and maximum vertices set at (0, 0, 0).

Inherited Members

From Boxed

cInstancePtr
void* cInstancePtr;

Pointer to the C boxed value

getType
GType getType()

Get the GType of this boxed type.

gType
GType gType [@property getter]

Boxed GType property.

self
Boxed self()

Convenience method to return this cast to a type. For use in D with statements.

copy_
void* copy_()

Make a copy of the wrapped C boxed data.

boxedCopy
void* boxedCopy(void* cBoxed)

Copy a C boxed value using g_boxed_copy.

boxedFree
void boxedFree(void* cBoxed)

Free a C boxed value using g_boxed_free.