import { Vector3D } from './Vector3D'; /** * A Box object is an area defined by its position, as indicated by its * top-left-front corner point(x, y, z) and by its width, * height and depth. * * *

The x, y, z, width, * height depth properties of the Box export class are * independent of each other; changing the value of one property has no effect * on the others. However, the right, bottom and * back properties are integrally related to those six * properties. For example, if you change the value of the right * property, the value of the width property changes; if you * change the bottom property, the value of the * height property changes.

* *

The following methods and properties use Box objects:

* * * *

You can use the new Box() constructor to create a * Box object.

* *

Note: The Box export class does not define a cubic Shape * display object. */ export declare class Box { private _size; private _bottomRightBack; private _topLeftFront; _rawData: Float32Array; /** * The height of the box, in pixels. Changing the height value * of a Box object has no effect on the x, y, * z, depth and width properties. */ get height(): number; set height(value: number); /** * The width of the box, in pixels. Changing the width value * of a Box object has no effect on the x, y, * z, depth and height properties. */ get width(): number; set width(value: number); /** * The deoth of the box, in pixels. Changing the depth value * of a Box object has no effect on the x, y, * z, width and height properties. */ get depth(): number; set depth(value: number); /** * The x coordinate of the top-left-front corner of the box. * Changing the value of the x property of a Box object has no * effect on the y, z, width, * height and depth properties. * *

The value of the x property is equal to the value of the * left property.

*/ get x(): number; set x(value: number); /** * The y coordinate of the top-left-front corner of the box. * Changing the value of the y property of a Box object has no * effect on the x, z, width, * height and depth properties. * *

The value of the y property is equal to the value of the * top property.

*/ get y(): number; set y(value: number); /** * The y coordinate of the top-left-front corner of the box. * Changing the value of the z property of a Box object has no * effect on the x, y, width, * height and depth properties. * *

The value of the z property is equal to the value of the * front property.

*/ get z(): number; set z(value: number); /** * The sum of the z and height properties. */ get back(): number; set back(val: number); /** * The sum of the y and height properties. */ get bottom(): number; set bottom(val: number); /** * The location of the Box object's bottom-right corner, determined by the * values of the right and bottom properties. */ get bottomRightBack(): Vector3D; /** * The z coordinate of the top-left-front corner of the box. Changing * the front property of a Box object has no effect on the * x, y, width and height * properties. However it does affect the depth property, * whereas changing the z value does not affect the * depth property. * *

The value of the left property is equal to the value of * the x property.

*/ get front(): number; set front(val: number); /** * The x coordinate of the top-left corner of the box. Changing the * left property of a Box object has no effect on the * y and height properties. However it does affect * the width property, whereas changing the x value * does not affect the width property. * *

The value of the left property is equal to the value of * the x property.

*/ get left(): number; set left(val: number); /** * The sum of the x and width properties. */ get right(): number; set right(val: number); /** * The size of the Box object, expressed as a Vector3D object with the * values of the width, height and * depth properties. */ get size(): Vector3D; /** * The y coordinate of the top-left-front corner of the box. Changing * the top property of a Box object has no effect on the * x and width properties. However it does affect * the height property, whereas changing the y * value does not affect the height property. * *

The value of the top property is equal to the value of the * y property.

*/ get top(): number; set top(val: number); /** * The location of the Box object's top-left-front corner, determined by the * x, y and z coordinates of the point. */ get topLeftFront(): Vector3D; /** * Creates a new Box object with the top-left-front corner specified by the * x, y and z parameters and with the * specified width, height and depth * parameters. If you call this public without parameters, a box with * x, y, z, width, * height and depth properties set to 0 is created. * * @param x The x coordinate of the top-left-front corner of the * box. * @param y The y coordinate of the top-left-front corner of the * box. * @param z The z coordinate of the top-left-front corner of the * box. * @param width The width of the box, in pixels. * @param height The height of the box, in pixels. * @param depth The depth of the box, in pixels. */ constructor(rawData: Float32Array); constructor(x?: number, y?: number, z?: number, width?: number, height?: number, depth?: number); /** * Returns a new Box object with the same values for the x, * y, z, width, height * and depth properties as the original Box object. * * @return A new Box object with the same values for the x, * y, z, width, * height and depth properties as the * original Box object. */ clone(): Box; /** * Determines whether the specified position is contained within the cubic * region defined by this Box object. * * @param x The x coordinate(horizontal component) of the position. * @param y The y coordinate(vertical component) of the position. * @param z The z coordinate(longitudinal component) of the position. * @return A value of true if the Box object contains the * specified position; otherwise false. */ contains(x: number, y: number, z: number): boolean; /** * Determines whether the specified position is contained within the cubic * region defined by this Box object. This method is similar to the * Box.contains() method, except that it takes a Vector3D * object as a parameter. * * @param position The position, as represented by its x, y and * z coordinates. * @return A value of true if the Box object contains the * specified position; otherwise false. */ containsPoint(position: Vector3D): boolean; /** * Determines whether the Box object specified by the box * parameter is contained within this Box object. A Box object is said to * contain another if the second Box object falls entirely within the * boundaries of the first. * * @param box The Box object being checked. * @return A value of true if the Box object that you specify * is contained by this Box object; otherwise false. */ containsBox(box: Box): boolean; /** * Copies all of box data from the source Box object into the calling * Box object. * * @param sourceBox The Box object from which to copy the data. */ copyFrom(sourceBox: Box): void; /** * Determines whether the object specified in the toCompare * parameter is equal to this Box object. This method compares the * x, y, z, width, * height and depth properties of an object against * the same properties of this Box object. * * @param toCompare The box to compare to this Box object. * @return A value of true if the object has exactly the same * values for the x, y, z, * width, height and depth * properties as this Box object; otherwise false. */ equals(toCompare: Box): boolean; /** * Increases the size of the Box object by the specified amounts, in * pixels. The center point of the Box object stays the same, and its * size increases to the left and right by the dx value, to * the top and the bottom by the dy value, and to * the front and the back by the dz value. * * @param dx The value to be added to the left and the right of the Box * object. The following equation is used to calculate the new * width and position of the box: * @param dy The value to be added to the top and the bottom of the Box * object. The following equation is used to calculate the new * height and position of the box: * @param dz The value to be added to the front and the back of the Box * object. The following equation is used to calculate the new * depth and position of the box: */ inflate(dx: number, dy: number, dz: number): void; /** * Increases the size of the Box object. This method is similar to the * Box.inflate() method except it takes a Vector3D object as * a parameter. * *

The following two code examples give the same result:

* * @param delta The x property of this Vector3D object is used to * increase the horizontal dimension of the Box object. * The y property is used to increase the vertical * dimension of the Box object. * The z property is used to increase the * longitudinal dimension of the Box object. */ inflatePoint(delta: Vector3D): void; /** * If the Box object specified in the toIntersect parameter * intersects with this Box object, returns the area of intersection * as a Box object. If the boxes do not intersect, this method returns an * empty Box object with its properties set to 0. * * @param toIntersect The Box object to compare against to see if it * intersects with this Box object. * @return A Box object that equals the area of intersection. If the * boxes do not intersect, this method returns an empty Box * object; that is, a box with its x, y, * z, width, height, and * depth properties set to 0. */ intersection(toIntersect: Box): Box; /** * Determines whether the object specified in the toIntersect * parameter intersects with this Box object. This method checks the * x, y, z, width, * height, and depth properties of the specified * Box object to see if it intersects with this Box object. * * @param toIntersect The Box object to compare against this Box object. * @return A value of true if the specified object intersects * with this Box object; otherwise false. */ intersects(toIntersect: Box): boolean; rayIntersection(position: Vector3D, direction: Vector3D, targetNormal?: Vector3D): number; /** * Finds the closest point on the Box to another given point. This can be * used for maximum error calculations for content within a given Box. * * @param point The point for which to find the closest point on the Box * @param target An optional Vector3D to store the result to prevent * creating a new object. * @return */ closestPointToPoint(point: Vector3D, target?: Vector3D): Vector3D; /** * Adjusts the location of the Box object, as determined by its * top-left-front corner, by the specified amounts. * * @param dx Moves the x value of the Box object by this amount. * @param dy Moves the y value of the Box object by this amount. * @param dz Moves the z value of the Box object by this amount. */ offset(dx: number, dy: number, dz: number): void; /** * Adjusts the location of the Box object using a Vector3D object as a * parameter. This method is similar to the Box.offset() * method, except that it takes a Vector3D object as a parameter. * * @param position A Vector3D object to use to offset this Box object. */ offsetPosition(position: Vector3D): void; /** * Sets all of the Box object's properties to 0. A Box object is empty if its * width, height or depth is less than or equal to 0. * *

This method sets the values of the x, y, * z, width, height, and * depth properties to 0.

* */ identity(): void; /** * Sets the members of Box to the specified values * * @param xa The x coordinate of the top-left-front corner of the * box. * @param ya The y coordinate of the top-left-front corner of the * box. * @param yz The z coordinate of the top-left-front corner of the * box. * @param widtha The width of the box, in pixels. * @param heighta The height of the box, in pixels. * @param deptha The depth of the box, in pixels. */ setTo(xa: number, ya: number, za: number, widtha: number, heighta: number, deptha: number): void; /** * Builds and returns a string that lists the horizontal, vertical and * longitudinal positions and the width, height and depth of the Box object. * * @return A string listing the value of each of the following properties of * the Box object: x, y, z, * width, height, and depth. */ toString(): string; /** * Adds two boxes together to create a new Box object, by filling * in the horizontal, vertical and longitudinal space between the two boxes. * * @param toUnion A Box object to add to this Box object. * @return A new Box object that is the union of the two boxes. */ union(toUnion: Box, target?: Box): Box; } //# sourceMappingURL=Box.d.ts.map