Packagealternativa.engine3d.core
Classpublic class BoundBox
InheritanceBoundBox Inheritance Object

Class stores object's bounding box object's local space. Generally, position of child objects isn't considered at BoundBox calculation. Ray intersection always made boundBox check at first, but it's possible to check on crossing boundBox only.



Public Properties
 PropertyDefined By
  maxX : Number = -1e+22
Right face.
BoundBox
  maxY : Number = -1e+22
Ftont face.
BoundBox
  maxZ : Number = -1e+22
Top face.
BoundBox
  minX : Number = 1e+22
Left face.
BoundBox
  minY : Number = 1e+22
Back face.
BoundBox
  minZ : Number = 1e+22
Bottom face.
BoundBox
Public Methods
 MethodDefined By
  
Duplicates an instance of BoundBox.
BoundBox
  
intersectRay(origin:Vector3D, direction:Vector3D):Boolean
Checks if the ray crosses the BoundBox.
BoundBox
  
reset():void
Resets all bounds values to its initial state.
BoundBox
  
toString():String
Returns a string representation of BoundBox.
BoundBox
Property Detail
maxXproperty
public var maxX:Number = -1e+22

Right face.

maxYproperty 
public var maxY:Number = -1e+22

Ftont face.

maxZproperty 
public var maxZ:Number = -1e+22

Top face.

minXproperty 
public var minX:Number = 1e+22

Left face.

minYproperty 
public var minY:Number = 1e+22

Back face.

minZproperty 
public var minZ:Number = 1e+22

Bottom face.

Method Detail
clone()method
public function clone():BoundBox

Duplicates an instance of BoundBox.

Returns
BoundBox — New BoundBox instance with same set of properties.
intersectRay()method 
public function intersectRay(origin:Vector3D, direction:Vector3D):Boolean

Checks if the ray crosses the BoundBox.

Parameters

origin:Vector3D — Ray origin.
 
direction:Vector3D — Ray direction.

Returns
Booleantrue if intersection was found and false otherwise.
reset()method 
public function reset():void

Resets all bounds values to its initial state.

toString()method 
public function toString():String

Returns a string representation of BoundBox.

Returns
String — A string representation of BoundBox.