1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-17 14:18:13 +01:00

delete m_cumulate

This commit is contained in:
Justin Lin 2021-02-10 16:16:27 +08:00
parent 233abef3d5
commit 1ec6c49788
4 changed files with 0 additions and 55 deletions

View File

@ -153,7 +153,6 @@ These examples incubate dotSCAD and dotSCAD refactors these examples. See [examp
- [util/zip](https://openhome.cc/eGossip/OpenSCAD/lib2x-zip.html)
### Matrix
- [matrix/m_cumulate](https://openhome.cc/eGossip/OpenSCAD/lib2x-m_cumulate.html)
- [matrix/m_determinant](https://openhome.cc/eGossip/OpenSCAD/lib2x-m_determinant.html)
- [matrix/m_mirror](https://openhome.cc/eGossip/OpenSCAD/lib2x-m_mirror.html)
- [matrix/m_rotation](https://openhome.cc/eGossip/OpenSCAD/lib2x-m_rotation.html)

View File

@ -1,32 +0,0 @@
# m_cumulate
The power of using transformation matrice is that you can cumulate all transformations in a matrix. This function multipies all transformation matrice.
**Since:** 1.1
## Parameters
The dir changed since 2.0.
- `matrice` : A list of 4x4 transformation matrice.
## Examples
use <matrix/m_rotation.scad>;
use <matrix/m_scaling.scad>;
use <matrix/m_translation.scad>;
use <matrix/m_cumulate.scad>
m = m_cumulate([
m_translation([10, 20, 10]), m_scaling(2), m_rotation(60)]
);
multmatrix(m)
cube(1);
multmatrix(m)
sphere(1);
![m_cumulate](images/lib2x-m_cumulate-1.JPG)

View File

@ -1,8 +0,0 @@
function _m_cumulate(matrice, i) =
i == len(matrice) - 2 ?
matrice[i] * matrice[i + 1] :
matrice[i] * _m_cumulate(matrice, i + 1);
function _m_cumulate_impl(matrice) =
len(matrice) == 1 ? matrice[0] : _m_cumulate(matrice, 0);

View File

@ -1,14 +0,0 @@
/**
* m_cumulate.scad
*
* @copyright Justin Lin, 2019
* @license https://opensource.org/licenses/lgpl-3.0.html
*
* @see https://openhome.cc/eGossip/OpenSCAD/lib2x-m_cumulate.html
*
**/
use <_impl/_m_cumulate_impl.scad>;
function m_cumulate(matrice) = _m_cumulate_impl(matrice);