add mat4.look_at(...)
This commit is contained in:
@@ -115,6 +115,15 @@ mat4.decompose(m: matrix)
|
||||
}
|
||||
```
|
||||
|
||||
## Look at point - *mat4.look_at(...)*
|
||||
|
||||
```lua
|
||||
-- creates a view matrix from the 'eye' point to the 'center' point with up vector specified
|
||||
mat4.look_at(eye: vec3, center: vec3, up: vec3)
|
||||
-- writes the view matrix to dst
|
||||
mat4.look_at(eye: vec3, center: vec3, up: vec3, dst: matrix)
|
||||
```
|
||||
|
||||
## Casting to string - *mat4.tostring(...)*
|
||||
|
||||
```lua
|
||||
|
||||
@@ -115,6 +115,15 @@ mat4.decompose(m: matrix)
|
||||
}
|
||||
```
|
||||
|
||||
## Отслеживание точки *mat4.look_at(...)*
|
||||
|
||||
```lua
|
||||
-- cоздает матрицу вида с точки 'eye' на точку 'center', где вектор 'up' определяет верх.
|
||||
mat4.look_at(eye: vec3, center: vec3, up: vec3)
|
||||
-- записывает матрицу вида в dst
|
||||
mat4.look_at(eye: vec3, center: vec3, up: vec3, dst: matrix)
|
||||
```
|
||||
|
||||
## Перевод в строку - *mat4.tostring(...)*
|
||||
|
||||
```lua
|
||||
|
||||
Reference in New Issue
Block a user