File: quaternion.md

package info (click to toggle)
python-pyglm 2.8.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,008 kB
  • sloc: cpp: 53,029; python: 3,683; makefile: 7
file content (62 lines) | stat: -rw-r--r-- 2,689 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
[//]: # (generated using SlashBack 0.2.0)

  
# quaternion methods  
The following methods are all part of the **quaternion methods**\.  
Defines a templated quaternion type and several quaternion operations\.  
## Table of contents  
  
* [**eulerAngles** function](#eulerangles-function)  
* [**mat3\_cast** function](#mat3_cast-function)  
* [**mat4\_cast** function](#mat4_cast-function)  
* [**pitch** function](#pitch-function)  
* [**quatLookAt** function](#quatlookat-function)  
* [**quatLookAtLH** function](#quatlookatlh-function)  
* [**quatLookAtRH** function](#quatlookatrh-function)  
* [**quat\_cast** function](#quat_cast-function)  
* [**roll** function](#roll-function)  
* [**yaw** function](#yaw-function)  
  
### eulerAngles\(\) function  
#### <code>glm.<code>**eulerAngles**(**x**: *quat*) -\> *vec3*</code></code>  
&emsp;&emsp;Returns euler angles, pitch as x, yaw as y, roll as z\. The result is expressed in radians\.  
  
### mat3\_cast\(\) function  
#### <code>glm.<code>**mat3_cast**(**x**: *quat*) -\> *mat3*</code></code>  
&emsp;&emsp;Converts a quaternion to a 3 x 3 matrix\.  
  
### mat4\_cast\(\) function  
#### <code>glm.<code>**mat4_cast**(**x**: *quat*) -\> *mat4*</code></code>  
&emsp;&emsp;Converts a quaternion to a 4 x 4 matrix\.  
  
### pitch\(\) function  
#### <code>glm.<code>**pitch**(**x**: *quat*) -\> *float*</code></code>  
&emsp;&emsp;Returns pitch value of euler angles expressed in radians\.  
  
### quatLookAt\(\) function  
#### <code>glm.<code>**quatLookAt**(**direction**: *vec3*, **up**: *vec3*) -\> *quat*</code></code>  
&emsp;&emsp;See quatLookAtRH\.  
  
### quatLookAtLH\(\) function  
#### <code>glm.<code>**quatLookAtLH**(**direction**: *vec3*, **up**: *vec3*) -\> *quat*</code></code>  
&emsp;&emsp;Build a left\-handed look at quaternion\.  
  
### quatLookAtRH\(\) function  
#### <code>glm.<code>**quatLookAtRH**(**direction**: *vec3*, **up**: *vec3*) -\> *quat*</code></code>  
&emsp;&emsp;Build a right\-handed look at quaternion\.  
  
### quat\_cast\(\) function  
#### <code>glm.<code>**quat_cast**(**x**: *mat3*) -\> *quat*</code></code>  
&emsp;&emsp;Converts a pure rotation 3 x 3 matrix to a quaternion\.  
  
#### <code>glm.<code>**quat_cast**(**x**: *mat4*) -\> *quat*</code></code>  
&emsp;&emsp;Converts a pure rotation 4 x 4 matrix to a quaternion\.  
  
### roll\(\) function  
#### <code>glm.<code>**roll**(**x**: *quat*) -\> *float*</code></code>  
&emsp;&emsp;Returns roll value of euler angles expressed in radians\.  
  
### yaw\(\) function  
#### <code>glm.<code>**yaw**(**x**: *quat*) -\> *float*</code></code>  
&emsp;&emsp;Returns yaw value of euler angles expressed in radians\.