mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-04 13:57:33 +02:00
delete m_cumulate
This commit is contained in:
@@ -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)
|
- [util/zip](https://openhome.cc/eGossip/OpenSCAD/lib2x-zip.html)
|
||||||
|
|
||||||
### Matrix
|
### 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_determinant](https://openhome.cc/eGossip/OpenSCAD/lib2x-m_determinant.html)
|
||||||
- [matrix/m_mirror](https://openhome.cc/eGossip/OpenSCAD/lib2x-m_mirror.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)
|
- [matrix/m_rotation](https://openhome.cc/eGossip/OpenSCAD/lib2x-m_rotation.html)
|
||||||
|
@@ -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);
|
|
||||||
|
|
||||||
|
|
||||||

|
|
||||||
|
|
@@ -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);
|
|
||||||
|
|
@@ -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);
|
|
||||||
|
|
Reference in New Issue
Block a user