## 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.Triangle3d

3d triangle class consisting of 3 points in space, formin a triangle

Class Overview
CL3D.Triangle3d(a, b, c)
3d triangle class consisting of 3 points in space, formin a triangle

Parameters:
{CL3D.Vect3d} a
  first point of the triangle, can be null.
{CL3D.Vect3d} b
  second point of the triangle, can be null.
{CL3D.Vect3d} c
  third point of the triangle, can be null.

Field Summary
Field Attributes | Field Name and Description
--- | ---
| pointA First point of the triangle
| pointB Second point of the triangle
| pointC Third point of the triangle

Method Summary
Method Attributes | Method Name and Description
--- | ---
| clone() Creates a copy of this vector and returns it
| copyTo(tgt) Copies the content of this triangle to another triangle
| getIntersectionOfPlaneWithLine(linePoint, lineVect) Returns the intersection of the plane described by this triangle and a line.
| getIntersectionWithLine(linePoint, lineVect) Returns the intersection of the triangle and a line.
| getNormal() Returns the normal of this triangle
| getPlane() Creates a 3d plane based on this triangle
| isPointInside(p) Returns if a point is in this triangle using a slow method
| isPointInsideFast(p) Returns if a point is in this triangle using a fast method
| isTotalInsideBox(box) Returns the the triangle is totally inside a box

Field Detail
{Vect3d} pointA
First point of the triangle

{Vect3d} pointB
Second point of the triangle

{Vect3d} pointC
Third point of the triangle
Method Detail
clone()
Creates a copy of this vector and returns it

Returns:
  the new CL3D.Triangle3d

copyTo(tgt)
Copies the content of this triangle to another triangle

Parameters:
{CL3D.Triangle3d} tgt
  Target vector

getIntersectionOfPlaneWithLine(linePoint, lineVect)
Returns the intersection of the plane described by this triangle and a line.

Parameters:
{CL3D.Vect3d} linePoint
  point on the line
{CL3D.Vect3d} lineVect
  vector of the line

Returns:
  null if there is no intersection or a vect3d describing the point of intersection

getIntersectionWithLine(linePoint, lineVect)
Returns the intersection of the triangle and a line.

Parameters:
{CL3D.Vect3d} linePoint
  point on the line
{CL3D.Vect3d} lineVect
  vector of the line

Returns:
  null if there is no intersection or a vect3d describing the point of intersection

{CL3D.Vect3d} getNormal()
Returns the normal of this triangle

Returns:
  {CL3D.Vect3d} the normal.

getPlane()
Creates a 3d plane based on this triangle

Returns:
  Triangle3d

{Boolean} isPointInside(p)
Returns if a point is in this triangle using a slow method

Parameters:
{CL3D.Vect3d} p
  point to test

Returns:
  {Boolean} true if inside, false if not

{Boolean} isPointInsideFast(p)
Returns if a point is in this triangle using a fast method

Parameters:
{CL3D.Vect3d} p
  point to test

Returns:
  {Boolean} true if inside, false if not

isTotalInsideBox(box)
Returns the the triangle is totally inside a box

Parameters:
{CL3D.Box3d} box

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