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>
  Builds an identity matrix\.
### lookAt\(\) function
#### <code>glm.<code>**lookAt**(**eye**: *vec3*, **center**: *vec3*, **up**: *vec3*) -\> *mat4x4*</code></code>
  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>
  Build a left handed look at view matrix\.
### lookAtRH\(\) function
#### <code>glm.<code>**lookAtRH**(**eye**: *vec3*, **center**: *vec3*, **up**: *vec3*) -\> *mat4x4*</code></code>
  Build a right handed look at view matrix\.
### rotate\(\) function
#### <code>glm.<code>**rotate**(**angle**: *number*, **axis**: *vec3*) -\> *mat4x4*</code></code>
  Builds a rotation 4 x 4 matrix created from an axis vector and an angle\.
#### <code>glm.<code>**rotate**(**angle**: *number*) -\> *mat3x3*</code></code>
  Builds a rotation 3 x 3 matrix created from an angle\.
#### <code>glm.<code>**rotate**(**m**: *mat4x4*, **angle**: *number*, **axis**: *vec3*) -\> *mat4x4*</code></code>
  Builds a rotation 4 x 4 matrix created from an axis vector and an angle\.
  ``` m ``` is the input matrix multiplied by this translation matrix
#### <code>glm.<code>**rotate**(**m**: *mat3x3*, **angle**: *number*) -\> *mat3x3*</code></code>
  Builds a rotation 3 x 3 matrix created from an angle\.
  ``` m ``` is the input matrix multiplied by this translation matrix
#### <code>glm.<code>**rotate**(**v**: *vec2*, **angle**: *float*) -\> *vec2*</code></code>
  Rotate a two dimensional vector\.
#### <code>glm.<code>**rotate**(**v**: *vec3*, **angle**: *float*, **normal**: *vec3*) -\> *vec3*</code></code>
  Rotate a three dimensional vector around an axis\.
#### <code>glm.<code>**rotate**(**v**: *vec4*, **angle**: *float*, **normal**: *vec3*) -\> *vec4*</code></code>
  Rotate a four dimensional vector around an axis\.
#### <code>glm.<code>**rotate**(**q**: *quat*, **angle**: *float*, **axis**: *vec3*) -\> *quat*</code></code>
  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>
  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>
  Builds a scale 4 x 4 matrix created from 3 scalars\.
#### <code>glm.<code>**scale**(**v**: *vec2*) -\> *mat3x3*</code></code>
  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>
  Builds a scale 4 x 4 matrix created from 3 scalars\.
  ``` m ``` is the input matrix multiplied by this translation matrix
#### <code>glm.<code>**scale**(**m**: *mat3x3*, **v**: *vec2*) -\> *mat3x3*</code></code>
  Builds a scale 3 x 3 matrix created from a vector of 2 components\.
  ``` 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>
  Builds a scale 4 x 4 matrix created from 3 scalars\.
### translate\(\) function
#### <code>glm.<code>**translate**(**v**: *vec3*) -\> *mat4x4*</code></code>
  Builds a translation 4 x 4 matrix created from a vector of 3 components\.
#### <code>glm.<code>**translate**(**v**: *vec2*) -\> *mat3x3*</code></code>
  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>
  Builds a translation 4 x 4 matrix created from a vector of 3 components\.
  ``` m ``` is the input matrix multiplied by this translation matrix
#### <code>glm.<code>**translate**(**m**: *mat3x3*, **v**: *vec2*) -\> *mat3x3*</code></code>
  Builds a translation 3 x 3 matrix created from a vector of 2 components\.
  ``` m ``` is the input matrix multiplied by this translation matrix
|