60 MMechostr(MSKDEBUG,
"SO3EnvironmentRegisterViewport\n");
63 int scolViewport = MMpull(m);
64 int scolScene = MMget(m, 0);
65 if((scolViewport==NIL)||(scolScene==NIL))
71 if (SRoot::getSingletonPtr()->IsRendering())
73 MMechostr(MSKRUNTIME,
"SO3EnvironmentRegisterViewport: Can not be called in a render callback\n");
78 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
81 MMechostr(MSKDEBUG,
"SO3EnvironmentRegisterViewport: Scene instance is NULL\n");
86 SViewPort* targetViewport = MMgetPointer<SViewPort*>(m, MTOP(scolViewport));
89 MMechostr(MSKDEBUG,
"SO3EnvironmentRegisterViewport: Viewport instance is NULL\n");
94 if (!parentScene->GetEnvironment())
102 parentScene->GetEnvironment()->RegisterViewport(targetViewport);
103 MMset(m, 0, ITOM(1));
106 catch(Ogre::Exception&)
125 MMechostr(MSKDEBUG,
"SO3EnvironmentUnregisterViewport\n");
128 int scolViewport = MMpull(m);
129 int scolScene = MMget(m, 0);
130 if((scolViewport==NIL)||(scolScene==NIL))
136 if (SRoot::getSingletonPtr()->IsRendering())
138 MMechostr(MSKRUNTIME,
"SO3EnvironmentUnregisterViewport: Can not be called in a render callback\n");
143 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
146 MMechostr(MSKDEBUG,
"SO3EnvironmentUnregisterViewport: Scene instance is NULL\n");
151 SViewPort* targetViewport = MMgetPointer<SViewPort*>(m, MTOP(scolViewport));
152 if(targetViewport==0)
154 MMechostr(MSKDEBUG,
"SO3EnvironmentUnregisterViewport: Viewport instance is NULL\n");
159 if (!parentScene->GetEnvironment())
167 parentScene->GetEnvironment()->UnregisterViewport(targetViewport);
168 MMset(m, 0, ITOM(1));
171 catch(Ogre::Exception&)
189 MMechostr(MSKDEBUG,
"SO3EnvironmentGetRegisteredViewports\n");
192 int scolScene = MMget(m, 0);
199 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
202 MMechostr(MSKDEBUG,
"SO3EnvironmentGetRegisteredViewports: Scene instance is NULL\n");
207 if (!parentScene->GetEnvironment())
218 SEnvironment::ViewportList viewports = parentScene->GetEnvironment()->GetRegisteredViewports();
219 if(viewports.size() > 0)
222 SEnvironment::ViewportList::iterator iViewport = viewports.begin();
223 while(iViewport != viewports.end())
225 int scolViewport = OBJfindTH(m,
SO3VPTYPE, SCOL_PTR (*iViewport));
226 if(scolViewport!=NIL)
227 scolViewport = MMfetch(m, scolViewport, OFFOBJMAG);
229 MMpush(m, scolViewport);
238 for(
unsigned int j=0; j<viewports.size(); j++)
243 if(
int k=MBdeftab(m))
249 catch(
const Ogre::Exception& e)
251 MMechostr(MSKDEBUG,
"SO3EnvironmentGetRegisteredViewports: %s\n", e.getFullDescription().c_str());
269 MMechostr(MSKDEBUG,
"SO3EnvironmentGetEnable\n");
272 int scolScene = MMget(m, 0);
279 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
282 MMechostr(MSKDEBUG,
"SO3EnvironmentGetEnable: Scene instance is NULL\n");
287 if (!parentScene->GetEnvironment())
293 bool isEnabled = parentScene->GetEnvironment()->GetEnable();
295 MMset(m, 0, ITOM(1));
297 MMset(m, 0, ITOM(0));
314 MMechostr(MSKDEBUG,
"SO3EnvironmentSetEnable\n");
317 int scolEnable = MMpull(m);
318 int scolScene = MMget(m, 0);
319 if((scolScene==NIL)||(scolEnable==NIL))
325 if (SRoot::getSingletonPtr()->IsRendering())
327 MMechostr(MSKRUNTIME,
"SO3EnvironmentSetEnable: Can not be called in a render callback\n");
332 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
335 MMechostr(MSKDEBUG,
"SO3EnvironmentSetEnable: Scene instance is NULL\n");
340 if (!parentScene->GetEnvironment())
347 if(MTOI(scolEnable) == 1)
350 parentScene->GetEnvironment()->SetEnable(enable);
351 MMset(m, 0, ITOM(1));
366 MMechostr(MSKDEBUG,
"SO3EnvironmentGetWindSpeed\n");
369 int scolScene = MMget(m, 0);
376 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
379 MMechostr(MSKDEBUG,
"SO3EnvironmentGetWindSpeed: Scene instance is NULL\n");
384 if (!parentScene->GetEnvironment())
390 MMset(m, 0, FTOM(parentScene->GetEnvironment()->GetWindSpeed()));
406 MMechostr(MSKDEBUG,
"SO3EnvironmentSetWindSpeed\n");
409 int scolWindSpeed = MMpull(m);
410 int scolScene = MMget(m, 0);
411 if((scolScene==NIL)||(scolWindSpeed==NIL))
417 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
420 MMechostr(MSKDEBUG,
"SO3EnvironmentSetWindSpeed: Scene instance is NULL\n");
425 if (!parentScene->GetEnvironment())
431 parentScene->GetEnvironment()->SetWindSpeed(MTOF(scolWindSpeed));
432 MMset(m, 0, ITOM(1));
449 MMechostr(MSKDEBUG,
"SO3EnvironmentGetWindDirection\n");
452 int scolScene = MMget(m, 0);
459 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
462 MMechostr(MSKDEBUG,
"SO3EnvironmentGetWindDirection: Scene instance is NULL\n");
467 if (!parentScene->GetEnvironment())
474 int scolWindDirection = MMmalloc(m, 6, TYPETAB);
475 if(scolWindDirection==NIL)
479 Ogre::Vector2 currentWindDirection = parentScene->GetEnvironment()->GetWindDirection();
480 MMstore(m, scolWindDirection, 0, FTOM(currentWindDirection.x));
481 MMstore(m, scolWindDirection, 1, FTOM(currentWindDirection.y));
482 MMset(m, 0, PTOM(scolWindDirection));
499 MMechostr(MSKDEBUG,
"SO3EnvironmentSetWindDirection\n");
502 int scolWindDirectionY = MMpull(m);
503 int scolWindDirectionX = MMpull(m);
504 int scolScene = MMget(m, 0);
505 if((scolScene==NIL)||(scolWindDirectionX==NIL)||(scolWindDirectionY==NIL))
511 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
514 MMechostr(MSKDEBUG,
"SO3EnvironmentSetWindDirection: Scene instance is NULL\n");
519 if (!parentScene->GetEnvironment())
525 parentScene->GetEnvironment()->SetWindDirection(Ogre::Vector2(MTOF(scolWindDirectionX), MTOF(scolWindDirectionY)));
526 MMset(m, 0, ITOM(1));
541 MMechostr(MSKDEBUG,
"SO3EnvironmentGetHumidity\n");
544 int scolScene = MMget(m, 0);
551 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
554 MMechostr(MSKDEBUG,
"SO3EnvironmentGetHumidity: Scene instance is NULL\n");
559 if (!parentScene->GetEnvironment())
566 MMset(m, 0, FTOM(parentScene->GetEnvironment()->GetHumidity()));
582 MMechostr(MSKDEBUG,
"SO3EnvironmentSetHumidity\n");
585 int scolHumidityFactor = MMpull(m);
586 int scolScene = MMget(m, 0);
587 if((scolScene==NIL)||(scolHumidityFactor==NIL))
593 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
596 MMechostr(MSKDEBUG,
"SO3EnvironmentSetHumidity: Scene instance is NULL\n");
601 if (!parentScene->GetEnvironment())
607 parentScene->GetEnvironment()->SetHumidity(MTOF(scolHumidityFactor));
608 MMset(m, 0, ITOM(1));
623 MMechostr(MSKDEBUG,
"SO3EnvironmentGetTimeSpeedFactor\n");
626 int scolScene = MMget(m, 0);
633 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
636 MMechostr(MSKDEBUG,
"SO3EnvironmentGetTimeSpeedFactor: Scene instance is NULL\n");
641 if (!parentScene->GetEnvironment())
647 MMset(m, 0, FTOM(parentScene->GetEnvironment()->GetTimeSpeedFactor()));
663 MMechostr(MSKDEBUG,
"SO3EnvironmentSetTimeSpeedFactor\n");
666 int scolTimeSpeedFactor = MMpull(m);
667 int scolScene = MMget(m, 0);
674 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
677 MMechostr(MSKDEBUG,
"SO3EnvironmentSetTimeSpeedFactor: Scene instance is NULL\n");
682 if (!parentScene->GetEnvironment())
689 float timeSpeedFactor = 0;
690 if(scolTimeSpeedFactor != NIL)
691 timeSpeedFactor = MTOF(scolTimeSpeedFactor);
693 parentScene->GetEnvironment()->SetTimeSpeedFactor(timeSpeedFactor);
694 MMset(m, 0, ITOM(1));
710 MMechostr(MSKDEBUG,
"SO3EnvironmentGetPaused\n");
713 int scolScene = MMget(m, 0);
720 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
723 MMechostr(MSKDEBUG,
"SO3EnvironmentGetPaused: Scene instance is NULL\n");
728 if (!parentScene->GetEnvironment())
734 bool isPaused = parentScene->GetEnvironment()->GetPaused();
736 MMset(m, 0, ITOM(1));
738 MMset(m, 0, ITOM(0));
755 MMechostr(MSKDEBUG,
"SO3EnvironmentSetPaused\n");
758 int scolEnvironmentPause = MMpull(m);
759 int scolScene = MMget(m, 0);
760 if((scolScene==NIL)||(scolEnvironmentPause==NIL))
766 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
769 MMechostr(MSKDEBUG,
"SO3EnvironmentSetPaused: Scene instance is NULL\n");
774 if (!parentScene->GetEnvironment())
781 if(MTOI(scolEnvironmentPause) == 1)
784 parentScene->GetEnvironment()->SetPaused(pause);
785 MMset(m, 0, ITOM(1));
807 MMechostr(MSKDEBUG,
"SO3EnvironmentGetDateTime\n");
810 int scolScene = MMget(m, 0);
817 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
820 MMechostr(MSKDEBUG,
"SO3EnvironmentGetDateTime: Scene instance is NULL\n");
825 if (!parentScene->GetEnvironment())
832 int scolDateTime = MMmalloc(m, 6, TYPETAB);
833 if(scolDateTime==NIL)
837 SDateTime currentDateTime = parentScene->GetEnvironment()->GetDateTime();
838 MMstore(m, scolDateTime, 0, ITOM(currentDateTime.year));
839 MMstore(m, scolDateTime, 1, ITOM(currentDateTime.month));
840 MMstore(m, scolDateTime, 2, ITOM(currentDateTime.day));
841 MMstore(m, scolDateTime, 3, ITOM(currentDateTime.hour));
842 MMstore(m, scolDateTime, 4, ITOM(currentDateTime.minute));
843 MMstore(m, scolDateTime, 5, ITOM(currentDateTime.second));
844 MMset(m, 0, PTOM(scolDateTime));
865 MMechostr(MSKDEBUG,
"SO3EnvironmentSetDateTime\n");
868 int scolSeconds = MMpull(m);
869 int scolMinutes = MMpull(m);
870 int scolHours = MMpull(m);
871 int scolDay = MMpull(m);
872 int scolMonth = MMpull(m);
873 int scolYear = MMpull(m);
874 int scolScene = MMget(m, 0);
881 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
884 MMechostr(MSKDEBUG,
"SO3EnvironmentSetDateTime: Scene instance is NULL\n");
889 if (!parentScene->GetEnvironment())
896 SDateTime currentDateTime = parentScene->GetEnvironment()->GetDateTime();
900 currentDateTime.year = MTOI(scolYear);
904 currentDateTime.month = MTOI(scolMonth);
908 currentDateTime.day = MTOI(scolDay);
912 currentDateTime.hour = MTOI(scolHours);
915 if(scolMinutes != NIL)
916 currentDateTime.minute = MTOI(scolMinutes);
919 if(scolSeconds != NIL)
920 currentDateTime.second = MTOI(scolSeconds);
923 parentScene->GetEnvironment()->SetDateTime(currentDateTime);
924 MMset(m, 0, ITOM(1));
939 MMechostr(MSKDEBUG,
"SO3EnvironmentGetLongitude\n");
942 int scolScene = MMget(m, 0);
949 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
952 MMechostr(MSKDEBUG,
"SO3EnvironmentGetLongitude: Scene instance is NULL\n");
957 if (!parentScene->GetEnvironment())
963 MMset(m, 0, FTOM(parentScene->GetEnvironment()->GetLongitude().valueDegrees()));
979 MMechostr(MSKDEBUG,
"SO3EnvironmentSetLongitude\n");
982 int scolLongitude = MMpull(m);
983 int scolScene = MMget(m, 0);
984 if((scolScene==NIL)||(scolLongitude==NIL))
990 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
993 MMechostr(MSKDEBUG,
"SO3EnvironmentSetLongitude: Scene instance is NULL\n");
998 if (!parentScene->GetEnvironment())
1004 parentScene->GetEnvironment()->SetLongitude(Ogre::Degree(MTOF(scolLongitude)));
1005 MMset(m, 0, ITOM(1));
1020 MMechostr(MSKDEBUG,
"SO3EnvironmentGetLatitude\n");
1023 int scolScene = MMget(m, 0);
1030 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
1033 MMechostr(MSKDEBUG,
"SO3EnvironmentGetLatitude: Scene instance is NULL\n");
1038 if (!parentScene->GetEnvironment())
1044 MMset(m, 0, FTOM(parentScene->GetEnvironment()->GetLatitude().valueDegrees()));
1060 MMechostr(MSKDEBUG,
"SO3EnvironmentSetLatitude\n");
1063 int scolLatitude = MMpull(m);
1064 int scolScene = MMget(m, 0);
1065 if((scolScene==NIL)||(scolLatitude==NIL))
1071 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
1074 MMechostr(MSKDEBUG,
"SO3EnvironmentSetLatitude: Scene instance is NULL\n");
1079 if (!parentScene->GetEnvironment())
1085 parentScene->GetEnvironment()->SetLatitude(Ogre::Degree(MTOF(scolLatitude)));
1086 MMset(m, 0, ITOM(1));
1101 MMechostr(MSKDEBUG,
"SO3WaterGetEnable\n");
1104 int scolScene = MMget(m, 0);
1111 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
1114 MMechostr(MSKDEBUG,
"SO3WaterGetEnable: Scene instance is NULL\n");
1119 if (!parentScene->GetEnvironment())
1125 if(parentScene->GetEnvironment()->GetWaterEnable())
1126 MMset(m, 0, ITOM(1));
1128 MMset(m, 0, ITOM(0));
1144 MMechostr(MSKDEBUG,
"SO3WaterSetEnable\n");
1147 int scolEnable = MMpull(m);
1148 int scolScene = MMget(m, 0);
1155 if (SRoot::getSingletonPtr()->IsRendering())
1157 MMechostr(MSKRUNTIME,
"SO3WaterSetEnable: Can not be called in a render callback\n");
1162 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
1165 MMechostr(MSKDEBUG,
"SO3WaterSetEnable: Scene instance is NULL\n");
1170 if (!parentScene->GetEnvironment())
1176 bool enable =
false;
1177 if(MTOI(scolEnable) == 1)
1180 parentScene->GetEnvironment()->SetWaterEnable(enable);
1181 MMset(m, 0, ITOM(1));
1207 MMechostr(MSKDEBUG,
"SO3WaterComponentGetEnabled\n");
1210 int scolComponentType = MMpull(m);
1211 int scolScene = MMget(m, 0);
1212 if((scolScene==NIL)||(scolComponentType==NIL))
1218 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
1221 MMechostr(MSKDEBUG,
"SO3WaterComponentGetEnabled: Scene instance is NULL\n");
1226 if (!parentScene->GetEnvironment())
1232 SWater* water = parentScene->GetEnvironment()->GetWater();
1237 bool isEnable =
false;
1238 if(water->GetComponent(
static_cast<SWater::WaterComponentType
>(MTOI(scolComponentType)))->GetEnabled())
1242 MMset(m, 0, ITOM(1));
1244 MMset(m, 0, ITOM(0));
1247 catch(
const Ogre::Exception& e)
1249 MMechostr(MSKDEBUG,
"SO3WaterComponentGetEnabled: %s\n", e.getFullDescription().c_str());
1279 MMechostr(MSKDEBUG,
"SO3WaterComponentSetEnabled\n");
1282 int scolEnableComponent = MMpull(m);
1283 int scolComponentType = MMpull(m);
1284 int scolScene = MMget(m, 0);
1285 if((scolScene==NIL) || (scolComponentType==NIL))
1291 if (SRoot::getSingletonPtr()->IsRendering())
1293 MMechostr(MSKRUNTIME,
"SO3WaterComponentSetEnabled: Can not be called in a render callback\n");
1298 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
1301 MMechostr(MSKDEBUG,
"SO3WaterComponentSetEnabled: Scene instance is NULL\n");
1306 if (!parentScene->GetEnvironment())
1312 SWater* water = parentScene->GetEnvironment()->GetWater();
1315 bool enableComponent =
false;
1316 if(MTOI(scolEnableComponent) == 1)
1317 enableComponent =
true;
1321 water->GetComponent(
static_cast<SWater::WaterComponentType
>(MTOI(scolComponentType)))->SetEnabled(enableComponent);
1323 catch(
const Ogre::Exception& e)
1325 MMechostr(MSKDEBUG,
"SO3WaterComponentSetEnabled: %s\n", e.getFullDescription().c_str());
1331 MMset(m, 0, ITOM(1));
1346 MMechostr(MSKDEBUG,
"SO3SkyGetEnable\n");
1349 int scolScene = MMget(m, 0);
1356 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
1359 MMechostr(MSKDEBUG,
"SO3SkyGetEnable: Scene instance is NULL\n");
1364 if (!parentScene->GetEnvironment())
1370 if(parentScene->GetEnvironment()->GetSkyEnable())
1371 MMset(m, 0, ITOM(1));
1373 MMset(m, 0, ITOM(0));
1389 MMechostr(MSKDEBUG,
"SO3SkySetEnable\n");
1392 int scolEnable = MMpull(m);
1393 int scolScene = MMget(m, 0);
1400 if (SRoot::getSingletonPtr()->IsRendering())
1402 MMechostr(MSKRUNTIME,
"SO3SkySetEnable: Can not be called in a render callback\n");
1407 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
1410 MMechostr(MSKDEBUG,
"SO3SkySetEnable: Scene instance is NULL\n");
1415 if (!parentScene->GetEnvironment())
1421 bool enable =
false;
1422 if(MTOI(scolEnable) == 1)
1425 parentScene->GetEnvironment()->SetSkyEnable(enable);
1426 MMset(m, 0, ITOM(1));
1446 MMechostr(MSKDEBUG,
"SO3SkyComponentGetEnabled\n");
1449 int scolComponentType = MMpull(m);
1450 int scolScene = MMget(m, 0);
1451 if((scolScene==NIL)||(scolComponentType==NIL))
1457 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
1460 MMechostr(MSKDEBUG,
"SO3SkyComponentGetEnabled: Scene instance is NULL\n");
1465 if (!parentScene->GetEnvironment())
1471 SSky* sky = parentScene->GetEnvironment()->GetSky();
1476 bool isEnable =
false;
1477 if (sky->GetComponent(
static_cast<SSky::SkyComponentType
>(MTOI(scolComponentType))) && sky->GetComponent(
static_cast<SSky::SkyComponentType
>(MTOI(scolComponentType)))->GetEnabled())
1481 MMset(m, 0, ITOM(1));
1483 MMset(m, 0, ITOM(0));
1486 catch(
const Ogre::Exception& e)
1488 MMechostr(MSKDEBUG,
"SO3SkyComponentGetEnabled: %s\n", e.getFullDescription().c_str());
1511 MMechostr(MSKDEBUG,
"SO3SkyComponentSetEnabled\n");
1514 int scolEnableComponent = MMpull(m);
1515 int scolComponentType = MMpull(m);
1516 int scolScene = MMget(m, 0);
1517 if((scolScene==NIL)||(scolEnableComponent==NIL)||(scolEnableComponent==NIL))
1523 if (SRoot::getSingletonPtr()->IsRendering())
1525 MMechostr(MSKRUNTIME,
"SO3SkyComponentSetEnabled: Can not be called in a render callback\n");
1530 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
1533 MMechostr(MSKDEBUG,
"SO3SkyComponentSetEnabled: Scene instance is NULL\n");
1538 if (!parentScene->GetEnvironment())
1544 SSky* sky = parentScene->GetEnvironment()->GetSky();
1549 bool enableComponent =
false;
1550 if(MTOI(scolEnableComponent) == 1)
1551 enableComponent =
true;
1553 if (sky->GetComponent(
static_cast<SSky::SkyComponentType
>(MTOI(scolComponentType))))
1554 sky->GetComponent(
static_cast<SSky::SkyComponentType
>(MTOI(scolComponentType)))->SetEnabled(enableComponent);
1556 catch(
const Ogre::Exception& e)
1558 MMechostr(MSKDEBUG,
"SO3SkyComponentSetEnabled: %s\n", e.getFullDescription().c_str());
1564 MMset(m, 0, ITOM(1));
1579 MMechostr(MSKDEBUG,
"SO3WaterGetPosition\n");
1582 int scolScene = MMget(m, 0);
1589 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
1592 MMechostr(MSKDEBUG,
"SO3WaterGetPosition: Scene instance is NULL\n");
1597 if (!parentScene->GetEnvironment())
1603 SWater* water = parentScene->GetEnvironment()->GetWater();
1607 int scolWaterPosition = MMmalloc(m, 3, TYPETAB);
1608 if(scolWaterPosition==NIL)
1612 Ogre::Vector3 waterPosition = water->GetPosition();
1613 MMstore(m, scolWaterPosition, 0, FTOM(waterPosition.x));
1614 MMstore(m, scolWaterPosition, 1, FTOM(waterPosition.y));
1615 MMstore(m, scolWaterPosition, 2, FTOM(waterPosition.z));
1616 MMset(m, 0, PTOM(scolWaterPosition));
1637 MMechostr(MSKDEBUG,
"SO3WaterSetPosition\n");
1640 int scolWaterPosition = MMpull(m);
1641 int scolScene = MMget(m, 0);
1642 if((scolScene==NIL)||(scolWaterPosition==NIL))
1648 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
1651 MMechostr(MSKDEBUG,
"SO3WaterSetPosition: Scene instance is NULL\n");
1656 if (!parentScene->GetEnvironment())
1662 SWater* water = parentScene->GetEnvironment()->GetWater();
1666 Ogre::Vector3 waterPosition;
1667 int vectorComponent = MMfetch(m, MTOP(scolWaterPosition), 0);
1668 if(vectorComponent == NIL)
1669 waterPosition.x = 0.0f;
1671 waterPosition.x = MTOF(vectorComponent);
1674 vectorComponent = MMfetch(m, MTOP(scolWaterPosition), 1);
1675 if(vectorComponent == NIL)
1676 waterPosition.y = 0.0f;
1678 waterPosition.y = MTOF(vectorComponent);
1681 vectorComponent = MMfetch(m, MTOP(scolWaterPosition), 2);
1682 if(vectorComponent == NIL)
1683 waterPosition.z = 0.0f;
1685 waterPosition.z = MTOF(vectorComponent);
1688 water->SetPosition(waterPosition);
1691 MMset(m, 0, ITOM(1));
1706 MMechostr(MSKDEBUG,
"SO3WaterGetColor\n");
1709 int scolScene = MMget(m, 0);
1716 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
1719 MMechostr(MSKDEBUG,
"SO3WaterGetColor: Scene instance is NULL\n");
1724 if (!parentScene->GetEnvironment())
1730 SWater* water = parentScene->GetEnvironment()->GetWater();
1733 MMset(m, 0, ITOM(ConversionTools::OgreToScolColorRGBA(water->GetColor())));
1753 MMechostr(MSKDEBUG,
"SO3WaterSetColor\n");
1756 int scolWaterColor = MMpull(m);
1757 int scolScene = MMget(m, 0);
1758 if((scolScene==NIL)||(scolWaterColor==NIL))
1764 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
1767 MMechostr(MSKDEBUG,
"SO3WaterSetColor: Scene instance is NULL\n");
1772 if (!parentScene->GetEnvironment())
1778 SWater* water = parentScene->GetEnvironment()->GetWater();
1781 water->SetColor(ConversionTools::ScolToOgreColorRGBA(MTOI(scolWaterColor)));
1782 MMset(m, 0, ITOM(1));
1801 MMechostr(MSKDEBUG,
"SO3WaterGetAnimationSpeed\n");
1804 int scolScene = MMget(m, 0);
1811 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
1814 MMechostr(MSKDEBUG,
"SO3WaterGetAnimationSpeed: Scene instance is NULL\n");
1819 if (!parentScene->GetEnvironment())
1825 SWater* water = parentScene->GetEnvironment()->GetWater();
1828 MMset(m, 0, FTOM(water->GetAnimationSpeed()));
1849 MMechostr(MSKDEBUG,
"SO3WaterSetAnimationSpeed\n");
1852 int scolWaterAnimationSpeed = MMpull(m);
1853 int scolScene = MMget(m, 0);
1854 if((scolScene==NIL)||(scolWaterAnimationSpeed==NIL))
1860 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
1863 MMechostr(MSKDEBUG,
"SO3WaterSetAnimationSpeed: Scene instance is NULL\n");
1868 if (!parentScene->GetEnvironment())
1874 SWater* water = parentScene->GetEnvironment()->GetWater();
1877 water->SetAnimationSpeed(MTOF(scolWaterAnimationSpeed));
1880 MMset(m, 0, ITOM(1));
1900 MMechostr(MSKDEBUG,
"SO3WaterGetSunParameters\n");
1903 int scolScene = MMget(m, 0);
1910 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
1913 MMechostr(MSKDEBUG,
"SO3WaterGetSunParameters: Scene instance is NULL\n");
1918 if (!parentScene->GetEnvironment())
1925 SWater* water = parentScene->GetEnvironment()->GetWater();
1929 SWater::WaterComponentSun* sun = water->GetSun();
1932 int scolSunPosition = MMmalloc(m, 3, TYPETAB);
1933 if(scolSunPosition==NIL)
1937 Ogre::Vector3 sunPosition = sun->GetPosition();
1938 MMstore(m, scolSunPosition, 0, FTOM(sunPosition.x));
1939 MMstore(m, scolSunPosition, 1, FTOM(sunPosition.y));
1940 MMstore(m, scolSunPosition, 2, FTOM(sunPosition.z));
1941 MMpush(m, PTOM(scolSunPosition));
1944 MMpush(m, FTOM(sun->GetStrength()));
1947 MMpush(m, FTOM(sun->GetArea()));
1950 MMpush(m, ITOM(ConversionTools::OgreToScolColorRGBA(sun->GetColor())));
1953 int result = MMmalloc(m, 4, TYPETAB);
1958 MMstore(m, result, 3, MMpull(m));
1959 MMstore(m, result, 2, MMpull(m));
1960 MMstore(m, result, 1, MMpull(m));
1961 MMstore(m, result, 0, MMpull(m));
1962 MMset(m, 0, PTOM(result));
1985 MMechostr(MSKDEBUG,
"SO3WaterSetSunParameters\n");
1988 int scolSunColor = MMpull(m);
1989 int scolSunArea = MMpull(m);
1990 int scolSunStrength = MMpull(m);
1991 int scolSunPosition = MMpull(m);
1992 int scolScene = MMget(m, 0);
1999 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
2002 MMechostr(MSKDEBUG,
"SO3WaterSetSunParameters: Scene instance is NULL\n");
2007 if (!parentScene->GetEnvironment())
2014 SWater* water = parentScene->GetEnvironment()->GetWater();
2018 SWater::WaterComponentSun* sun = water->GetSun();
2021 if(scolSunPosition!=NIL)
2023 Ogre::Vector3 sunPosition;
2024 sunPosition.x = MTOF(MMfetch(m, MTOP(scolSunPosition), 0));
2025 sunPosition.y = MTOF(MMfetch(m, MTOP(scolSunPosition), 1));
2026 sunPosition.z = MTOF(MMfetch(m, MTOP(scolSunPosition), 2));
2027 sun->SetPosition(sunPosition);
2031 if(scolSunStrength!=NIL)
2032 sun->SetStrength(MTOF(scolSunStrength));
2035 if(scolSunArea!=NIL)
2036 sun->SetArea(MTOF(scolSunArea));
2039 if(scolSunColor!=NIL)
2040 sun->SetColor(ConversionTools::ScolToOgreColorRGBA(MTOI(scolSunColor)));
2043 MMset(m, 0, ITOM(1));
2062 MMechostr(MSKDEBUG,
"SO3WaterGetFoamParameters\n");
2065 int scolScene = MMget(m, 0);
2072 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
2075 MMechostr(MSKDEBUG,
"SO3WaterGetFoamParameters: Scene instance is NULL\n");
2080 if (!parentScene->GetEnvironment())
2087 SWater* water = parentScene->GetEnvironment()->GetWater();
2091 SWater::WaterComponentFoam* foam = water->GetFoam();
2094 MMpush(m, FTOM(foam->GetMaxDistance()));
2097 MMpush(m, FTOM(foam->GetScale()));
2100 MMpush(m, FTOM(foam->GetStart()));
2103 MMpush(m, FTOM(foam->GetTransparency()));
2106 int result = MMmalloc(m, 4, TYPETAB);
2111 MMstore(m, result, 3, MMpull(m));
2112 MMstore(m, result, 2, MMpull(m));
2113 MMstore(m, result, 1, MMpull(m));
2114 MMstore(m, result, 0, MMpull(m));
2115 MMset(m, 0, PTOM(result));
2138 MMechostr(MSKDEBUG,
"SO3WaterSetFoamParameters\n");
2141 int scolFoamTransparancy = MMpull(m);
2142 int scolFoamStart = MMpull(m);
2143 int scolFoamScale = MMpull(m);
2144 int scolFoamMaxDistance = MMpull(m);
2145 int scolScene = MMget(m, 0);
2152 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
2155 MMechostr(MSKDEBUG,
"SO3WaterSetFoamParameters: Scene instance is NULL\n");
2160 if (!parentScene->GetEnvironment())
2167 SWater* water = parentScene->GetEnvironment()->GetWater();
2171 SWater::WaterComponentFoam* foam = water->GetFoam();
2174 if(scolFoamMaxDistance!=NIL)
2175 foam->SetMaxDistance(MTOF(scolFoamMaxDistance));
2178 if(scolFoamScale!=NIL)
2179 foam->SetScale(MTOF(scolFoamScale));
2182 if(scolFoamStart!=NIL)
2183 foam->SetStart(MTOF(scolFoamStart));
2186 if(scolFoamTransparancy!=NIL)
2187 foam->SetTransparency(MTOF(scolFoamTransparancy));
2190 MMset(m, 0, ITOM(1));
2207 MMechostr(MSKDEBUG,
"SO3WaterGetDepthParameters\n");
2210 int scolScene = MMget(m, 0);
2217 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
2220 MMechostr(MSKDEBUG,
"SO3WaterGetDepthParameters: Scene instance is NULL\n");
2225 if (!parentScene->GetEnvironment())
2232 SWater* water = parentScene->GetEnvironment()->GetWater();
2235 int tuple = MMmalloc(m, 2, TYPETAB);
2241 MMstore(m, tuple, 0, FTOM(water->GetDepth()->GetDepthLimit()));
2242 MMstore(m, tuple, 1, FTOM(water->GetDepth()->GetDistanceLimit()));
2243 MMset(m, 0, PTOM(tuple));
2264 MMechostr(MSKDEBUG,
"SO3WaterSetDepthParameters\n");
2267 int scolDistanceDepthLimit = MMpull(m);
2268 int scolDepthLimit = MMpull(m);
2269 int scolScene = MMget(m, 0);
2276 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
2279 MMechostr(MSKDEBUG,
"SO3WaterSetDepthParameters: Scene instance is NULL\n");
2284 if (!parentScene->GetEnvironment())
2291 SWater* water = parentScene->GetEnvironment()->GetWater();
2294 if(scolDepthLimit!=NIL)
2295 water->GetDepth()->SetDepthLimit(MTOF(scolDepthLimit));
2297 if(scolDistanceDepthLimit!=NIL)
2298 water->GetDepth()->SetDistanceLimit(MTOF(scolDistanceDepthLimit));
2301 MMset(m, 0, ITOM(1));
2316 MMechostr(MSKDEBUG,
"SO3WaterGetSmoothPower\n");
2319 int scolScene = MMget(m, 0);
2326 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
2329 MMechostr(MSKDEBUG,
"SO3WaterGetSmoothPower: Scene instance is NULL\n");
2334 if (!parentScene->GetEnvironment())
2341 SWater* water = parentScene->GetEnvironment()->GetWater();
2344 MMset(m, 0, FTOM(water->GetSmooth()->GetPower()));
2364 MMechostr(MSKDEBUG,
"SO3WaterSetSmoothPower\n");
2367 int scolSmoothPower = MMpull(m);
2368 int scolScene = MMget(m, 0);
2371 if((scolSmoothPower==NIL)||(scolScene==NIL))
2377 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
2380 MMechostr(MSKDEBUG,
"SO3WaterSetSmoothPower: Scene instance is NULL\n");
2385 if (!parentScene->GetEnvironment())
2392 SWater* water = parentScene->GetEnvironment()->GetWater();
2394 water->GetSmooth()->SetPower(MTOF(scolSmoothPower));
2396 MMset(m, 0, ITOM(1));
2414 MMechostr(MSKDEBUG,
"SO3WaterGetCausticsParameters\n");
2417 int scolScene = MMget(m, 0);
2424 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
2427 MMechostr(MSKDEBUG,
"SO3WaterGetCausticsParameters: Scene instance is NULL\n");
2432 if (!parentScene->GetEnvironment())
2439 SWater* water = parentScene->GetEnvironment()->GetWater();
2443 SWater::WaterComponentCaustics* caustics = water->GetCaustics();
2446 MMpush(m, FTOM(caustics->GetScale()));
2449 MMpush(m, FTOM(caustics->GetPower()));
2452 MMpush(m, FTOM(caustics->GetEnd()));
2455 int result = MMmalloc(m, 3, TYPETAB);
2460 MMstore(m, result, 2, MMpull(m));
2461 MMstore(m, result, 1, MMpull(m));
2462 MMstore(m, result, 0, MMpull(m));
2463 MMset(m, 0, PTOM(result));
2485 MMechostr(MSKDEBUG,
"SO3WaterSetCausticsParameters\n");
2488 int scolCausticsEnd = MMpull(m);
2489 int scolCausticsPower = MMpull(m);
2490 int scolCausticsScale = MMpull(m);
2491 int scolScene = MMget(m, 0);
2498 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
2501 MMechostr(MSKDEBUG,
"SO3WaterSetCausticsParameters: Scene instance is NULL\n");
2506 if (!parentScene->GetEnvironment())
2513 SWater* water = parentScene->GetEnvironment()->GetWater();
2517 SWater::WaterComponentCaustics* caustics = water->GetCaustics();
2520 if(scolCausticsScale!=NIL)
2521 caustics->SetScale(MTOF(scolCausticsScale));
2524 if(scolCausticsPower!=NIL)
2525 caustics->SetPower(MTOF(scolCausticsPower));
2528 if(scolCausticsEnd!=NIL)
2529 caustics->SetEnd(MTOF(scolCausticsEnd));
2532 MMset(m, 0, ITOM(1));
2553 MMechostr(MSKDEBUG,
"SO3WaterGetGodRaysParameters\n");
2556 int scolScene = MMget(m, 0);
2563 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
2566 MMechostr(MSKDEBUG,
"SO3WaterGetGodRaysParameters: Scene instance is NULL\n");
2571 if (!parentScene->GetEnvironment())
2578 SWater* water = parentScene->GetEnvironment()->GetWater();
2582 SWater::WaterComponentGodRays* godRays = water->GetGodRays();
2585 int scolGodRaysExposure = MMmalloc(m, 3, TYPETAB);
2586 if(scolGodRaysExposure==NIL)
2590 Ogre::Vector3 godRaysExposure = godRays->GetExposure();
2591 MMstore(m, scolGodRaysExposure, 0, FTOM(godRaysExposure.x));
2592 MMstore(m, scolGodRaysExposure, 1, FTOM(godRaysExposure.y));
2593 MMstore(m, scolGodRaysExposure, 2, FTOM(godRaysExposure.z));
2594 MMpush(m, PTOM(scolGodRaysExposure));
2597 MMpush(m, FTOM(godRays->GetIntensity()));
2600 MMpush(m, FTOM(godRays->GetSpeed()));
2603 MMpush(m, ITOM(godRays->GetNumberOfRays()));
2606 MMpush(m, FTOM(godRays->GetRaysSize()));
2609 if(godRays->GetRaysIntersectionEnable())
2615 int result = MMmalloc(m, 6, TYPETAB);
2620 MMstore(m, result, 5, MMpull(m));
2621 MMstore(m, result, 4, MMpull(m));
2622 MMstore(m, result, 3, MMpull(m));
2623 MMstore(m, result, 2, MMpull(m));
2624 MMstore(m, result, 1, MMpull(m));
2625 MMstore(m, result, 0, MMpull(m));
2626 MMset(m, 0, PTOM(result));
2651 MMechostr(MSKDEBUG,
"SO3WaterSetGodRaysParameters\n");
2654 int scolGodRaysObjectIntersect = MMpull(m);
2655 int scolGodRaysSize = MMpull(m);
2656 int scolGodRaysNumber = MMpull(m);
2657 int scolGodRaysSpeed = MMpull(m);
2658 int scolGodRaysIntensity = MMpull(m);
2659 int scolGodRaysExposure = MMpull(m);
2660 int scolScene = MMget(m, 0);
2667 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
2670 MMechostr(MSKDEBUG,
"SO3WaterSetGodRaysParameters: Scene instance is NULL\n");
2675 if (!parentScene->GetEnvironment())
2682 SWater* water = parentScene->GetEnvironment()->GetWater();
2686 SWater::WaterComponentGodRays* godRays = water->GetGodRays();
2689 if(scolGodRaysExposure!=NIL)
2691 Ogre::Vector3 godRaysExposure;
2692 godRaysExposure.x = MTOF(MMfetch(m, MTOP(scolGodRaysExposure), 0));
2693 godRaysExposure.y = MTOF(MMfetch(m, MTOP(scolGodRaysExposure), 1));
2694 godRaysExposure.z = MTOF(MMfetch(m, MTOP(scolGodRaysExposure), 2));
2695 godRays->SetExposure(godRaysExposure);
2699 if(scolGodRaysIntensity!=NIL)
2700 godRays->SetIntensity(MTOF(scolGodRaysIntensity));
2703 if(scolGodRaysSpeed!=NIL)
2704 godRays->SetSpeed(MTOF(scolGodRaysSpeed));
2707 if(scolGodRaysNumber!=NIL)
2708 godRays->SetNumberOfRays(MTOI(scolGodRaysNumber));
2711 if(scolGodRaysSize!=NIL)
2712 godRays->SetRaysSize(MTOF(scolGodRaysSize));
2715 if(scolGodRaysObjectIntersect!=NIL)
2716 if(MTOI(scolGodRaysObjectIntersect) == 1)
2717 godRays->SetRaysIntersectionEnable(
true);
2719 godRays->SetRaysIntersectionEnable(
false);
2722 MMset(m, 0, ITOM(1));
2744 MMechostr(MSKDEBUG,
"SO3WaterGetPerlinNoiseParameters\n");
2747 int scolScene = MMget(m, 0);
2754 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
2757 MMechostr(MSKDEBUG,
"SO3WaterGetPerlinNoiseParameters: Scene instance is NULL\n");
2762 if (!parentScene->GetEnvironment())
2769 SWater* water = parentScene->GetEnvironment()->GetWater();
2773 Hydrax::Noise::Perlin::Options perlinParameters = water->GetPerlinOptions();
2776 MMpush(m, FTOM(perlinParameters.Scale));
2779 MMpush(m, ITOM(perlinParameters.Octaves));
2782 MMpush(m, FTOM(perlinParameters.Falloff));
2785 MMpush(m, FTOM(perlinParameters.Animspeed));
2788 MMpush(m, FTOM(perlinParameters.Timemulti));
2791 int scolGpuLodParameters = MMmalloc(m, 3, TYPETAB);
2792 if(scolGpuLodParameters==NIL)
2796 MMstore(m, scolGpuLodParameters, 0, FTOM(perlinParameters.GPU_LODParameters.x));
2797 MMstore(m, scolGpuLodParameters, 1, FTOM(perlinParameters.GPU_LODParameters.y));
2798 MMstore(m, scolGpuLodParameters, 2, FTOM(perlinParameters.GPU_LODParameters.z));
2799 MMpush(m, PTOM(scolGpuLodParameters));
2802 MMpush(m, FTOM(perlinParameters.GPU_Strength));
2805 int result = MMmalloc(m, 7, TYPETAB);
2810 MMstore(m, result, 6, MMpull(m));
2811 MMstore(m, result, 5, MMpull(m));
2812 MMstore(m, result, 4, MMpull(m));
2813 MMstore(m, result, 3, MMpull(m));
2814 MMstore(m, result, 2, MMpull(m));
2815 MMstore(m, result, 1, MMpull(m));
2816 MMstore(m, result, 0, MMpull(m));
2817 MMset(m, 0, PTOM(result));
2843 MMechostr(MSKDEBUG,
"SO3WaterSetPerlinNoiseParameters\n");
2846 int scolPerlinGpuStrength = MMpull(m);
2847 int scolPerlinGpuLod = MMpull(m);
2848 int scolPerlinTimeMultiplier = MMpull(m);
2849 int scolPerlinAnimationSpeed = MMpull(m);
2850 int scolPerlinFallOff = MMpull(m);
2851 int scolPerlinOctaves = MMpull(m);
2852 int scolPerlinScale = MMpull(m);
2853 int scolScene = MMget(m, 0);
2860 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
2863 MMechostr(MSKDEBUG,
"SO3WaterSetPerlinNoiseParameters: Scene instance is NULL\n");
2868 if (!parentScene->GetEnvironment())
2875 SWater* water = parentScene->GetEnvironment()->GetWater();
2879 Hydrax::Noise::Perlin::Options perlinParameters = water->GetPerlinOptions();
2882 if(scolPerlinScale!=NIL)
2883 perlinParameters.Scale = MTOF(scolPerlinScale);
2886 if(scolPerlinOctaves!=NIL)
2887 perlinParameters.Octaves = MTOI(scolPerlinOctaves);
2890 if(scolPerlinFallOff!=NIL)
2891 perlinParameters.Falloff = MTOF(scolPerlinFallOff);
2894 if(scolPerlinAnimationSpeed!=NIL)
2895 perlinParameters.Animspeed = MTOF(scolPerlinAnimationSpeed);
2898 if(scolPerlinTimeMultiplier!=NIL)
2899 perlinParameters.Timemulti = MTOF(scolPerlinTimeMultiplier);
2902 if(scolPerlinGpuLod!=NIL)
2904 perlinParameters.GPU_LODParameters.x = MTOF(MMfetch(m, MTOP(scolPerlinGpuLod), 0));
2905 perlinParameters.GPU_LODParameters.y = MTOF(MMfetch(m, MTOP(scolPerlinGpuLod), 1));
2906 perlinParameters.GPU_LODParameters.z = MTOF(MMfetch(m, MTOP(scolPerlinGpuLod), 2));
2910 if(scolPerlinGpuStrength!=NIL)
2911 perlinParameters.GPU_Strength = MTOF(scolPerlinGpuStrength);
2914 water->SetPerlinOptions(perlinParameters);
2917 MMset(m, 0, ITOM(1));
2940 MMechostr(MSKDEBUG,
"SO3WaterGetFftNoiseParameters\n");
2943 int scolScene = MMget(m, 0);
2950 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
2953 MMechostr(MSKDEBUG,
"SO3WaterGetFftNoiseParameters: Scene instance is NULL\n");
2958 if (!parentScene->GetEnvironment())
2965 SWater* water = parentScene->GetEnvironment()->GetWater();
2969 Hydrax::Noise::FFT::Options fftParameters = water->GetFFTOptions();
2972 MMpush(m, FTOM(fftParameters.Scale));
2975 MMpush(m, FTOM(fftParameters.AnimationSpeed));
2978 MMpush(m, FTOM(fftParameters.Amplitude));
2981 MMpush(m, FTOM(fftParameters.KwPower));
2984 MMpush(m, ITOM(fftParameters.Resolution));
2987 MMpush(m, FTOM(fftParameters.PhysicalResolution));
2990 int scolGpuLodParameters = MMmalloc(m, 3, TYPETAB);
2991 if(scolGpuLodParameters==NIL)
2995 MMstore(m, scolGpuLodParameters, 0, FTOM(fftParameters.GPU_LODParameters.x));
2996 MMstore(m, scolGpuLodParameters, 1, FTOM(fftParameters.GPU_LODParameters.y));
2997 MMstore(m, scolGpuLodParameters, 2, FTOM(fftParameters.GPU_LODParameters.z));
2998 MMpush(m, PTOM(scolGpuLodParameters));
3001 MMpush(m, FTOM(fftParameters.GPU_Strength));
3004 int result = MMmalloc(m, 8, TYPETAB);
3009 MMstore(m, result, 7, MMpull(m));
3010 MMstore(m, result, 6, MMpull(m));
3011 MMstore(m, result, 5, MMpull(m));
3012 MMstore(m, result, 4, MMpull(m));
3013 MMstore(m, result, 3, MMpull(m));
3014 MMstore(m, result, 2, MMpull(m));
3015 MMstore(m, result, 1, MMpull(m));
3016 MMstore(m, result, 0, MMpull(m));
3017 MMset(m, 0, PTOM(result));
3044 MMechostr(MSKDEBUG,
"SO3WaterSetFftNoiseParameters\n");
3047 int scolFftGpuStrength = MMpull(m);
3048 int scolFftGpuLod = MMpull(m);
3049 int scolFftPhysicalResolution = MMpull(m);
3050 int scolFftResolution = MMpull(m);
3051 int scolFftKwPower = MMpull(m);
3052 int scolFftAmplitude = MMpull(m);
3053 int scolFftAnimationSpeed = MMpull(m);
3054 int scolFftScale = MMpull(m);
3055 int scolScene = MMget(m, 0);
3062 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
3065 MMechostr(MSKDEBUG,
"SO3WaterSetFftNoiseParameters: Scene instance is NULL\n");
3070 if (!parentScene->GetEnvironment())
3077 SWater* water = parentScene->GetEnvironment()->GetWater();
3081 Hydrax::Noise::FFT::Options fftParameters = water->GetFFTOptions();
3084 if(scolFftScale!=NIL)
3085 fftParameters.Scale = MTOF(scolFftScale);
3088 if(scolFftAnimationSpeed!=NIL)
3089 fftParameters.AnimationSpeed = MTOF(scolFftAnimationSpeed);
3092 if(scolFftAmplitude!=NIL)
3093 fftParameters.Amplitude = MTOF(scolFftAmplitude);
3096 if(scolFftKwPower!=NIL)
3097 fftParameters.KwPower = MTOF(scolFftKwPower);
3100 if(scolFftResolution!=NIL)
3101 fftParameters.Resolution = MTOI(scolFftResolution);
3104 if(scolFftPhysicalResolution!=NIL)
3105 fftParameters.PhysicalResolution = MTOF(scolFftPhysicalResolution);
3108 if(scolFftGpuLod!=NIL)
3110 fftParameters.GPU_LODParameters.x = MTOF(MMfetch(m, MTOP(scolFftGpuLod), 0));
3111 fftParameters.GPU_LODParameters.y = MTOF(MMfetch(m, MTOP(scolFftGpuLod), 1));
3112 fftParameters.GPU_LODParameters.z = MTOF(MMfetch(m, MTOP(scolFftGpuLod), 2));
3116 if(scolFftGpuStrength!=NIL)
3117 fftParameters.GPU_Strength = MTOF(scolFftGpuStrength);
3120 water->SetFFTOptions(fftParameters);
3123 MMset(m, 0, ITOM(1));
3141 MMechostr(MSKDEBUG,
"SO3WaterGetWaveParameters\n");
3144 int scolScene = MMget(m, 0);
3151 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
3154 MMechostr(MSKDEBUG,
"SO3WaterGetWaveParameters: Scene instance is NULL\n");
3159 if (!parentScene->GetEnvironment())
3166 SWater* water = parentScene->GetEnvironment()->GetWater();
3169 int result = MMmalloc(m, 3, TYPETAB);
3174 MMstore(m, result, 0, FTOM(water->GetInfinitePlaneStrength()));
3175 MMstore(m, result, 1, FTOM(water->GetInfinitePlaneElevation()));
3176 MMstore(m, result, 2, FTOM(water->GetInfinitePlaneChoppyStrength()));
3177 MMset(m, 0, PTOM(result));
3200 MMechostr(MSKDEBUG,
"SO3WaterSetWaveParameters\n");
3203 int scolChoppy = MMpull(m);
3204 int scolElevation = MMpull(m);
3205 int scolStrength = MMpull(m);
3206 int scolScene = MMget(m, 0);
3213 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
3216 MMechostr(MSKDEBUG,
"SO3WaterSetWaveParameters: Scene instance is NULL\n");
3221 if (!parentScene->GetEnvironment())
3227 SWater* water = parentScene->GetEnvironment()->GetWater();
3231 if (scolStrength != NIL)
3232 water->SetInfinitePlaneStrength(MTOF(scolStrength));
3234 if (scolElevation != NIL)
3235 water->SetInfinitePlaneElevation(MTOF(scolElevation));
3237 if (scolChoppy != NIL)
3238 water->SetInfinitePlaneChoppyStrength(MTOF(scolChoppy));
3241 MMset(m, 0, ITOM(1));
3257 MMechostr(MSKDEBUG,
"SO3WaterGetGeometryComplexity\n");
3260 int scolScene = MMget(m, 0);
3267 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
3270 MMechostr(MSKDEBUG,
"SO3WaterGetGeometryComplexity: Scene instance is NULL\n");
3275 if (!parentScene->GetEnvironment())
3282 SWater* water = parentScene->GetEnvironment()->GetWater();
3285 int result = MMmalloc(m, 3, TYPETAB);
3290 MMset(m, 0, ITOM(
static_cast<int>(water->GetInfinitePlaneComplexity())));
3311 MMechostr(MSKDEBUG,
"SO3WaterSetGeometryComplexity\n");
3314 int scolComplexity = MMpull(m);
3315 int scolScene = MMget(m, 0);
3322 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
3325 MMechostr(MSKDEBUG,
"SO3WaterSetGeometryComplexity: Scene instance is NULL\n");
3330 if (!parentScene->GetEnvironment())
3336 SWater* water = parentScene->GetEnvironment()->GetWater();
3340 if (scolComplexity != NIL)
3343 if (MTOI(scolComplexity) > 2)
3344 complexity = MTOI(scolComplexity);
3346 water->SetInfinitePlaneComplexity(complexity);
3350 MMset(m, 0, ITOM(1));
3365 MMechostr(MSKDEBUG,
"SO3SkyGetAnimationSpeed\n");
3368 int scolScene = MMget(m, 0);
3375 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
3378 MMechostr(MSKDEBUG,
"SO3SkyGetAnimationSpeed: Scene instance is NULL\n");
3383 if (!parentScene->GetEnvironment())
3389 SSky* sky = parentScene->GetEnvironment()->GetSky();
3392 MMset(m, 0, FTOM(sky->GetAnimationSpeed()));
3413 MMechostr(MSKDEBUG,
"SO3SkySetAnimationSpeed\n");
3416 int scolSkyAnimationSpeed = MMpull(m);
3417 int scolScene = MMget(m, 0);
3418 if((scolScene==NIL)||(scolSkyAnimationSpeed==NIL))
3424 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
3427 MMechostr(MSKDEBUG,
"SO3SkySetAnimationSpeed: Scene instance is NULL\n");
3432 if (!parentScene->GetEnvironment())
3438 SSky* sky = parentScene->GetEnvironment()->GetSky();
3441 sky->SetAnimationSpeed(MTOF(scolSkyAnimationSpeed));
3442 MMset(m, 0, ITOM(1));
3461 MMechostr(MSKDEBUG,
"SO3SkyGetHdrEnable\n");
3464 int scolScene = MMget(m, 0);
3471 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
3474 MMechostr(MSKDEBUG,
"SO3SkyGetHdrEnable: Scene instance is NULL\n");
3479 if (!parentScene->GetEnvironment())
3485 SSky* sky = parentScene->GetEnvironment()->GetSky();
3488 if(sky->GetHDREnable())
3489 MMset(m, 0, ITOM(1));
3491 MMset(m, 0, ITOM(0));
3510 MMechostr(MSKDEBUG,
"SO3SkySetHdrEnable\n");
3513 int scolEnable = MMpull(m);
3514 int scolScene = MMget(m, 0);
3521 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
3524 MMechostr(MSKDEBUG,
"SO3SkySetHdrEnable: Scene instance is NULL\n");
3529 if (!parentScene->GetEnvironment())
3535 SSky* sky = parentScene->GetEnvironment()->GetSky();
3538 bool enable =
false;
3539 if(MTOI(scolEnable) == 1)
3542 sky->SetHDREnable(enable);
3543 MMset(m, 0, ITOM(1));
3561 MMechostr(MSKDEBUG,
"SO3SkyGetCloudCeiling\n");
3564 int scolScene = MMget(m, 0);
3571 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
3574 MMechostr(MSKDEBUG,
"SO3SkyGetCloudCeiling: Scene instance is NULL\n");
3579 if (!parentScene->GetEnvironment())
3585 SSky* sky = parentScene->GetEnvironment()->GetSky();
3588 MMset(m, 0, FTOM(sky->GetCloudCeiling()));
3608 MMechostr(MSKDEBUG,
"SO3SkySetCloudCeiling\n");
3611 int scolSkyCloudCeiling = MMpull(m);
3612 int scolScene = MMget(m, 0);
3613 if((scolScene==NIL)||(scolSkyCloudCeiling==NIL))
3619 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
3622 MMechostr(MSKDEBUG,
"SO3SkySetCloudCeiling: Scene instance is NULL\n");
3627 if (!parentScene->GetEnvironment())
3633 SSky* sky = parentScene->GetEnvironment()->GetSky();
3636 sky->SetCloudCeiling(MTOF(scolSkyCloudCeiling));
3639 MMset(m, 0, ITOM(1));
3655 MMechostr(MSKDEBUG,
"SO3SkyAddLayeredCloud\n");
3658 int scolScene = MMget(m, 0);
3665 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
3668 MMechostr(MSKDEBUG,
"SO3SkyAddLayeredCloud: Scene instance is NULL\n");
3673 if (!parentScene->GetEnvironment())
3679 SSky* sky = parentScene->GetEnvironment()->GetSky();
3682 int layerIndex = sky->GetCloudLayered()->AddLayer();
3683 MMset(m, 0, ITOM(layerIndex));
3703 MMechostr(MSKDEBUG,
"SO3SkyRemoveLayeredCloud\n");
3706 int scolLayerIndex = MMpull(m);
3707 int scolScene = MMget(m, 0);
3708 if((scolScene==NIL)||(scolLayerIndex==NIL))
3714 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
3717 MMechostr(MSKDEBUG,
"SO3SkyAddLayeredCloud: Scene instance is NULL\n");
3722 if (!parentScene->GetEnvironment())
3728 SSky* sky = parentScene->GetEnvironment()->GetSky();
3733 sky->GetCloudLayered()->RemoveLayer(MTOI(scolLayerIndex));
3734 MMset(m, 0, ITOM(1));
3737 catch(
const Ogre::Exception& e)
3739 MMechostr(MSKDEBUG,
"SO3SkyAddLayeredCloud: %s\n", e.getFullDescription().c_str());
3758 MMechostr(MSKDEBUG,
"SO3SkyGetLayeredCloudIndexes\n");
3761 int scolScene = MMget(m, 0);
3768 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
3771 MMechostr(MSKDEBUG,
"SO3SkyAddLayeredCloud: Scene instance is NULL\n");
3776 if (!parentScene->GetEnvironment())
3785 SSky* sky = parentScene->GetEnvironment()->GetSky();
3790 std::vector<int> layerIndexes = sky->GetCloudLayered()->GetLayerIndexes();
3791 if(layerIndexes.size() > 0)
3794 std::vector<int>::iterator iLayerIndexes = layerIndexes.begin();
3795 while(iLayerIndexes != layerIndexes.end())
3797 MMpush(m, ITOM(*iLayerIndexes));
3806 for(
unsigned int j=0; j<layerIndexes.size(); j++)
3811 if(
int k=MBdeftab(m))
3817 catch(
const Ogre::Exception& e)
3819 MMechostr(MSKDEBUG,
"SO3SkyAddLayeredCloud: %s\n", e.getFullDescription().c_str());
3845 MMechostr(MSKDEBUG,
"SO3SkyGetLayeredCloudParameters\n");
3848 int scolLayerIndex = MMpull(m);
3849 int scolScene = MMget(m, 0);
3850 if((scolScene==NIL)||(scolLayerIndex==NIL))
3856 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
3859 MMechostr(MSKDEBUG,
"SO3SkyGetLayeredCloudParameters: Scene instance is NULL\n");
3864 if (!parentScene->GetEnvironment())
3870 SSky* sky = parentScene->GetEnvironment()->GetSky();
3876 SSky::CloudLayered* layeredCloud = sky->GetCloudLayered();
3877 int cloudLayerIndex = MTOI(scolLayerIndex);
3880 MMpush(m, FTOM(layeredCloud->GetHeightFromCloudCeiling(cloudLayerIndex)));
3883 MMpush(m, FTOM(layeredCloud->GetScale(cloudLayerIndex)));
3886 MMpush(m, FTOM(layeredCloud->GetAttenuationDistance(cloudLayerIndex)));
3889 MMpush(m, FTOM(layeredCloud->GetAttenuationDetail(cloudLayerIndex)));
3892 MMpush(m, FTOM(layeredCloud->GetHeightVolume(cloudLayerIndex)));
3895 MMpush(m, FTOM(layeredCloud->GetVolumetricDisplacement(cloudLayerIndex)));
3898 int result = MMmalloc(m, 6, TYPETAB);
3903 MMstore(m, result, 5, MMpull(m));
3904 MMstore(m, result, 4, MMpull(m));
3905 MMstore(m, result, 3, MMpull(m));
3906 MMstore(m, result, 2, MMpull(m));
3907 MMstore(m, result, 1, MMpull(m));
3908 MMstore(m, result, 0, MMpull(m));
3909 MMset(m, 0, PTOM(result));
3912 catch(
const Ogre::Exception& e)
3914 MMechostr(MSKDEBUG,
"SO3SkyGetLayeredCloudParameters: %s\n", e.getFullDescription().c_str());
3940 MMechostr(MSKDEBUG,
"SO3SkySetLayeredCloudParameters\n");
3943 int scolVolumetricDisplacement = MMpull(m);
3944 int scolHeightVolume = MMpull(m);
3945 int scolAttenuationDetail = MMpull(m);
3946 int scolAttenuationDistance = MMpull(m);
3947 int scolScale = MMpull(m);
3948 int scolheightFromCloudCeiling = MMpull(m);
3949 int scolLayerIndex = MMpull(m);
3950 int scolScene = MMget(m, 0);
3951 if((scolScene==NIL)||(scolLayerIndex==NIL))
3957 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
3960 MMechostr(MSKDEBUG,
"SO3SkySetLayeredCloudParameters: Scene instance is NULL\n");
3965 if (!parentScene->GetEnvironment())
3971 SSky* sky = parentScene->GetEnvironment()->GetSky();
3977 SSky::CloudLayered* layeredCloud = sky->GetCloudLayered();
3978 int cloudLayerIndex = MTOI(scolLayerIndex);
3981 if(scolheightFromCloudCeiling != NIL)
3982 layeredCloud->SetHeightFromCloudCeiling(cloudLayerIndex, MTOF(scolheightFromCloudCeiling));
3985 if(scolScale != NIL)
3986 layeredCloud->SetScale(cloudLayerIndex, MTOF(scolScale));
3989 if(scolAttenuationDistance != NIL)
3990 layeredCloud->SetAttenuationDistance(cloudLayerIndex, MTOF(scolAttenuationDistance));
3993 if(scolAttenuationDetail != NIL)
3994 layeredCloud->SetAttenuationDetail(cloudLayerIndex, MTOF(scolAttenuationDetail));
3997 if(scolHeightVolume != NIL)
3998 layeredCloud->SetHeightVolume(cloudLayerIndex, MTOF(scolHeightVolume));
4001 if(scolVolumetricDisplacement != NIL)
4002 layeredCloud->SetHeightVolume(cloudLayerIndex, MTOF(scolVolumetricDisplacement));
4004 MMset(m, 0, ITOM(1));
4007 catch(
const Ogre::Exception& e)
4009 MMechostr(MSKDEBUG,
"SO3SkySetLayeredCloudParameters: %s\n", e.getFullDescription().c_str());
4028 MMechostr(MSKDEBUG,
"SO3SkyGetLightningEnable\n");
4031 int scolScene = MMget(m, 0);
4038 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
4041 MMechostr(MSKDEBUG,
"SO3SkyGetLightningEnable: Scene instance is NULL\n");
4046 if (!parentScene->GetEnvironment())
4052 SSky* sky = parentScene->GetEnvironment()->GetSky();
4055 if(sky->GetLightningEnable())
4056 MMset(m, 0, ITOM(1));
4058 MMset(m, 0, ITOM(0));
4077 MMechostr(MSKDEBUG,
"SO3SkySetLightningEnable\n");
4080 int scolEnable = MMpull(m);
4081 int scolScene = MMget(m, 0);
4088 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
4091 MMechostr(MSKDEBUG,
"SO3SkySetLightningEnable: Scene instance is NULL\n");
4096 if (!parentScene->GetEnvironment())
4102 SSky* sky = parentScene->GetEnvironment()->GetSky();
4105 bool enable =
false;
4106 if(MTOI(scolEnable) == 1)
4109 sky->SetLightningEnable(enable);
4110 MMset(m, 0, ITOM(1));
4131 MMechostr(MSKDEBUG,
"SO3SkyAddLightning\n");
4134 int sLength = MMpull(m);
4135 int sDir = MMpull(m);
4136 int sPos = MMpull(m);
4137 int scolScene = MMget(m, 0);
4138 if ((scolScene == NIL) || (sPos == NIL) || (sDir == NIL) || (sLength == NIL))
4144 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
4147 MMechostr(MSKDEBUG,
"SO3SkyAddLightning: Scene instance is NULL\n");
4152 if (!parentScene->GetEnvironment())
4158 SSky* sky = parentScene->GetEnvironment()->GetSky();
4162 pos.x = MTOF(MMfetch(m, MTOP(sPos), 0));
4163 pos.y = MTOF(MMfetch(m, MTOP(sPos), 1));
4164 pos.z = MTOF(MMfetch(m, MTOP(sPos), 2));
4167 dir.x = MTOF(MMfetch(m, MTOP(sDir), 0));
4168 dir.y = MTOF(MMfetch(m, MTOP(sDir), 1));
4169 dir.z = MTOF(MMfetch(m, MTOP(sDir), 2));
4171 Ogre::Real length = MTOF(sLength);
4173 sky->AddLightning(pos, dir, length);
4174 MMset(m, 0, ITOM(1));
4195 MMechostr(MSKDEBUG,
"SO3SkyGetVolumetricCloudParameters\n");
4205 MMechostr(MSKDEBUG,
"SO3SkySetVolumetricCloudParameters\n");
4223 MMechostr(MSKDEBUG,
"SO3SunGetLightColor\n");
4226 int scolScene = MMget(m, 0);
4233 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
4236 MMechostr(MSKDEBUG,
"SO3SunGetLightColor: Scene instance is NULL\n");
4241 if (!parentScene->GetEnvironment())
4247 SSun* sun = parentScene->GetEnvironment()->GetSun();
4251 MMset(m, 0, ITOM(ConversionTools::OgreToScolColorRGBA(sun->GetLightColour())));
4272 MMechostr(MSKDEBUG,
"SO3SunSetLightColor\n");
4275 int scolSunColor = MMpull(m);
4276 int scolScene = MMget(m, 0);
4277 if((scolScene==NIL)||(scolSunColor==NIL))
4283 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
4286 MMechostr(MSKDEBUG,
"SO3SunSetLightColor: Scene instance is NULL\n");
4291 if (!parentScene->GetEnvironment())
4297 SSun* sun = parentScene->GetEnvironment()->GetSun();
4300 sun->SetLightColour(ConversionTools::ScolToOgreColorRGBA(MTOI(scolSunColor)));
4301 MMset(m, 0, ITOM(1));
4320 MMechostr(MSKDEBUG,
"SO3MoonGetLightColor\n");
4323 int scolScene = MMget(m, 0);
4330 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
4333 MMechostr(MSKDEBUG,
"SO3MoonGetLightColor: Scene instance is NULL\n");
4338 if (!parentScene->GetEnvironment())
4344 SMoon* moon = parentScene->GetEnvironment()->GetMoon();
4348 MMset(m, 0, ITOM(ConversionTools::OgreToScolColorRGBA(moon->GetLightColour())));
4368 MMechostr(MSKDEBUG,
"SO3MoonSetLightColor\n");
4371 int scolMoonColor = MMpull(m);
4372 int scolScene = MMget(m, 0);
4373 if((scolScene==NIL)||(scolMoonColor==NIL))
4379 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
4382 MMechostr(MSKDEBUG,
"SO3MoonSetLightColor: Scene instance is NULL\n");
4387 if (!parentScene->GetEnvironment())
4393 SMoon* moon = parentScene->GetEnvironment()->GetMoon();
4396 moon->SetLightColour(ConversionTools::ScolToOgreColorRGBA(MTOI(scolMoonColor)));
4397 MMset(m, 0, ITOM(1));
4416 MMechostr(MSKDEBUG,
"SO3MoonGetTexturePath\n");
4419 int scolScene = MMpull(m);
4426 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
4429 MMechostr(MSKDEBUG,
"SO3MoonGetTexturePath: Scene instance is NULL\n");
4434 if (!parentScene->GetEnvironment())
4440 SMoon* moon = parentScene->GetEnvironment()->GetMoon();
4443 return Mpushstrbloc(m, (
char*)moon->GetTextureName().c_str());
4462 MMechostr(MSKDEBUG,
"SO3MoonSetTexturePath\n");
4465 int scolTexturePath = MMpull(m);
4466 int scolScene = MMget(m, 0);
4473 if(scolTexturePath==NIL)
4475 MMechostr(MSKDEBUG,
"SO3MoonSetTexturePath: texture path not provided!\n");
4479 SScene* parentScene = MMgetPointer<SScene*>(m, MTOP(scolScene));
4482 MMechostr(MSKDEBUG,
"SO3MoonSetTexturePath: Scene instance is NULL\n");
4487 if (!parentScene->GetEnvironment())
4493 std::string texturePath(MMstartstr(m, MTOP(scolTexturePath)));
4494 SMoon* moon = parentScene->GetEnvironment()->GetMoon();
4497 moon->SetTextureName(texturePath);
4498 MMset(m, 0, ITOM(1));
4540 {
"SO3_WATER_COMPONENT_SUN", TYPVAR,
"I", SCOL_TYPTYPE(SWater::SO3_WATER_COMPONENT_SUN) },
4541 {
"SO3_WATER_COMPONENT_FOAM", TYPVAR,
"I", SCOL_TYPTYPE(SWater::SO3_WATER_COMPONENT_FOAM) },
4542 {
"SO3_WATER_COMPONENT_DEPTH", TYPVAR,
"I", SCOL_TYPTYPE(SWater::SO3_WATER_COMPONENT_DEPTH) },
4543 {
"SO3_WATER_COMPONENT_SMOOTH", TYPVAR,
"I", SCOL_TYPTYPE(SWater::SO3_WATER_COMPONENT_SMOOTH) },
4544 {
"SO3_WATER_COMPONENT_CAUSTICS", TYPVAR,
"I", SCOL_TYPTYPE(SWater::SO3_WATER_COMPONENT_CAUSTICS) },
4545 {
"SO3_WATER_COMPONENT_UNDERWATER", TYPVAR,
"I", SCOL_TYPTYPE(SWater::SO3_WATER_COMPONENT_UNDERWATER) },
4546 {
"SO3_WATER_COMPONENT_UNDERWATER_REFLECTIONS", TYPVAR,
"I", SCOL_TYPTYPE(SWater::SO3_WATER_COMPONENT_UNDERWATER_REFLECTIONS) },
4547 {
"SO3_WATER_COMPONENT_GODRAYS", TYPVAR,
"I", SCOL_TYPTYPE(SWater::SO3_WATER_COMPONENT_GODRAYS) },
4550 {
"SO3_SKY_COMPONENT_LAYERER_CLOUD", TYPVAR,
"I", SCOL_TYPTYPE(SSky::SO3_SKY_COMPONENT_LAYERER_CLOUD) },
4551 {
"SO3_SKY_COMPONENT_VOLUMETRIC_CLOUD", TYPVAR,
"I", SCOL_TYPTYPE(SSky::SO3_SKY_COMPONENT_VOLUMETRIC_CLOUD) },
4593 {
"SO3SkyAddLightning", 4,
"fun [SO3_SCENE [F F F] [F F F] F] I",
SO3SkyAddLightning }
int SCOLloadEnvironment(mmachine m, cbmachine w)
Load the SO3Engine Environment functions.
int SCOLfreeEnvironment()
free the SO3Engine environment functions
NativeDefinition natSO3Env[]
int SO3SkySetVolumetricCloudParameters(mmachine m)
int SO3SkyGetLightningEnable(mmachine m)
SO3SkyGetHdrEnable : Get the sky Lightning state.
MMechostr(MSKDEBUG, " > Start loading Plugin SO3Engine dll\n")
SCOL_EXPORT int cbmachine w
int SO3SkyGetEnable(mmachine m)
SO3SkyGetEnable :
int SO3WaterSetGodRaysParameters(mmachine m)
SO3WaterSetGodRaysParameters :
int SO3WaterSetAnimationSpeed(mmachine m)
SO3WaterSetAnimationSpeed :
int SO3SkySetAnimationSpeed(mmachine m)
SO3SkySetAnimationSpeed :
int SO3MoonSetLightColor(mmachine m)
SO3MoonSetLightColor :
int SO3WaterSetCausticsParameters(mmachine m)
SO3WaterSetCausticsParameters :
int SO3EnvironmentGetWindSpeed(mmachine m)
SO3EnvironmentGetWindSpeed :
int SO3SkyComponentGetEnabled(mmachine m)
SO3SkyComponentGetEnabled :
int SO3SkyGetHdrEnable(mmachine m)
SO3SkyGetHdrEnable :
int SO3EnvironmentSetTimeSpeedFactor(mmachine m)
SO3EnvironmentSetTimeSpeedFactor :
int SO3WaterGetPerlinNoiseParameters(mmachine m)
SO3WaterGetPerlinNoiseParameters :
int SO3EnvironmentGetLongitude(mmachine m)
SO3EnvironmentGetLongitude :
int SO3EnvironmentGetHumidity(mmachine m)
SO3EnvironmentGetHumidity :
int SO3SkySetEnable(mmachine m)
SO3SkySetEnable :
int SO3WaterSetFoamParameters(mmachine m)
SO3WaterSetFoamParameters :
int SO3SunSetLightColor(mmachine m)
SO3SunSetLightColor :
int SO3SkyGetLayeredCloudParameters(mmachine m)
SO3SkyGetLayeredCloudParameters :
int SO3WaterGetPosition(mmachine m)
SO3WaterGetPosition :
int SO3WaterGetDepthParameters(mmachine m)
SO3WaterGetDepthParameters :
int SO3WaterGetGeometryComplexity(mmachine m)
SO3WaterGetGeometryComplexity : Set the water mesh complexity.
int SO3EnvironmentGetTimeSpeedFactor(mmachine m)
SO3EnvironmentGetTimeSpeedFactor :
int SO3SkySetLayeredCloudParameters(mmachine m)
SO3SkySetLayeredCloudParameters :
int SO3WaterGetColor(mmachine m)
SO3WaterGetColor :
int SO3WaterGetEnable(mmachine m)
SO3WaterGetEnable :
int SO3EnvironmentUnregisterViewport(mmachine m)
SO3EnvironmentUnregisterViewport :
int SO3SunGetLightColor(mmachine m)
SO3SunGetLightColor :
int SO3WaterGetSunParameters(mmachine m)
SO3WaterGetSunParameters :
int SO3WaterSetPerlinNoiseParameters(mmachine m)
SO3WaterSetPerlinNoiseParameters :
int SO3WaterSetGeometryComplexity(mmachine m)
SO3WaterSetGeometryComplexity : Set the water mesh complexity.
int SO3WaterComponentSetEnabled(mmachine m)
SO3WaterComponentSetEnabled :
int SO3SkyAddLightning(mmachine m)
SO3SkyAddLightning : Set the sky Lightning state, the sky component must be set on SO3_SKY_COMPONENT_...
int SO3EnvironmentGetEnable(mmachine m)
SO3EnvironmentGetEnable :
int SO3SkyGetAnimationSpeed(mmachine m)
SO3SkyGetAnimationSpeed :
int SO3SkySetCloudCeiling(mmachine m)
SO3SkySetCloudCeiling :
int SO3WaterSetFftNoiseParameters(mmachine m)
SO3WaterSetFftNoiseParameters :
int SO3EnvironmentGetLatitude(mmachine m)
SO3EnvironmentGetLatitude :
int SO3WaterSetDepthParameters(mmachine m)
SO3WaterSetDepthParameters :
int SO3EnvironmentRegisterViewport(mmachine m)
main include
int SO3EnvironmentSetPaused(mmachine m)
SO3EnvironmentSetPaused :
int SO3WaterSetEnable(mmachine m)
SO3WaterSetEnable :
int SO3WaterSetColor(mmachine m)
SO3WaterSetColor :
int SO3EnvironmentSetLatitude(mmachine m)
SO3EnvironmentSetLatitude :
int SO3EnvironmentSetWindSpeed(mmachine m)
SO3EnvironmentSetWindSpeed :
int SO3SkyGetCloudCeiling(mmachine m)
SO3SkyGetCloudCeiling :
int SO3EnvironmentSetDateTime(mmachine m)
SO3EnvironmentSetDateTime :
int SO3WaterGetWaveParameters(mmachine m)
SO3WaterGetWaveParameters : Get the water mesh parameters.
int SO3EnvironmentGetPaused(mmachine m)
SO3EnvironmentGetPaused :
int SO3WaterGetFoamParameters(mmachine m)
SO3WaterGetFoamParameters :
int SO3MoonGetTexturePath(mmachine m)
SO3MoonGetLightColor :
int SO3MoonGetLightColor(mmachine m)
SO3MoonGetLightColor :
int SO3EnvironmentSetWindDirection(mmachine m)
SO3EnvironmentSetWindDirection :
int SO3WaterSetSmoothPower(mmachine m)
SO3WaterSetSmoothPower :
int SO3EnvironmentGetWindDirection(mmachine m)
SO3EnvironmentGetWindDirection :
int SO3SkyGetLayeredCloudIndexes(mmachine m)
SO3SkyGetLayeredCloudIndexes :
int SO3EnvironmentSetEnable(mmachine m)
SO3EnvironmentSetEnable :
int SO3WaterGetFftNoiseParameters(mmachine m)
SO3WaterGetFftNoiseParameters :
int SO3SkySetHdrEnable(mmachine m)
SO3SkySetHdrEnable :
int SO3SkyRemoveLayeredCloud(mmachine m)
SO3SkyAddLayeredCloud :
int SO3WaterGetSmoothPower(mmachine m)
SO3WaterGetSmoothPower :
int SO3SkySetLightningEnable(mmachine m)
SO3SkySetLightningEnable : Set the sky Lightning state, the sky component must be set on SO3_SKY_COMP...
int SO3WaterGetCausticsParameters(mmachine m)
SO3WaterGetCausticsParameters :
int SO3EnvironmentGetRegisteredViewports(mmachine m)
SO3EnvironmentGetRegisteredViewports :
int SO3EnvironmentSetLongitude(mmachine m)
SO3EnvironmentSetLongitude :
int SO3WaterSetPosition(mmachine m)
SO3WaterSetPosition :
int SO3WaterGetAnimationSpeed(mmachine m)
SO3WaterGetAnimationSpeed :
int SO3WaterGetGodRaysParameters(mmachine m)
SO3WaterGetGodRaysParameters :
int SO3MoonSetTexturePath(mmachine m)
SO3MoonSetTexturePath :
int SO3WaterComponentGetEnabled(mmachine m)
SO3WaterComponentGetEnabled :
int SO3WaterSetWaveParameters(mmachine m)
SO3WaterSetWaveParameters : Set the water mesh parameters.
int SO3SkyAddLayeredCloud(mmachine m)
SO3SkyAddLayeredCloud :
int SO3EnvironmentSetHumidity(mmachine m)
SO3EnvironmentSetHumidity :
int SO3SkyGetVolumetricCloudParameters(mmachine m)
SO3SkyGetVolumetricCloudParameters :
int SO3EnvironmentGetDateTime(mmachine m)
SO3EnvironmentGetDateTime :
int SO3WaterSetSunParameters(mmachine m)
SO3WaterSetSunParameters :
int SO3SkyComponentSetEnabled(mmachine m)
SO3SkyComponentSetEnabled :