You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: src/cpp/predefinedmodules.cpp
+97-4
Original file line number
Diff line number
Diff line change
@@ -477,7 +477,43 @@ DeclareModuleEnd
477
477
#endif
478
478
#endif
479
479
480
-
DeclareSimpleModule(rollToVert, "Roll to Vertical : Roll the turtle around the H axis so that H and U lie in a common vertical plane with U closest to up",eRotation)
480
+
DeclareModuleBegin(rollToVert, "Roll to Vertical : Roll the turtle around the H axis so that H and U lie in a common vertical plane with U closest to up",eRotation)
481
+
{
482
+
#if PGL_VERSION >= 0x021500
483
+
switch(m.size()){
484
+
case0: t.rollToVert(); break;
485
+
default: t.rollToVert(m._getReal(0)); break;
486
+
}
487
+
#else
488
+
t.rollToVert();
489
+
#ifdef _MSC_VER
490
+
#pragma message("RollToVert module with parameter will be disabled. Upgrade PlantGL.")
491
+
#else
492
+
#warning RollToVert module with parameter will be disabled. Upgrade PlantGL.
493
+
#endif
494
+
495
+
#endif
496
+
}
497
+
DeclareModuleEnd
498
+
499
+
DeclareModuleBegin(rollToHorizontal, "Roll to Horizontal : Roll the turtle so that H lie in the horizontal plane",eRotation)
if (nbatt >= 4) c.getAlpha() = m._get<uchar_t>(3) / 255.f;
658
+
t.setTextureBaseColor(c);
659
+
}
660
+
}
661
+
#else
662
+
#ifdef _MSC_VER
663
+
#pragma message("TextureBaseColor module will be disabled. Upgrade PlantGL.")
664
+
#else
665
+
#warning TextureBaseColor module will be disabled. Upgrade PlantGL.
666
+
#endif
667
+
#endif
668
+
}
669
+
DeclareModuleEnd
670
+
671
+
DeclareModuleBegin(interpolateTextureBaseColors,"Set the base color of the texture from interpolation of 2 predefined material. Params : 'index1', 'index2', 'alpha' .",eTexture)
672
+
{
673
+
#if PGL_VERSION >= 0x021500
674
+
size_t nbargs = m.size();
675
+
switch (nbargs) {
676
+
case0:
677
+
case1:
678
+
{
679
+
LsysWarning("Argument missing for module "+m.name());
0 commit comments