tutorials:qsm:to-growable
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tutorials:qsm:to-growable [2025/10/13 15:31] – Tim | tutorials:qsm:to-growable [2025/10/13 16:25] (current) – [Apical] Tim | ||
---|---|---|---|
Line 25: | Line 25: | ||
+ | This is for now the core of our update function, which we can also extend by using the qsm library function | ||
+ | '' | ||
+ | |||
+ | <code java step1.rgg> | ||
+ | import static de.grogra.qsm.utils.Library.*; | ||
+ | module MyShoot(super.length, | ||
+ | |||
+ | public void update()[ | ||
+ | { jumpAllAxis(); | ||
+ | f:F ==> MyShoot(f.length, | ||
+ | ] | ||
+ | </ | ||
===== Adding buds ===== | ===== Adding buds ===== | ||
+ | |||
+ | In order to create new shoots we first need new buds, therefore the module " | ||
+ | < | ||
+ | module MyBud(int order, float length) extends Sphere(0.002){{setShader(EGA_3); | ||
+ | </ | ||
==== Apical ==== | ==== Apical ==== | ||
+ | <code java step2.rgg> | ||
+ | import static de.grogra.qsm.utils.Library.*; | ||
+ | import static de.grogra.qsm.utils.Descriptors.*; | ||
+ | module MyShoot(super.length, | ||
+ | module MyBud(int order, float length) extends Sphere(0.002){{setShader(EGA_3); | ||
+ | public void update()[ | ||
+ | { | ||
+ | | ||
+ | } | ||
+ | f: | ||
+ | f:F ==> MyShoot(f.length, | ||
+ | ] | ||
+ | |||
+ | |||
+ | public void grow()[ | ||
+ | MyBud(o, | ||
+ | |||
+ | ] | ||
+ | </ | ||
==== Lateral ==== | ==== Lateral ==== | ||
tutorials/qsm/to-growable.1760362285.txt.gz · Last modified: 2025/10/13 15:31 by Tim