Class enchant.gl.collision.Bounding
- Defined in: gl.enchant.js
Constructor Attributes | Constructor Name and Description |
---|---|
Class to set Sprite3D collision detection.
|
Method Summary
Method Attributes | Method Name and Description |
---|---|
intersect(bounding)
Collision detection with other collision detection object.
|
|
toAABB(bounding)
Calculates distance from non-rotating cube.
|
|
toBounding(bounding)
Calculates distance between points.
|
|
toBS(boudning)
Calculates distance between balls.
|
|
toOBB(bounding)
Calculates distance from rotating cuboid.
|
Class Detail
enchant.gl.collision.Bounding()
Class to set Sprite3D collision detection.
Defined as a point.
enchant.gl.collision.BS, enchant.gl.collision.AABB,
enchant.gl.collision.OBB exist as
inherited classes of enchant.gl.collision.Bounding
Currently, OBB is not supported.
Method Detail
-
{Boolean} intersect(bounding)Collision detection with other collision detection object. A collision detection object can detect collision with an object with x, y, z properties.
- Parameters:
- {enchant.gl.collision.Bounding|enchant.gl.collision.BS|enchant.gl.collision.AABB|enchant.gl.collision.OBB} bounding
- Collision detection object
- Returns:
- {Boolean}
-
{Number} toAABB(bounding)Calculates distance from non-rotating cube. Currently, 0 will be returned with or without collision.
- Parameters:
- {enchant.gl.collision.AABB} bounding
- AABB
- Returns:
- {Number}
-
{Number} toBounding(bounding)Calculates distance between points.
- Parameters:
- {enchant.gl.collision.Bounding} bounding
- Collision point object
- Returns:
- {Number}
-
{Number} toBS(boudning)Calculates distance between balls.
- Parameters:
- {enchant.gl.collision.BS} boudning
- Collision ball object
- Returns:
- {Number}
-
{Number} toOBB(bounding)Calculates distance from rotating cuboid. Not currently supported.
- Parameters:
- {enchant.gl.collision.OBB} bounding
- OBB
- Returns:
- {Number}