File: matrix_transform.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 (99 lines) | stat: -rw-r--r-- 5,272 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
[//]: # (generated using SlashBack 0.2.0)

  
# matrix\_transform methods  
The following methods are all part of the **matrix\_transform methods**\.  
Defines functions that generate common transformation matrices\.  
## Table of contents  
  
* [**identity** function](#identity-function)  
* [**lookAt** function](#lookat-function)  
* [**lookAtLH** function](#lookatlh-function)  
* [**lookAtRH** function](#lookatrh-function)  
* [**rotate** function](#rotate-function)  
* [**rotate\_slow** function](#rotate_slow-function)  
* [**scale** function](#scale-function)  
* [**scale\_slow** function](#scale_slow-function)  
* [**translate** function](#translate-function)  
  
### identity\(\) function  
#### <code>glm.<code>**identity**(**matrix_type**: *type*) -\> *matNxM*</code></code>  
&emsp;&emsp;Builds an identity matrix\.  
  
### lookAt\(\) function  
#### <code>glm.<code>**lookAt**(**eye**: *vec3*, **center**: *vec3*, **up**: *vec3*) -\> *mat4x4*</code></code>  
&emsp;&emsp;Build a look at view matrix based on the default handedness\.  
  
### lookAtLH\(\) function  
#### <code>glm.<code>**lookAtLH**(**eye**: *vec3*, **center**: *vec3*, **up**: *vec3*) -\> *mat4x4*</code></code>  
&emsp;&emsp;Build a left handed look at view matrix\.  
  
### lookAtRH\(\) function  
#### <code>glm.<code>**lookAtRH**(**eye**: *vec3*, **center**: *vec3*, **up**: *vec3*) -\> *mat4x4*</code></code>  
&emsp;&emsp;Build a right handed look at view matrix\.  
  
### rotate\(\) function  
#### <code>glm.<code>**rotate**(**angle**: *number*, **axis**: *vec3*) -\> *mat4x4*</code></code>  
&emsp;&emsp;Builds a rotation 4 x 4 matrix created from an axis vector and an angle\.  
  
#### <code>glm.<code>**rotate**(**angle**: *number*) -\> *mat3x3*</code></code>  
&emsp;&emsp;Builds a rotation 3 x 3 matrix created from an angle\.  
  
#### <code>glm.<code>**rotate**(**m**: *mat4x4*, **angle**: *number*, **axis**: *vec3*) -\> *mat4x4*</code></code>  
&emsp;&emsp;Builds a rotation 4 x 4 matrix created from an axis vector and an angle\.  
&emsp;&emsp;``` m ``` is the input matrix multiplied by this translation matrix  
  
#### <code>glm.<code>**rotate**(**m**: *mat3x3*, **angle**: *number*) -\> *mat3x3*</code></code>  
&emsp;&emsp;Builds a rotation 3 x 3 matrix created from an angle\.  
&emsp;&emsp;``` m ``` is the input matrix multiplied by this translation matrix  
  
#### <code>glm.<code>**rotate**(**v**: *vec2*, **angle**: *float*) -\> *vec2*</code></code>  
&emsp;&emsp;Rotate a two dimensional vector\.  
  
#### <code>glm.<code>**rotate**(**v**: *vec3*, **angle**: *float*, **normal**: *vec3*) -\> *vec3*</code></code>  
&emsp;&emsp;Rotate a three dimensional vector around an axis\.  
  
#### <code>glm.<code>**rotate**(**v**: *vec4*, **angle**: *float*, **normal**: *vec3*) -\> *vec4*</code></code>  
&emsp;&emsp;Rotate a four dimensional vector around an axis\.  
  
#### <code>glm.<code>**rotate**(**q**: *quat*, **angle**: *float*, **axis**: *vec3*) -\> *quat*</code></code>  
&emsp;&emsp;Rotates a quaternion from a vector of 3 components axis and an angle\.  
  
### rotate\_slow\(\) function  
#### <code>glm.<code>**rotate_slow**(**m**: *mat4x4*, **angle**: *number*, **axis**: *vec3*) -\> *mat4x4*</code></code>  
&emsp;&emsp;Builds a rotation 4 x 4 matrix created from an axis vector and an angle\.  
  
### scale\(\) function  
#### <code>glm.<code>**scale**(**v**: *vec3*) -\> *mat4x4*</code></code>  
&emsp;&emsp;Builds a scale 4 x 4 matrix created from 3 scalars\.  
  
#### <code>glm.<code>**scale**(**v**: *vec2*) -\> *mat3x3*</code></code>  
&emsp;&emsp;Builds a scale 3 x 3 matrix created from a vector of 2 components\.  
  
#### <code>glm.<code>**scale**(**m**: *mat4x4*, **v**: *vec3*) -\> *mat4x4*</code></code>  
&emsp;&emsp;Builds a scale 4 x 4 matrix created from 3 scalars\.  
&emsp;&emsp;``` m ``` is the input matrix multiplied by this translation matrix  
  
#### <code>glm.<code>**scale**(**m**: *mat3x3*, **v**: *vec2*) -\> *mat3x3*</code></code>  
&emsp;&emsp;Builds a scale 3 x 3 matrix created from a vector of 2 components\.  
&emsp;&emsp;``` m ``` is the input matrix multiplied by this translation matrix  
  
### scale\_slow\(\) function  
#### <code>glm.<code>**scale_slow**(**m**: *mat4x4*, **v**: *vec3*) -\> *mat4x4*</code></code>  
&emsp;&emsp;Builds a scale 4 x 4 matrix created from 3 scalars\.  
  
### translate\(\) function  
#### <code>glm.<code>**translate**(**v**: *vec3*) -\> *mat4x4*</code></code>  
&emsp;&emsp;Builds a translation 4 x 4 matrix created from a vector of 3 components\.  
  
#### <code>glm.<code>**translate**(**v**: *vec2*) -\> *mat3x3*</code></code>  
&emsp;&emsp;Builds a translation 3 x 3 matrix created from a vector of 2 components\.  
  
#### <code>glm.<code>**translate**(**m**: *mat4x4*, **v**: *vec3*) -\> *mat4x4*</code></code>  
&emsp;&emsp;Builds a translation 4 x 4 matrix created from a vector of 3 components\.  
&emsp;&emsp;``` m ``` is the input matrix multiplied by this translation matrix  
  
#### <code>glm.<code>**translate**(**m**: *mat3x3*, **v**: *vec2*) -\> *mat3x3*</code></code>  
&emsp;&emsp;Builds a translation 3 x 3 matrix created from a vector of 2 components\.  
&emsp;&emsp;``` m ``` is the input matrix multiplied by this translation matrix