docs/android/dokka/filament-android/com.google.android.filament/-box/index.md
//filament-android/com.google.android.filament/Box
[main]
open class Box
An axis-aligned 3D box represented by its center and half-extent. The half-extent is a vector representing the distance from the center to the edge of the box in each dimension. For example, a box of size 2 units in X, 4 units in Y, and 10 units in Z would have a half-extent of (1, 2, 5).
| Box | [main] |
| constructor() | |
| Default-initializes the 3D box to have a center and half-extent of (0,0,0). | |
| constructor(centerX: Float, centerY: Float, centerZ: Float, halfExtentX: Float, halfExtentY: Float, halfExtentZ: Float) | |
| Initializes the 3D box from its center and half-extent. | |
| constructor(center: Array<Float>, halfExtent: Array<Float>) | |
| Initializes the 3D box from its center and half-extent. |
| Name | Summary |
|---|---|
| getCenter | [main] |
| open fun getCenter(): Array<Float> | |
| Returns the center of the 3D box. | |
| getHalfExtent | [main] |
| open fun getHalfExtent(): Array<Float> | |
| Returns the half-extent from the center of the 3D box. | |
| setCenter | [main] |
| open fun setCenter(centerX: Float, centerY: Float, centerZ: Float) | |
| Sets the center of of the 3D box. | |
| setHalfExtent | [main] |
| open fun setHalfExtent(halfExtentX: Float, halfExtentY: Float, halfExtentZ: Float) | |
| Sets the half-extent of the 3D box. |