BoundingBox object used to clip the object faster.
Create a bounding box that contains the whole object
public max:Vectorpublic min:Vectorpublic owner:Object3Dpublic function compute(a:Array):VoidCreate a BBox object, representing a Bounding Box volume englobing the 3D object passed in parameters. Verry usefull for clipping and so performance !
public function getCenter(Void):VectorReturns the center of the Bounding Box volume as a 3D vector.
A vector representing the center of the Bounding Box
public function getSize(Void):VectorReturn the size of the Bounding Box.
a Vector representing the size of the volume in three dimensions.
public function getCorners(b:Boolean):Arrayget all the 8 corners vertex of the bounding Box volume.
b | Boolean the b is set to true, we will compute the array of vertex once again, otherwise it will return the last compute array. |
The array containing 8 Vertex representing the Bounding Box corners.