graphene.box
Module for [Box] class
class Box
Types 1
classBox : gobject.boxed.Boxed
A 3D box, described as the volume between a minimum and a maximum vertices.
Methods
graphene.box.Box alloc()Allocates a new #grapheneboxt.bool containsBox(graphene.box.Box b)Checks whether the #grapheneboxt `a` contains the given #grapheneboxt `b`.bool containsPoint(graphene.point3_d.Point3D point)Checks whether box contains the given point.bool equal(graphene.box.Box b)Checks whether the two given boxes are equal.void expand(graphene.point3_d.Point3D point, out graphene.box.Box res)Expands the dimensions of box to include the coordinates at point.void expandScalar(float scalar, out graphene.box.Box res)Expands the dimensions of box by the given scalar value.void expandVec3(graphene.vec3.Vec3 vec, out graphene.box.Box res)Expands the dimensions of box to include the coordinates of the given vector.void getBoundingSphere(out graphene.sphere.Sphere sphere)Computes the bounding #graphenespheret capable of containing the given #grapheneboxt.void getCenter(out graphene.point3_d.Point3D center)Retrieves the coordinates of the center of a #grapheneboxt.float getDepth()Retrieves the size of the box on the Z axis. Returns: the depth of the boxfloat getHeight()Retrieves the size of the box on the Y axis. Returns: the height of the boxvoid getMax(out graphene.point3_d.Point3D max)Retrieves the coordinates of the maximum point of the given #grapheneboxt.void getMin(out graphene.point3_d.Point3D min)Retrieves the coordinates of the minimum point of the given #grapheneboxt.void getSize(out graphene.vec3.Vec3 size)Retrieves the size of the box on all three axes, and stores it into the given size vector.void getVertices(ref graphene.vec3.Vec3[] vertices)Computes the vertices of the given #grapheneboxt.float getWidth()Retrieves the size of the box on the X axis. Returns: the width of the boxgraphene.box.Box init_(graphene.point3_d.Point3D min, graphene.point3_d.Point3D max)Initializes the given #grapheneboxt with two vertices.graphene.box.Box initFromBox(graphene.box.Box src)Initializes the given #grapheneboxt with the vertices of another #grapheneboxt.graphene.box.Box initFromPoints(graphene.point3_d.Point3D[] points)Initializes the given #grapheneboxt with the given array of vertices.graphene.box.Box initFromVec3(graphene.vec3.Vec3 min = null, graphene.vec3.Vec3 max = null)Initializes the given #grapheneboxt with two vertices stored inside #graphenevec3t.graphene.box.Box initFromVectors(graphene.vec3.Vec3[] vectors)Initializes the given #grapheneboxt with the given array of vertices.bool intersection(graphene.box.Box b, out graphene.box.Box res)Intersects the two given #grapheneboxt.void union_(graphene.box.Box b, out graphene.box.Box res)Unions the two given #grapheneboxt.graphene.box.Box empty()A degenerate #grapheneboxt that can only be expanded.graphene.box.Box infinite()A degenerate #grapheneboxt that cannot be expanded.graphene.box.Box minusOne()A #grapheneboxt with the minimum vertex set at (-1, -1, -1) and the maximum vertex set at (0, 0, 0).graphene.box.Box one()A #grapheneboxt with the minimum vertex set at (0, 0, 0) and the maximum vertex set at (1, 1, 1).graphene.box.Box oneMinusOne()A #grapheneboxt with the minimum vertex set at (-1, -1, -1) and the maximum vertex set at (1, 1, 1).graphene.box.Box zero()A #grapheneboxt with both the minimum and maximum vertices set at (0, 0, 0).