graphene.box

Module for [Box] class

class Box

Types 1

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

Methods
void * _cPtr(Flag!"Dup" dup = No.Dup) nothrow
GType _getGType() static nothrow
GType _gType() @property nothrow
Box self() nothrowReturns `this`, for use in `with` statements.
graphene.box.Box alloc() static nothrowAllocates a new #graphene_box_t.
bool containsBox(graphene.box.Box b) nothrowChecks whether the #graphene_box_t `a` contains the given #graphene_box_t `b`.
bool containsPoint(graphene.point3_d.Point3D point) nothrowChecks whether box contains the given point.
bool equal(graphene.box.Box b) nothrowChecks whether the two given boxes are equal.
void expand(graphene.point3_d.Point3D point, out graphene.box.Box res) nothrowExpands the dimensions of box to include the coordinates at point.
void expandScalar(float scalar, out graphene.box.Box res) nothrowExpands the dimensions of box by the given scalar value.
void expandVec3(graphene.vec3.Vec3 vec, out graphene.box.Box res) nothrowExpands the dimensions of box to include the coordinates of the given vector.
void getBoundingSphere(out graphene.sphere.Sphere sphere) nothrowComputes the bounding #graphene_sphere_t capable of containing the given #graphene_box_t.
void getCenter(out graphene.point3_d.Point3D center) nothrowRetrieves the coordinates of the center of a #graphene_box_t.
float getDepth() nothrowRetrieves the size of the box on the Z axis. Returns: the depth of the box
float getHeight() nothrowRetrieves the size of the box on the Y axis. Returns: the height of the box
void getMax(out graphene.point3_d.Point3D max) nothrowRetrieves the coordinates of the maximum point of the given #graphene_box_t.
void getMin(out graphene.point3_d.Point3D min) nothrowRetrieves the coordinates of the minimum point of the given #graphene_box_t.
void getSize(out graphene.vec3.Vec3 size) nothrowRetrieves the size of the box on all three axes, and stores it into the given size vector.
void getVertices(ref graphene.vec3.Vec3[] vertices) nothrowComputes the vertices of the given #graphene_box_t.
float getWidth() nothrowRetrieves the size of the box on the X axis. Returns: the width of the box
graphene.box.Box init_(graphene.point3_d.Point3D min, graphene.point3_d.Point3D max) nothrowInitializes the given #graphene_box_t with two vertices.
graphene.box.Box initFromBox(graphene.box.Box src) nothrowInitializes the given #graphene_box_t with the vertices of another #graphene_box_t.
graphene.box.Box initFromPoints(graphene.point3_d.Point3D[] points) nothrowInitializes the given #graphene_box_t with the given array of vertices.
graphene.box.Box initFromVec3(graphene.vec3.Vec3 min = null, graphene.vec3.Vec3 max = null) nothrowInitializes the given #graphene_box_t with two vertices stored inside #graphene_vec3_t.
graphene.box.Box initFromVectors(graphene.vec3.Vec3[] vectors) nothrowInitializes the given #graphene_box_t with the given array of vertices.
bool intersection(graphene.box.Box b, out graphene.box.Box res) nothrowIntersects the two given #graphene_box_t.
void union_(graphene.box.Box b, out graphene.box.Box res) nothrowUnions the two given #graphene_box_t.
graphene.box.Box empty() static nothrowA degenerate #graphene_box_t that can only be expanded.
graphene.box.Box infinite() static nothrowA degenerate #graphene_box_t that cannot be expanded.
graphene.box.Box minusOne() static nothrowA #graphene_box_t with the minimum vertex set at (-1, -1, -1) and the maximum vertex set at (0, 0, 0).
graphene.box.Box one() static nothrowA #graphene_box_t with the minimum vertex set at (0, 0, 0) and the maximum vertex set at (1, 1, 1).
graphene.box.Box oneMinusOne() static nothrowA #graphene_box_t with the minimum vertex set at (-1, -1, -1) and the maximum vertex set at (1, 1, 1).
graphene.box.Box zero() static nothrowA #graphene_box_t with both the minimum and maximum vertices set at (0, 0, 0).
Constructors
this()Create a `box.Box` boxed type.
this(void * ptr, Flag!"Take" take)