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

Quaternion class for representing rotations

Class Overview
CL3D.Quaternion(x, y, z, w)
Quaternion class for representing rotations

Parameters:
x
y
z
w

Field Summary
Field Attributes | Field Name and Description
--- | ---
| W W component of the Quaternion
| X X component of the Quaternion
| Y Y component of the Quaternion
| Z Z component of the Quaternion

Method Summary
Method Attributes | Method Name and Description
--- | ---
| addToThis(b) Addition operator, adds another quaternion to this one
| clone() Creates a clone of this Quaternion
| copyTo(tgt) Copies the content of this Quaternion to a target Quaternion
| dotProduct(q2) calculates to dot product with another quaternion
| getMatrix() Creates a matrix from this quaternion
| multiplyWith(s) Multiplication operator, multiplies with a float (scalar).
| normalize()
| setFromEuler(dest, y, z) Sets the quaternion from euler coordinates
| slerp(q1, q2, time) set this quaternion to the result of the interpolation between two quaternions.
| toEuler(dest) Fills a 3D vector with euler coodinates representing this quaternion

Field Detail
{Number} W
W component of the Quaternion

{Number} X
X component of the Quaternion

{Number} Y
Y component of the Quaternion

{Number} Z
Z component of the Quaternion
Method Detail
addToThis(b)
Addition operator, adds another quaternion to this one

Parameters:
b

clone()
Creates a clone of this Quaternion

copyTo(tgt)
Copies the content of this Quaternion to a target Quaternion

Parameters:
tgt

dotProduct(q2)
calculates to dot product with another quaternion

Parameters:
q2

getMatrix()
Creates a matrix from this quaternion

multiplyWith(s)
Multiplication operator, multiplies with a float (scalar).

Parameters:
s

normalize()

setFromEuler(dest, y, z)
Sets the quaternion from euler coordinates

Parameters:
{CL3D.Vect3d} dest
  3d vector to be filled with the euler coordinates
y
z

slerp(q1, q2, time)
set this quaternion to the result of the interpolation between two quaternions. Time is a float between 0 and 1

Parameters:
q1
q2
time

toEuler(dest)
Fills a 3D vector with euler coodinates representing this quaternion

Parameters:
{CL3D.Vect3d} dest
  3d vector to be filled with the euler coordinates

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