Coppercube API Documentation 
			Class Quaternion
				
				
				Quaternion class for representing rotations
				
				
				
			
					Class Overview
				
				
				
						Quaternion(x, y, z, w)
				
				
				
					Quaternion class for representing rotations
					
				
				
				
				
				
					
						- Parameters:
 - x
 - y
 - z
 - w
 
| Field Attributes | Field Name and Description | 
|---|---|
| 
								
								 W component of the Quaternion 
							 | 
						|
| 
								
								 X component of the Quaternion 
							 | 
						|
| 
								
								 Y component of the Quaternion 
							 | 
						|
| 
								
								 Z component of the Quaternion 
							 | 
						
| 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 
							 | 
						|
| 
								
								 Creates a matrix from this quaternion 
							 | 
						|
| 
								 multiplyWith(s)
								 
								Multiplication operator, multiplies with a float (scalar). 
							 | 
						|
| 
								 slerp(q1, q2, time)
								 
								set this quaternion to the result of the interpolation between two quaternions. 
							 | 
						
					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
 
					
					
					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