## Documentation

- Overview
- Website
- Tutorials
- Class Index

## Classes

- _global_
- CL3D
- CL3D.AnimatedMeshSceneNode
- CL3D.Animator
- CL3D.AnimatorAnimateTexture
- CL3D.AnimatorCameraFPS
- CL3D.AnimatorCameraModelViewer
- CL3D.AnimatorCollisionResponse
- CL3D.AnimatorFlyCircle
- CL3D.AnimatorFlyStraight
- CL3D.AnimatorFollowPath
- CL3D.AnimatorOnClick
- CL3D.AnimatorOnProximity
- CL3D.AnimatorRotation
- CL3D.BillboardSceneNode
- CL3D.BoundingBoxTriangleSelector
- CL3D.Box3d
- CL3D.CameraSceneNode
- CL3D.ColorF
- CL3D.CopperCubeVariable
- CL3D.CopperLicht
- CL3D.CubeSceneNode
- CL3D.HotspotSceneNode
- CL3D.Light
- CL3D.LightSceneNode
- CL3D.Line3d
- CL3D.Material
- CL3D.Matrix4
- CL3D.Mesh
- CL3D.MeshBuffer
- CL3D.MeshSceneNode
- CL3D.MeshTriangleSelector
- CL3D.MetaTriangleSelector
- CL3D.Mobile2DInputSceneNode
- CL3D.OctTreeTriangleSelector
- CL3D.Overlay2DSceneNode
- CL3D.ParticleSystemSceneNode
- CL3D.PathSceneNode
- CL3D.Plane3d
- CL3D.Quaternion
- CL3D.Renderer
- CL3D.Scene
- CL3D.SceneNode
- CL3D.SkyBoxSceneNode
- CL3D.SoundSceneNode
- CL3D.TerrainSceneNode
- CL3D.Texture
- CL3D.TextureManager
- CL3D.Triangle3d
- CL3D.TriangleSelector
- CL3D.Vect2d
- CL3D.Vect3d
- CL3D.Vertex3D
- CL3D.WaterSurfaceSceneNode

CopperLicht API Documentation

# Class CL3D.Box3d

Axis aligned bounding box.

Class Overview
CL3D.Box3d()
An axis aligned bounding box with a min and a maximal edge.

Field Summary
Field Attributes | Field Name and Description
--- | ---
| MaxEdge Maximal Edge of the bounding box
| MinEdge Minimal Edge of the bounding box

Method Summary
Method Attributes | Method Name and Description
--- | ---
| addInternalBox(v) Adds a box to the bounding box
| addInternalPoint(x, y, z) Adds a point to the bounding box, increasing the box if the point is outside of the box
| addInternalPointByVector(v) Adds a point to the bounding box, increasing the box if the point is outside of the box
| clone() Creates a clone of the box
| getCenter() Returns the center of the box
| getEdges() Returns all 8 edges of the bounding box
| getExtent() Returns the extent (or size) of the box
| intersectsWithBox(box) Returns if the box intersects with another box
| intersectsWithLine(lineStart, lineEnd) Returns if the box intersects with a line
| isEmpty() Returns true if the box is empty (MinEdge == MaxEdge)
| isPointInside(p) Returns if a point is inside this box
| reset(x, y, z) Resets the bounding box

Field Detail
{Vect3d} MaxEdge
Maximal Edge of the bounding box

{Vect3d} MinEdge
Minimal Edge of the bounding box
Method Detail
addInternalBox(v)
Adds a box to the bounding box

Parameters:
v
  {CL3D.Box3d} 3d bounding box to add

addInternalPoint(x, y, z)
Adds a point to the bounding box, increasing the box if the point is outside of the box

Parameters:
x
y
z

addInternalPointByVector(v)
Adds a point to the bounding box, increasing the box if the point is outside of the box

Parameters:
v
  {CL3D.Vect3d} 3d vector representing the point

{CL3D.Box3d} clone()
Creates a clone of the box

Returns:
  {CL3D.Box3d} clone

{CL3D.Vect3d} getCenter()
Returns the center of the box

Returns:
  {CL3D.Vect3d} center

{Array} getEdges()
Returns all 8 edges of the bounding box

Returns:
  {Array} edges

{CL3D.Vect3d} getExtent()
Returns the extent (or size) of the box

Returns:
  {CL3D.Vect3d} extent

intersectsWithBox(box)
Returns if the box intersects with another box

Parameters:
box
  {CL3D.Box3d} other box

intersectsWithLine(lineStart, lineEnd)
Returns if the box intersects with a line

Parameters:
lineStart
  {CL3D.Vect3d} start of the line
lineEnd
  {CL3D.Vect3d} end of the line

isEmpty()
Returns true if the box is empty (MinEdge == MaxEdge)

isPointInside(p)
Returns if a point is inside this box

Parameters:
p
  {CL3D.Vect3d} point to test

reset(x, y, z)
Resets the bounding box

Parameters:
x
y
z

© 2011-2018 N.Gebhardt, Ambiera
Documentation generated by JsDoc Toolkit