64 using std::make_unique;
66 using std::unique_ptr;
160 if (fileName.empty() ==
true)
throw ExceptionBase(
"Could not save file. No filename known");
162 Tools::getPathName(fileName),
163 Tools::getFileName(fileName)
172 class OnParticleSave:
public virtual Action
175 void performAction()
override {
177 particleSystemEditorTabController->view->saveFile(
178 particleSystemEditorTabController->popUps->getFileDialogScreenController()->getPathName(),
179 particleSystemEditorTabController->popUps->getFileDialogScreenController()->getFileName()
182 particleSystemEditorTabController->showInfoPopUp(
"Warning",
string(exception.what()));
184 particleSystemEditorTabController->popUps->getFileDialogScreenController()->close();
194 fileName.empty() ==
false?Tools::getPathName(fileName):
string(),
197 Tools::getFileName(fileName),
199 new OnParticleSave(
this)
204 showInfoPopUp(
"Warning",
"This command is not supported yet");
213 if (StringTools::startsWith(payload,
"file:") ==
false) {
216 auto fileName = StringTools::substring(payload,
string(
"file:").size());
218 if (Tools::hasFileExtension(fileName, TextureReader::getTextureExtensions()) ==
false) {
219 showInfoPopUp(
"Warning",
"You can not drop this file here. Allowed file extensions are " + Tools::enumerateFileExtensions(TextureReader::getTextureExtensions()));
222 auto particleSystemIdx = Integer::parse(StringTools::substring(outlinerNode,
string(
"particlesystems.").size(), outlinerNode.size()));
227 if (Tools::hasFileExtension(fileName, TextureReader::getTextureExtensions()) ==
false) {
228 showInfoPopUp(
"Warning",
"You can not drop this file here. Allowed file extensions are " + Tools::enumerateFileExtensions(TextureReader::getTextureExtensions()));
231 auto particleSystemIdx = Integer::parse(StringTools::substring(outlinerNode,
string(
"particlesystems.").size(), outlinerNode.size()));
236 if (Tools::hasFileExtension(fileName, TextureReader::getTextureExtensions()) ==
false) {
237 showInfoPopUp(
"Warning",
"You can not drop this file here. Allowed file extensions are " + Tools::enumerateFileExtensions(TextureReader::getTextureExtensions()));
240 auto particleSystemIdx = Integer::parse(StringTools::substring(outlinerNode,
string(
"particlesystems.").size(), outlinerNode.size()));
245 if (Tools::hasFileExtension(fileName, TextureReader::getTextureExtensions()) ==
false) {
246 showInfoPopUp(
"Warning",
"You can not drop this file here. Allowed file extensions are " + Tools::enumerateFileExtensions(TextureReader::getTextureExtensions()));
249 auto particleSystemIdx = Integer::parse(StringTools::substring(outlinerNode,
string(
"particlesystems.").size(), outlinerNode.size()));
254 if (Tools::hasFileExtension(fileName, ModelReader::getModelExtensions()) ==
false) {
255 showInfoPopUp(
"Warning",
"You can not drop this file here. Allowed file extensions are " + Tools::enumerateFileExtensions(ModelReader::getModelExtensions()));
258 auto particleSystemIdx = Integer::parse(StringTools::substring(outlinerNode,
string(
"particlesystems.").size(), outlinerNode.size()));
284 if (node->
getId() ==
"dropdown_outliner_add") {
288 if (prototype !=
nullptr) {
290 auto particleSystemIdx = prototype->getParticleSystemsCount() - 1;
291 if (particleSystemIdx != -1) {
299 if (node->
getId() ==
"selectbox_outliner") {
302 auto particleSystemIdx = Integer::parse(StringTools::substring(outlinerNode,
string(
"particlesystems.").size(), outlinerNode.size()));
310 if (StringTools::startsWith(outlinerNode,
"particlesystems.") ==
true) {
311 auto particleSystemIdx = Integer::parse(StringTools::substring(outlinerNode,
string(
"particlesystems.").size(), outlinerNode.size()));
313 if (node->
getId() == applyOPSNode) {
319 if (node->
getId() == applyPPSNode) {
325 if (node->
getId() == applyFPSNode) {
331 if (node->
getId() == applyBaseNode) {
337 if (node->
getId() == applyBBPENode) {
343 if (node->
getId() == applyPPENode) {
349 if (node->
getId() == applySPENode) {
355 if (node->
getId() == applyCPENode) {
361 if (node->
getId() == applyRPENode) {
385 if (node->
getId() ==
"selectbox_outliner") {
387 if (outlinerNode ==
"particlesystems") {
392 class OnAddParticleSystemAction:
public virtual Action
395 void performAction()
override {
396 auto prototype = particleSystemEditorTabController->view->getPrototype();
397 if (prototype ==
nullptr)
return;
399 auto particleSystemIdx = prototype->getParticleSystemsCount() - 1;
401 auto view = particleSystemEditorTabController->view;
403 auto editorView = particleSystemEditorTabController->view->getEditorView();
404 editorView->reloadTabOutliner(
"particlesystems." + to_string(particleSystemIdx));
407 OnAddParticleSystemAction(
ParticleSystemEditorTabController* particleSystemEditorTabController): particleSystemEditorTabController(particleSystemEditorTabController) {
417 if (StringTools::startsWith(outlinerNode,
"particlesystems.") ==
true) {
418 auto particleSystemIdx = Integer::parse(StringTools::substring(outlinerNode,
string(
"particlesystems.").size(), outlinerNode.size()));
424 class OnRemoveParticleSystemAction:
public virtual Action
427 void performAction()
override {
428 auto prototype = particleSystemEditorTabController->view->getPrototype();
429 if (prototype ==
nullptr)
return;
431 prototype->removeParticleSystemAt(particleSystemIdx);
433 particleSystemEditorTabController->view->uninitParticleSystem();
434 auto editorView = particleSystemEditorTabController->view->getEditorView();
435 editorView->reloadTabOutliner(
"particlesystems");
436 particleSystemEditorTabController->view->initParticleSystem();
438 OnRemoveParticleSystemAction(
ParticleSystemEditorTabController* particleSystemEditorTabController,
int particleSystemIdx): particleSystemEditorTabController(particleSystemEditorTabController), particleSystemIdx(particleSystemIdx) {
442 int particleSystemIdx;
453 int tooltipLeft, tooltipTop;
466 if (prototype ==
nullptr)
return;
475 if (node->
getId().compare(
"particleemitter_box_colorstart_edit") == 0) {
477 if (StringTools::startsWith(outlinerNode,
"particlesystems.") ==
true) {
478 auto particleSystemIdx = Integer::parse(StringTools::substring(outlinerNode,
string(
"particlesystems.").size(), outlinerNode.size()));
479 auto particleSystem = prototype->getParticleSystemAt(particleSystemIdx);
480 auto bbpe = particleSystem !=
nullptr?particleSystem->getBoundingBoxParticleEmitters():
nullptr;
481 if (bbpe !=
nullptr) {
483 class OnColorChangeAction:
public virtual Action
486 void performAction()
override {
487 auto prototype = particleSystemEditorTabController->view->getPrototype();
488 if (prototype ==
nullptr)
return;
489 auto particleSystem = prototype->getParticleSystemAt(particleSystemIdx);
490 auto bbpe = particleSystem !=
nullptr?particleSystem->getBoundingBoxParticleEmitters():
nullptr;
491 if (bbpe ==
nullptr)
return;
492 bbpe->setColorStart(
Color4(particleSystemEditorTabController->popUps->getColorPickerScreenController()->getColor()));
495 required_dynamic_cast<GUIImageNode*>(particleSystemEditorTabController->screenNode->getNodeById(
"particleemitter_box_colorstart"))->setEffectColorMul(bbpe->getColorStart());
497 Console::println(
"OnColorChangeAction::performAction(): An error occurred: " +
string(exception.what()));
498 particleSystemEditorTabController->showInfoPopUp(
"Warning",
string(exception.what()));
500 particleSystemEditorTabController->view->initParticleSystem();
502 OnColorChangeAction(
ParticleSystemEditorTabController* particleSystemEditorTabController,
int particleSystemIdx): particleSystemEditorTabController(particleSystemEditorTabController), particleSystemIdx(particleSystemIdx) {
506 int particleSystemIdx;
512 if (node->
getId().compare(
"particleemitter_box_colorend_edit") == 0) {
514 if (StringTools::startsWith(outlinerNode,
"particlesystems.") ==
true) {
515 auto particleSystemIdx = Integer::parse(StringTools::substring(outlinerNode,
string(
"particlesystems.").size(), outlinerNode.size()));
516 auto particleSystem = prototype->getParticleSystemAt(particleSystemIdx);
517 auto bbpe = particleSystem !=
nullptr?particleSystem->getBoundingBoxParticleEmitters():
nullptr;
518 if (bbpe !=
nullptr) {
520 class OnColorChangeAction:
public virtual Action
523 void performAction()
override {
524 auto prototype = particleSystemEditorTabController->view->getPrototype();
525 if (prototype ==
nullptr)
return;
526 auto particleSystem = prototype->getParticleSystemAt(particleSystemIdx);
527 auto bbpe = particleSystem !=
nullptr?particleSystem->getBoundingBoxParticleEmitters():
nullptr;
528 if (bbpe ==
nullptr)
return;
529 bbpe->setColorEnd(
Color4(particleSystemEditorTabController->popUps->getColorPickerScreenController()->getColor()));
532 required_dynamic_cast<GUIImageNode*>(particleSystemEditorTabController->screenNode->getNodeById(
"particleemitter_box_colorend"))->setEffectColorMul(bbpe->getColorEnd());
534 Console::println(
"OnColorChangeAction::performAction(): An error occurred: " +
string(exception.what()));
535 particleSystemEditorTabController->showInfoPopUp(
"Warning",
string(exception.what()));
537 particleSystemEditorTabController->view->initParticleSystem();
539 OnColorChangeAction(
ParticleSystemEditorTabController* particleSystemEditorTabController,
int particleSystemIdx): particleSystemEditorTabController(particleSystemEditorTabController), particleSystemIdx(particleSystemIdx) {
543 int particleSystemIdx;
549 if (node->
getId().compare(
"particleemitter_point_colorstart_edit") == 0) {
551 if (StringTools::startsWith(outlinerNode,
"particlesystems.") ==
true) {
552 auto particleSystemIdx = Integer::parse(StringTools::substring(outlinerNode,
string(
"particlesystems.").size(), outlinerNode.size()));
553 auto particleSystem = prototype->getParticleSystemAt(particleSystemIdx);
554 auto ppe = particleSystem !=
nullptr?particleSystem->getPointParticleEmitter():
nullptr;
555 if (ppe !=
nullptr) {
557 class OnColorChangeAction:
public virtual Action
560 void performAction()
override {
561 auto prototype = particleSystemEditorTabController->view->getPrototype();
562 if (prototype ==
nullptr)
return;
563 auto particleSystem = prototype->getParticleSystemAt(particleSystemIdx);
564 auto ppe = particleSystem !=
nullptr?particleSystem->getPointParticleEmitter():
nullptr;
565 if (ppe ==
nullptr)
return;
566 ppe->setColorStart(
Color4(particleSystemEditorTabController->popUps->getColorPickerScreenController()->getColor()));
569 required_dynamic_cast<GUIImageNode*>(particleSystemEditorTabController->screenNode->getNodeById(
"particleemitter_point_colorstart"))->setEffectColorMul(ppe->getColorStart());
571 Console::println(
"OnColorChangeAction::performAction(): An error occurred: " +
string(exception.what()));
572 particleSystemEditorTabController->showInfoPopUp(
"Warning",
string(exception.what()));
574 particleSystemEditorTabController->view->initParticleSystem();
576 OnColorChangeAction(
ParticleSystemEditorTabController* particleSystemEditorTabController,
int particleSystemIdx): particleSystemEditorTabController(particleSystemEditorTabController), particleSystemIdx(particleSystemIdx) {
580 int particleSystemIdx;
586 if (node->
getId().compare(
"particleemitter_point_colorend_edit") == 0) {
588 if (StringTools::startsWith(outlinerNode,
"particlesystems.") ==
true) {
589 auto particleSystemIdx = Integer::parse(StringTools::substring(outlinerNode,
string(
"particlesystems.").size(), outlinerNode.size()));
590 auto particleSystem = prototype->getParticleSystemAt(particleSystemIdx);
591 auto ppe = particleSystem !=
nullptr?particleSystem->getPointParticleEmitter():
nullptr;
592 if (ppe !=
nullptr) {
594 class OnColorChangeAction:
public virtual Action
597 void performAction()
override {
598 auto prototype = particleSystemEditorTabController->view->getPrototype();
599 if (prototype ==
nullptr)
return;
600 auto particleSystem = prototype->getParticleSystemAt(particleSystemIdx);
601 auto ppe = particleSystem !=
nullptr?particleSystem->getPointParticleEmitter():
nullptr;
602 if (ppe ==
nullptr)
return;
603 ppe->setColorEnd(
Color4(particleSystemEditorTabController->popUps->getColorPickerScreenController()->getColor()));
606 required_dynamic_cast<GUIImageNode*>(particleSystemEditorTabController->screenNode->getNodeById(
"particleemitter_point_colorend"))->setEffectColorMul(ppe->getColorEnd());
608 Console::println(
"OnColorChangeAction::performAction(): An error occurred: " +
string(exception.what()));
609 particleSystemEditorTabController->showInfoPopUp(
"Warning",
string(exception.what()));
611 particleSystemEditorTabController->view->initParticleSystem();
613 OnColorChangeAction(
ParticleSystemEditorTabController* particleSystemEditorTabController,
int particleSystemIdx): particleSystemEditorTabController(particleSystemEditorTabController), particleSystemIdx(particleSystemIdx) {
617 int particleSystemIdx;
623 if (node->
getId().compare(
"particleemitter_sphere_colorstart_edit") == 0) {
625 if (StringTools::startsWith(outlinerNode,
"particlesystems.") ==
true) {
626 auto particleSystemIdx = Integer::parse(StringTools::substring(outlinerNode,
string(
"particlesystems.").size(), outlinerNode.size()));
627 auto particleSystem = prototype->getParticleSystemAt(particleSystemIdx);
628 auto spe = particleSystem !=
nullptr?particleSystem->getSphereParticleEmitter():
nullptr;
629 if (spe !=
nullptr) {
631 class OnColorChangeAction:
public virtual Action
634 void performAction()
override {
635 auto prototype = particleSystemEditorTabController->view->getPrototype();
636 if (prototype ==
nullptr)
return;
637 auto particleSystem = prototype->getParticleSystemAt(particleSystemIdx);
638 auto spe = particleSystem !=
nullptr?particleSystem->getSphereParticleEmitter():
nullptr;
639 if (spe ==
nullptr)
return;
640 spe->setColorStart(
Color4(particleSystemEditorTabController->popUps->getColorPickerScreenController()->getColor()));
643 required_dynamic_cast<GUIImageNode*>(particleSystemEditorTabController->screenNode->getNodeById(
"particleemitter_sphere_colorstart"))->setEffectColorMul(spe->getColorStart());
645 Console::println(
"OnColorChangeAction::performAction(): An error occurred: " +
string(exception.what()));
646 particleSystemEditorTabController->showInfoPopUp(
"Warning",
string(exception.what()));
648 particleSystemEditorTabController->view->initParticleSystem();
650 OnColorChangeAction(
ParticleSystemEditorTabController* particleSystemEditorTabController,
int particleSystemIdx): particleSystemEditorTabController(particleSystemEditorTabController), particleSystemIdx(particleSystemIdx) {
654 int particleSystemIdx;
660 if (node->
getId().compare(
"particleemitter_sphere_colorend_edit") == 0) {
662 if (StringTools::startsWith(outlinerNode,
"particlesystems.") ==
true) {
663 auto particleSystemIdx = Integer::parse(StringTools::substring(outlinerNode,
string(
"particlesystems.").size(), outlinerNode.size()));
664 auto particleSystem = prototype->getParticleSystemAt(particleSystemIdx);
665 auto spe = particleSystem !=
nullptr?particleSystem->getSphereParticleEmitter():
nullptr;
666 if (spe !=
nullptr) {
668 class OnColorChangeAction:
public virtual Action
671 void performAction()
override {
672 auto prototype = particleSystemEditorTabController->view->getPrototype();
673 if (prototype ==
nullptr)
return;
674 auto particleSystem = prototype->getParticleSystemAt(particleSystemIdx);
675 auto spe = particleSystem !=
nullptr?particleSystem->getSphereParticleEmitter():
nullptr;
676 if (spe ==
nullptr)
return;
677 spe->setColorEnd(
Color4(particleSystemEditorTabController->popUps->getColorPickerScreenController()->getColor()));
680 required_dynamic_cast<GUIImageNode*>(particleSystemEditorTabController->screenNode->getNodeById(
"particleemitter_sphere_colorend"))->setEffectColorMul(spe->getColorEnd());
682 Console::println(
"OnColorChangeAction::performAction(): An error occurred: " +
string(exception.what()));
683 particleSystemEditorTabController->showInfoPopUp(
"Warning",
string(exception.what()));
685 particleSystemEditorTabController->view->initParticleSystem();
687 OnColorChangeAction(
ParticleSystemEditorTabController* particleSystemEditorTabController,
int particleSystemIdx): particleSystemEditorTabController(particleSystemEditorTabController), particleSystemIdx(particleSystemIdx) {
691 int particleSystemIdx;
697 if (node->
getId().compare(
"particleemitter_circle_colorstart_edit") == 0) {
699 if (StringTools::startsWith(outlinerNode,
"particlesystems.") ==
true) {
700 auto particleSystemIdx = Integer::parse(StringTools::substring(outlinerNode,
string(
"particlesystems.").size(), outlinerNode.size()));
701 auto particleSystem = prototype->getParticleSystemAt(particleSystemIdx);
702 auto cpe = particleSystem !=
nullptr?particleSystem->getCircleParticleEmitter():
nullptr;
703 if (cpe !=
nullptr) {
705 class OnColorChangeAction:
public virtual Action
708 void performAction()
override {
709 auto prototype = particleSystemEditorTabController->view->getPrototype();
710 if (prototype ==
nullptr)
return;
711 auto particleSystem = prototype->getParticleSystemAt(particleSystemIdx);
712 auto cpe = particleSystem !=
nullptr?particleSystem->getCircleParticleEmitter():
nullptr;
713 if (cpe ==
nullptr)
return;
714 cpe->setColorStart(
Color4(particleSystemEditorTabController->popUps->getColorPickerScreenController()->getColor()));
717 required_dynamic_cast<GUIImageNode*>(particleSystemEditorTabController->screenNode->getNodeById(
"particleemitter_circle_colorstart"))->setEffectColorMul(cpe->getColorStart());
719 Console::println(
"OnColorChangeAction::performAction(): An error occurred: " +
string(exception.what()));
720 particleSystemEditorTabController->showInfoPopUp(
"Warning",
string(exception.what()));
722 particleSystemEditorTabController->view->initParticleSystem();
724 OnColorChangeAction(
ParticleSystemEditorTabController* particleSystemEditorTabController,
int particleSystemIdx): particleSystemEditorTabController(particleSystemEditorTabController), particleSystemIdx(particleSystemIdx) {
728 int particleSystemIdx;
734 if (node->
getId().compare(
"particleemitter_circle_colorend_edit") == 0) {
736 if (StringTools::startsWith(outlinerNode,
"particlesystems.") ==
true) {
737 auto particleSystemIdx = Integer::parse(StringTools::substring(outlinerNode,
string(
"particlesystems.").size(), outlinerNode.size()));
738 auto particleSystem = prototype->getParticleSystemAt(particleSystemIdx);
739 auto cpe = particleSystem !=
nullptr?particleSystem->getCircleParticleEmitter():
nullptr;
740 if (cpe !=
nullptr) {
742 class OnColorChangeAction:
public virtual Action
745 void performAction()
override {
746 auto prototype = particleSystemEditorTabController->view->getPrototype();
747 if (prototype ==
nullptr)
return;
748 auto particleSystem = prototype->getParticleSystemAt(particleSystemIdx);
749 auto cpe = particleSystem !=
nullptr?particleSystem->getCircleParticleEmitter():
nullptr;
750 if (cpe ==
nullptr)
return;
751 cpe->setColorEnd(
Color4(particleSystemEditorTabController->popUps->getColorPickerScreenController()->getColor()));
754 required_dynamic_cast<GUIImageNode*>(particleSystemEditorTabController->screenNode->getNodeById(
"particleemitter_circle_colorend"))->setEffectColorMul(cpe->getColorEnd());
756 Console::println(
"OnColorChangeAction::performAction(): An error occurred: " +
string(exception.what()));
757 particleSystemEditorTabController->showInfoPopUp(
"Warning",
string(exception.what()));
759 particleSystemEditorTabController->view->initParticleSystem();
761 OnColorChangeAction(
ParticleSystemEditorTabController* particleSystemEditorTabController,
int particleSystemIdx): particleSystemEditorTabController(particleSystemEditorTabController), particleSystemIdx(particleSystemIdx) {
765 int particleSystemIdx;
771 if (node->
getId().compare(
"particleemitter_radial_colorstart_edit") == 0) {
773 if (StringTools::startsWith(outlinerNode,
"particlesystems.") ==
true) {
774 auto particleSystemIdx = Integer::parse(StringTools::substring(outlinerNode,
string(
"particlesystems.").size(), outlinerNode.size()));
775 auto particleSystem = prototype->getParticleSystemAt(particleSystemIdx);
776 auto rpe = particleSystem !=
nullptr?particleSystem->getCircleParticleEmitterPlaneVelocity():
nullptr;
777 if (rpe !=
nullptr) {
779 class OnColorChangeAction:
public virtual Action
782 void performAction()
override {
783 auto prototype = particleSystemEditorTabController->view->getPrototype();
784 if (prototype ==
nullptr)
return;
785 auto particleSystem = prototype->getParticleSystemAt(particleSystemIdx);
786 auto rpe = particleSystem !=
nullptr?particleSystem->getCircleParticleEmitterPlaneVelocity():
nullptr;
787 if (rpe ==
nullptr)
return;
788 rpe->setColorStart(
Color4(particleSystemEditorTabController->popUps->getColorPickerScreenController()->getColor()));
791 required_dynamic_cast<GUIImageNode*>(particleSystemEditorTabController->screenNode->getNodeById(
"particleemitter_radial_colorstart"))->setEffectColorMul(rpe->getColorStart());
793 Console::println(
"OnColorChangeAction::performAction(): An error occurred: " +
string(exception.what()));
794 particleSystemEditorTabController->showInfoPopUp(
"Warning",
string(exception.what()));
796 particleSystemEditorTabController->view->initParticleSystem();
798 OnColorChangeAction(
ParticleSystemEditorTabController* particleSystemEditorTabController,
int particleSystemIdx): particleSystemEditorTabController(particleSystemEditorTabController), particleSystemIdx(particleSystemIdx) {
802 int particleSystemIdx;
808 if (node->
getId().compare(
"particleemitter_radial_colorend_edit") == 0) {
810 if (StringTools::startsWith(outlinerNode,
"particlesystems.") ==
true) {
811 auto particleSystemIdx = Integer::parse(StringTools::substring(outlinerNode,
string(
"particlesystems.").size(), outlinerNode.size()));
812 auto particleSystem = prototype->getParticleSystemAt(particleSystemIdx);
813 auto rpe = particleSystem !=
nullptr?particleSystem->getCircleParticleEmitterPlaneVelocity():
nullptr;
814 if (rpe !=
nullptr) {
816 class OnColorChangeAction:
public virtual Action
819 void performAction()
override {
820 auto prototype = particleSystemEditorTabController->view->getPrototype();
821 if (prototype ==
nullptr)
return;
822 auto particleSystem = prototype->getParticleSystemAt(particleSystemIdx);
823 auto rpe = particleSystem !=
nullptr?particleSystem->getCircleParticleEmitterPlaneVelocity():
nullptr;
824 if (rpe ==
nullptr)
return;
825 rpe->setColorEnd(
Color4(particleSystemEditorTabController->popUps->getColorPickerScreenController()->getColor()));
828 required_dynamic_cast<GUIImageNode*>(particleSystemEditorTabController->screenNode->getNodeById(
"particleemitter_radial_colorend"))->setEffectColorMul(rpe->getColorEnd());
830 Console::println(
"OnColorChangeAction::performAction(): An error occurred: " +
string(exception.what()));
831 particleSystemEditorTabController->showInfoPopUp(
"Warning",
string(exception.what()));
833 particleSystemEditorTabController->view->initParticleSystem();
835 OnColorChangeAction(
ParticleSystemEditorTabController* particleSystemEditorTabController,
int particleSystemIdx): particleSystemEditorTabController(particleSystemEditorTabController), particleSystemIdx(particleSystemIdx) {
839 int particleSystemIdx;
845 if (node->
getId().compare(
"particletype_point_texture_open") == 0) {
847 if (StringTools::startsWith(outlinerNode,
"particlesystems.") ==
true) {
848 auto particleSystemIdx = Integer::parse(StringTools::substring(outlinerNode,
string(
"particlesystems.").size(), outlinerNode.size()));
849 auto particleSystem = prototype->getParticleSystemAt(particleSystemIdx);
850 auto pps = particleSystem !=
nullptr?particleSystem->getPointParticleSystem():
nullptr;
851 if (pps !=
nullptr) {
852 class OnPointParticleSystemLoadTexture:
public virtual Action
855 void performAction()
override {
856 particleSystemEditorTabController->setPointParticleSystemTexture(
858 particleSystemEditorTabController->view->getPopUps()->getFileDialogScreenController()->getPathName() +
"/" + particleSystemEditorTabController->view->getPopUps()->getFileDialogScreenController()->getFileName()
860 particleSystemEditorTabController->view->getPopUps()->getFileDialogScreenController()->close();
864 : particleSystemEditorTabController(particleSystemEditorTabController)
865 , particleSystemIdx(particleSystemIdx) {
869 int particleSystemIdx;
873 pps->getTextureFileName().empty() ==
false?Tools::getPathName(pps->getTextureFileName()):
string(),
874 "Load point particle system texture from: ",
875 TextureReader::getTextureExtensions(),
876 Tools::getFileName(pps->getTextureFileName()),
878 new OnPointParticleSystemLoadTexture(
this, particleSystemIdx)
883 if (node->
getId().compare(
"particletype_point_texture_remove") == 0) {
885 if (StringTools::startsWith(outlinerNode,
"particlesystems.") ==
true) {
886 auto particleSystemIdx = Integer::parse(StringTools::substring(outlinerNode,
string(
"particlesystems.").size(), outlinerNode.size()));
887 auto particleSystem = prototype->getParticleSystemAt(particleSystemIdx);
888 auto pps = particleSystem !=
nullptr?particleSystem->getPointParticleSystem():
nullptr;
889 if (pps !=
nullptr) {
892 pps->setTextureFileName(
string(), pps->getTransparencyTextureFileName());
893 required_dynamic_cast<GUIImageNode*>(
screenNode->
getNodeById(
"particletype_point_texture"))->setSource(pps->getTextureFileName());
894 required_dynamic_cast<GUIImageNode*>(
screenNode->
getNodeById(
"particletype_point_texture"))->setTooltip(pps->getTextureFileName());
896 Console::println(
"ParticleSystemEditorTabController::onAction(): An error occurred: " +
string(exception.what()));
903 if (node->
getId().compare(
"particletype_point_texture_browseto") == 0) {
905 if (StringTools::startsWith(outlinerNode,
"particlesystems.") ==
true) {
906 auto particleSystemIdx = Integer::parse(StringTools::substring(outlinerNode,
string(
"particlesystems.").size(), outlinerNode.size()));
907 auto particleSystem = prototype->getParticleSystemAt(particleSystemIdx);
908 auto pps = particleSystem !=
nullptr?particleSystem->getPointParticleSystem():
nullptr;
909 if (pps !=
nullptr && pps->getTextureFileName().empty() ==
false) {
916 if (node->
getId().compare(
"particletype_point_transparency_open") == 0) {
918 if (StringTools::startsWith(outlinerNode,
"particlesystems.") ==
true) {
919 auto particleSystemIdx = Integer::parse(StringTools::substring(outlinerNode,
string(
"particlesystems.").size(), outlinerNode.size()));
920 auto particleSystem = prototype->getParticleSystemAt(particleSystemIdx);
921 auto pps = particleSystem !=
nullptr?particleSystem->getPointParticleSystem():
nullptr;
922 if (pps !=
nullptr) {
923 class OnPointParticleSystemLoadTransparencyTexture:
public virtual Action
926 void performAction()
override {
927 particleSystemEditorTabController->setPointParticleSystemTransparencyTexture(
929 particleSystemEditorTabController->view->getPopUps()->getFileDialogScreenController()->getPathName() +
"/" + particleSystemEditorTabController->view->getPopUps()->getFileDialogScreenController()->getFileName()
931 particleSystemEditorTabController->view->getPopUps()->getFileDialogScreenController()->close();
935 : particleSystemEditorTabController(particleSystemEditorTabController)
936 , particleSystemIdx(particleSystemIdx) {
940 int particleSystemIdx;
944 pps->getTextureFileName().empty() ==
false?Tools::getPathName(pps->getTextureFileName()):
string(),
945 "Load point particle system texture from: ",
946 TextureReader::getTextureExtensions(),
947 Tools::getFileName(pps->getTextureFileName()),
949 new OnPointParticleSystemLoadTransparencyTexture(
this, particleSystemIdx)
954 if (node->
getId().compare(
"particletype_point_transparency_remove") == 0) {
956 if (StringTools::startsWith(outlinerNode,
"particlesystems.") ==
true) {
957 auto particleSystemIdx = Integer::parse(StringTools::substring(outlinerNode,
string(
"particlesystems.").size(), outlinerNode.size()));
958 auto particleSystem = prototype->getParticleSystemAt(particleSystemIdx);
959 auto pps = particleSystem !=
nullptr?particleSystem->getPointParticleSystem():
nullptr;
960 if (pps !=
nullptr) {
963 pps->setTextureFileName(pps->getTextureFileName(),
string());
964 required_dynamic_cast<GUIImageNode*>(
screenNode->
getNodeById(
"particletype_point_transparency"))->setSource(pps->getTransparencyTextureFileName());
965 required_dynamic_cast<GUIImageNode*>(
screenNode->
getNodeById(
"particletype_point_transparency"))->setTooltip(pps->getTransparencyTextureFileName());
967 Console::println(
"ParticleSystemEditorTabController::onAction(): An error occurred: " +
string(exception.what()));
974 if (node->
getId().compare(
"particletype_point_transparency_browseto") == 0) {
976 if (StringTools::startsWith(outlinerNode,
"particlesystems.") ==
true) {
977 auto particleSystemIdx = Integer::parse(StringTools::substring(outlinerNode,
string(
"particlesystems.").size(), outlinerNode.size()));
978 auto particleSystem = prototype->getParticleSystemAt(particleSystemIdx);
979 auto pps = particleSystem !=
nullptr?particleSystem->getPointParticleSystem():
nullptr;
980 if (pps !=
nullptr && pps->getTransparencyTextureFileName().empty() ==
false) {
987 if (node->
getId().compare(
"particletype_fog_texture_open") == 0) {
989 if (StringTools::startsWith(outlinerNode,
"particlesystems.") ==
true) {
990 auto particleSystemIdx = Integer::parse(StringTools::substring(outlinerNode,
string(
"particlesystems.").size(), outlinerNode.size()));
991 auto particleSystem = prototype->getParticleSystemAt(particleSystemIdx);
992 auto fps = particleSystem !=
nullptr?particleSystem->getFogParticleSystem():
nullptr;
993 if (fps !=
nullptr) {
994 class OnFogParticleSystemLoadTexture:
public virtual Action
997 void performAction()
override {
998 particleSystemEditorTabController->setFogParticleSystemTexture(
1000 particleSystemEditorTabController->view->getPopUps()->getFileDialogScreenController()->getPathName() +
"/" + particleSystemEditorTabController->view->getPopUps()->getFileDialogScreenController()->getFileName()
1002 particleSystemEditorTabController->view->getPopUps()->getFileDialogScreenController()->close();
1006 : particleSystemEditorTabController(particleSystemEditorTabController)
1007 , particleSystemIdx(particleSystemIdx) {
1011 int particleSystemIdx;
1015 fps->getTextureFileName().empty() ==
false?Tools::getPathName(fps->getTextureFileName()):
string(),
1016 "Load point particle system texture from: ",
1017 TextureReader::getTextureExtensions(),
1018 Tools::getFileName(fps->getTextureFileName()),
1020 new OnFogParticleSystemLoadTexture(
this, particleSystemIdx)
1025 if (node->
getId().compare(
"particletype_fog_texture_remove") == 0) {
1027 if (StringTools::startsWith(outlinerNode,
"particlesystems.") ==
true) {
1028 auto particleSystemIdx = Integer::parse(StringTools::substring(outlinerNode,
string(
"particlesystems.").size(), outlinerNode.size()));
1029 auto particleSystem = prototype->getParticleSystemAt(particleSystemIdx);
1030 auto fps = particleSystem !=
nullptr?particleSystem->getFogParticleSystem():
nullptr;
1031 if (fps !=
nullptr) {
1034 fps->setTextureFileName(
string(), fps->getTransparencyTextureFileName());
1035 required_dynamic_cast<GUIImageNode*>(
screenNode->
getNodeById(
"particletype_fog_texture"))->setSource(fps->getTextureFileName());
1036 required_dynamic_cast<GUIImageNode*>(
screenNode->
getNodeById(
"particletype_fog_texture"))->setTooltip(fps->getTextureFileName());
1038 Console::println(
"ParticleSystemEditorTabController::onAction(): An error occurred: " +
string(exception.what()));
1045 if (node->
getId().compare(
"particletype_fog_texture_browseto") == 0) {
1047 if (StringTools::startsWith(outlinerNode,
"particlesystems.") ==
true) {
1048 auto particleSystemIdx = Integer::parse(StringTools::substring(outlinerNode,
string(
"particlesystems.").size(), outlinerNode.size()));
1049 auto particleSystem = prototype->getParticleSystemAt(particleSystemIdx);
1050 auto fps = particleSystem !=
nullptr?particleSystem->getFogParticleSystem():
nullptr;
1051 if (fps !=
nullptr && fps->getTextureFileName().empty() ==
false) {
1058 if (node->
getId().compare(
"particletype_fog_transparency_open") == 0) {
1060 if (StringTools::startsWith(outlinerNode,
"particlesystems.") ==
true) {
1061 auto particleSystemIdx = Integer::parse(StringTools::substring(outlinerNode,
string(
"particlesystems.").size(), outlinerNode.size()));
1062 auto particleSystem = prototype->getParticleSystemAt(particleSystemIdx);
1063 auto fps = particleSystem !=
nullptr?particleSystem->getFogParticleSystem():
nullptr;
1064 if (fps !=
nullptr) {
1065 class OnFogParticleSystemLoadTransparencyTexture:
public virtual Action
1068 void performAction()
override {
1069 particleSystemEditorTabController->setFogParticleSystemTransparencyTexture(
1071 particleSystemEditorTabController->view->getPopUps()->getFileDialogScreenController()->getPathName() +
"/" + particleSystemEditorTabController->view->getPopUps()->getFileDialogScreenController()->getFileName()
1073 particleSystemEditorTabController->view->getPopUps()->getFileDialogScreenController()->close();
1077 : particleSystemEditorTabController(particleSystemEditorTabController)
1078 , particleSystemIdx(particleSystemIdx) {
1082 int particleSystemIdx;
1086 fps->getTextureFileName().empty() ==
false?Tools::getPathName(fps->getTextureFileName()):
string(),
1087 "Load point particle system texture from: ",
1088 TextureReader::getTextureExtensions(),
1089 Tools::getFileName(fps->getTextureFileName()),
1091 new OnFogParticleSystemLoadTransparencyTexture(
this, particleSystemIdx)
1096 if (node->
getId().compare(
"particletype_fog_transparency_remove") == 0) {
1098 if (StringTools::startsWith(outlinerNode,
"particlesystems.") ==
true) {
1099 auto particleSystemIdx = Integer::parse(StringTools::substring(outlinerNode,
string(
"particlesystems.").size(), outlinerNode.size()));
1100 auto particleSystem = prototype->getParticleSystemAt(particleSystemIdx);
1101 auto fps = particleSystem !=
nullptr?particleSystem->getFogParticleSystem():
nullptr;
1102 if (fps !=
nullptr) {
1105 fps->setTextureFileName(fps->getTextureFileName(),
string());
1106 required_dynamic_cast<GUIImageNode*>(
screenNode->
getNodeById(
"particletype_fog_transparency"))->setSource(fps->getTransparencyTextureFileName());
1107 required_dynamic_cast<GUIImageNode*>(
screenNode->
getNodeById(
"particletype_fog_transparency"))->setTooltip(fps->getTransparencyTextureFileName());
1109 Console::println(
"ParticleSystemEditorTabController::onAction(): An error occurred: " +
string(exception.what()));
1116 if (node->
getId().compare(
"particletype_fog_transparency_browseto") == 0) {
1118 if (StringTools::startsWith(outlinerNode,
"particlesystems.") ==
true) {
1119 auto particleSystemIdx = Integer::parse(StringTools::substring(outlinerNode,
string(
"particlesystems.").size(), outlinerNode.size()));
1120 auto particleSystem = prototype->getParticleSystemAt(particleSystemIdx);
1121 auto fps = particleSystem !=
nullptr?particleSystem->getFogParticleSystem():
nullptr;
1122 if (fps !=
nullptr && fps->getTransparencyTextureFileName().empty() ==
false) {
1129 if (node->
getId() ==
"particletype_object_open") {
1131 if (StringTools::startsWith(outlinerNode,
"particlesystems.") ==
true) {
1132 auto particleSystemIdx = Integer::parse(StringTools::substring(outlinerNode,
string(
"particlesystems.").size(), outlinerNode.size()));
1133 auto particleSystem = prototype->getParticleSystemAt(particleSystemIdx);
1134 auto ops = particleSystem !=
nullptr?particleSystem->getObjectParticleSystem():
nullptr;
1135 if (ops !=
nullptr) {
1137 class OnObjectParticleSystemLoadModel:
public virtual Action
1140 void performAction()
override {
1141 particleSystemEditorTabController->setObjectParticleSystemModel(
1143 particleSystemEditorTabController->view->getPopUps()->getFileDialogScreenController()->getPathName() +
"/" + particleSystemEditorTabController->view->getPopUps()->getFileDialogScreenController()->getFileName()
1145 particleSystemEditorTabController->view->getPopUps()->getFileDialogScreenController()->close();
1149 : particleSystemEditorTabController(particleSystemEditorTabController), particleSystemIdx(particleSystemIdx) {
1155 int particleSystemIdx;
1160 ops->getModelFileName().empty() ==
false?Tools::getPathName(ops->getModelFileName()):
string(),
1161 "Load object particle system model from: ",
1162 ModelReader::getModelExtensions(),
1165 new OnObjectParticleSystemLoadModel(
this, particleSystemIdx)
1170 if (node->
getId() ==
"particletype_object_remove") {
1172 if (StringTools::startsWith(outlinerNode,
"particlesystems.") ==
true) {
1173 auto particleSystemIdx = Integer::parse(StringTools::substring(outlinerNode,
string(
"particlesystems.").size(), outlinerNode.size()));
1174 auto particleSystem = prototype->getParticleSystemAt(particleSystemIdx);
1175 auto ops = particleSystem !=
nullptr?particleSystem->getObjectParticleSystem():
nullptr;
1176 if (ops ==
nullptr)
return;
1179 ops->setModelFile(
string());
1180 required_dynamic_cast<GUIImageNode*>(
screenNode->
getNodeById(
"particletype_object"))->setSource(ops->getModelFileName());
1181 required_dynamic_cast<GUIImageNode*>(
screenNode->
getNodeById(
"particletype_object"))->setTooltip(ops->getModelFileName());
1183 Console::println(
"ParticleSystemEditorTabController::onAction(): An error occurred: " +
string(exception.what()));
1189 if (node->
getId() ==
"particletype_object_browseto") {
1191 if (StringTools::startsWith(outlinerNode,
"particlesystems.") ==
true) {
1192 auto particleSystemIdx = Integer::parse(StringTools::substring(outlinerNode,
string(
"particlesystems.").size(), outlinerNode.size()));
1193 auto particleSystem = prototype->getParticleSystemAt(particleSystemIdx);
1194 auto ops = particleSystem !=
nullptr?particleSystem->getObjectParticleSystem():
nullptr;
1195 if (ops !=
nullptr && ops->getModelFileName().empty() ==
false) {
1208 xml+=
"<selectbox-parent-option image=\"resources/engine/images/folder.png\" text=\"" + GUIParser::escape(
"Prototype") +
"\" value=\"" + GUIParser::escape(
"prototype") +
"\">\n";
1210 if (prototype !=
nullptr) {
1216 if (prototype->getParticleSystemsCount() == 0) {
1217 xml+=
"<selectbox-option image=\"resources/engine/images/folder.png\" text=\"" + GUIParser::escape(
"Particle Systems") +
"\" value=\"" + GUIParser::escape(
"particlesystems") +
"\" />\n";
1219 xml+=
"<selectbox-parent-option image=\"resources/engine/images/folder.png\" text=\"" + GUIParser::escape(
"Particle Systems") +
"\" value=\"" + GUIParser::escape(
"particlesystems") +
"\">\n";
1221 for (
auto particleSystem: prototype->getParticleSystems()) {
1222 xml+=
" <selectbox-option image=\"resources/engine/images/particle.png\" text=\"" + GUIParser::escape(
"Particle System " + to_string(i)) +
"\" id=\"" + GUIParser::escape(
"particlesystems." + to_string(i)) +
"\" value=\"" + GUIParser::escape(
"particlesystems." + to_string(i)) +
"\" />\n";
1225 xml+=
"</selectbox-parent-option>\n";
1228 xml+=
"</selectbox-parent-option>\n";
1234 string(
"<dropdown-option text=\"Property\" value=\"property\" />\n") +
1235 string(
"<dropdown-option text=\"BV\" value=\"boundingvolume\" />\n") +
1236 string(
"<dropdown-option text=\"PS\" value=\"particlesystem\" />\n") +
1237 string(
"<dropdown-option text=\"Sound\" value=\"sound\" />\n")
1243 if (prototype ==
nullptr)
return;
1245 if (particleSystem ==
nullptr)
return;
1248 string(
"<template id=\"details_particletype\" src=\"resources/engine/gui/template_details_particletype.xml\" />\n") +
1249 string(
"<template id=\"details_particleemitter\" src=\"resources/engine/gui/template_details_particleemitter.xml\" />\n")
1255 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"details_particletype"))->getActiveConditions().add(
"open");
1258 if (particleSystem->getType() == PrototypeParticleSystem_Type::NONE) {
1260 if (particleSystem->getType() == PrototypeParticleSystem_Type::OBJECT_PARTICLE_SYSTEM) {
1261 auto ops = particleSystem->getObjectParticleSystem();
1263 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particletype_type_details"))->getActiveConditions().set(
"object");
1264 required_dynamic_cast<GUIImageNode*>(
screenNode->
getNodeById(
"particletype_object"))->setSource(ops->getModelFileName());
1265 required_dynamic_cast<GUIImageNode*>(
screenNode->
getNodeById(
"particletype_object"))->setTooltip(ops->getModelFileName());
1266 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particletype_object_scale"))->getController()->setValue(
MutableString(Math::max(ops->getScale().getX(), Math::max(ops->getScale().getY(), ops->getScale().getZ()))));
1268 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particletype_object_autoemit"))->getController()->setValue(
MutableString(ops->isAutoEmit() ==
true?
"1":
""));
1270 if (particleSystem->getType() == PrototypeParticleSystem_Type::POINT_PARTICLE_SYSTEM) {
1271 auto pps = particleSystem->getPointParticleSystem();
1273 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particletype_type_details"))->getActiveConditions().set(
"point");
1274 required_dynamic_cast<GUIImageNode*>(
screenNode->
getNodeById(
"particletype_point_texture"))->setSource(pps->getTextureFileName());
1275 required_dynamic_cast<GUIImageNode*>(
screenNode->
getNodeById(
"particletype_point_texture"))->setTooltip(pps->getTextureFileName());
1276 required_dynamic_cast<GUIImageNode*>(
screenNode->
getNodeById(
"particletype_point_transparency"))->setSource(pps->getTransparencyTextureFileName());
1277 required_dynamic_cast<GUIImageNode*>(
screenNode->
getNodeById(
"particletype_point_transparency"))->setTooltip(pps->getTransparencyTextureFileName());
1280 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particletype_point_horizontal_sprites"))->getController()->setValue(
MutableString(pps->getTextureHorizontalSprites()));
1281 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particletype_point_vertical_sprites"))->getController()->setValue(
MutableString(pps->getTextureVerticalSprites()));
1283 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particletype_point_autoemit"))->getController()->setValue(
MutableString(pps->isAutoEmit() ==
true?
"1":
""));
1285 if (particleSystem->getType() == PrototypeParticleSystem_Type::FOG_PARTICLE_SYSTEM) {
1286 auto fps = particleSystem->getFogParticleSystem();
1288 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particletype_type_details"))->getActiveConditions().set(
"fog");
1289 required_dynamic_cast<GUIImageNode*>(
screenNode->
getNodeById(
"particletype_fog_texture"))->setSource(fps->getTextureFileName());
1290 required_dynamic_cast<GUIImageNode*>(
screenNode->
getNodeById(
"particletype_fog_texture"))->setTooltip(fps->getTextureFileName());
1291 required_dynamic_cast<GUIImageNode*>(
screenNode->
getNodeById(
"particletype_fog_transparency"))->setSource(fps->getTransparencyTextureFileName());
1292 required_dynamic_cast<GUIImageNode*>(
screenNode->
getNodeById(
"particletype_fog_transparency"))->setTooltip(fps->getTransparencyTextureFileName());
1295 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particletype_fog_horizontal_sprites"))->getController()->setValue(
MutableString(fps->getTextureHorizontalSprites()));
1296 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particletype_fog_vertical_sprites"))->getController()->setValue(
MutableString(fps->getTextureVerticalSprites()));
1299 Console::println(
"ParticleSystemEditorTabController::setParticleSystemDetails(): Unknown particle system type");
1303 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"details_particleemitter"))->getActiveConditions().add(
"open");
1306 if (particleSystem->getEmitter() == PrototypeParticleSystem_Emitter::POINT_PARTICLE_EMITTER) {
1307 auto ppse = particleSystem->getPointParticleEmitter();
1309 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_type_details"))->getActiveConditions().set(
"point");
1310 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_point_location_x"))->getController()->setValue(
MutableString(ppse->getPosition().getX()));
1311 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_point_location_y"))->getController()->setValue(
MutableString(ppse->getPosition().getY()));
1312 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_point_location_z"))->getController()->setValue(
MutableString(ppse->getPosition().getZ()));
1313 required_dynamic_cast<GUIImageNode*>(
screenNode->
getNodeById(
"particleemitter_point_colorstart"))->setEffectColorMul(ppse->getColorStart());
1314 required_dynamic_cast<GUIImageNode*>(
screenNode->
getNodeById(
"particleemitter_point_colorend"))->setEffectColorMul(ppse->getColorEnd());
1316 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_point_lifetime_min"))->getController()->setValue(
MutableString(
static_cast<int32_t
>(ppse->getLifeTime())));
1317 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_point_lifetime_max"))->getController()->setValue(
MutableString(
static_cast<int32_t
>(ppse->getLifeTime() + ppse->getLifeTimeRnd())));
1318 auto velocityMax = ppse->getVelocity().clone().add(ppse->getVelocityRnd());
1319 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_point_velocity_min_x"))->getController()->setValue(
MutableString(ppse->getVelocity().getX()));
1320 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_point_velocity_min_y"))->getController()->setValue(
MutableString(ppse->getVelocity().getY()));
1321 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_point_velocity_min_z"))->getController()->setValue(
MutableString(ppse->getVelocity().getZ()));
1322 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_point_velocity_max_x"))->getController()->setValue(
MutableString(velocityMax.getX()));
1323 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_point_velocity_max_y"))->getController()->setValue(
MutableString(velocityMax.getY()));
1324 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_point_velocity_max_z"))->getController()->setValue(
MutableString(velocityMax.getZ()));
1325 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_point_mass_min"))->getController()->setValue(
MutableString(
static_cast<int32_t
>(ppse->getMass())));
1326 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_point_mass_max"))->getController()->setValue(
MutableString(
static_cast<int32_t
>(ppse->getMass() + ppse->getMassRnd())));
1328 if (particleSystem->getEmitter() == PrototypeParticleSystem_Emitter::BOUNDINGBOX_PARTICLE_EMITTER) {
1329 auto bbpe = particleSystem->getBoundingBoxParticleEmitters();
1333 rotationMatrix.
setAxes(bbpe->getObbAxis0(), bbpe->getObbAxis1(), bbpe->getObbAxis2());
1337 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_type_details"))->getActiveConditions().
set(
"box");
1338 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_box_location_x"))->getController()->setValue(
MutableString(bbpe->getObbCenter().getX()));
1339 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_box_location_y"))->getController()->setValue(
MutableString(bbpe->getObbCenter().getY()));
1340 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_box_location_z"))->getController()->setValue(
MutableString(bbpe->getObbCenter().getZ()));
1344 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_box_halfsize_x"))->getController()->setValue(
MutableString(bbpe->getObbHalfextension().getX()));
1345 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_box_halfsize_y"))->getController()->setValue(
MutableString(bbpe->getObbHalfextension().getY()));
1346 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_box_halfsize_z"))->getController()->setValue(
MutableString(bbpe->getObbHalfextension().getZ()));
1347 required_dynamic_cast<GUIImageNode*>(
screenNode->
getNodeById(
"particleemitter_box_colorstart"))->setEffectColorMul(bbpe->getColorStart());
1348 required_dynamic_cast<GUIImageNode*>(
screenNode->
getNodeById(
"particleemitter_box_colorend"))->setEffectColorMul(bbpe->getColorEnd());
1350 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_box_lifetime_min"))->getController()->setValue(
MutableString(
static_cast<int32_t
>(bbpe->getLifeTime())));
1351 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_box_lifetime_max"))->getController()->setValue(
MutableString(
static_cast<int32_t
>(bbpe->getLifeTime() + bbpe->getLifeTimeRnd())));
1352 auto velocityMax = bbpe->getVelocity().
clone().
add(bbpe->getVelocityRnd());
1353 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_box_velocity_min_x"))->getController()->setValue(
MutableString(bbpe->getVelocity().getX()));
1354 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_box_velocity_min_y"))->getController()->setValue(
MutableString(bbpe->getVelocity().getY()));
1355 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_box_velocity_min_z"))->getController()->setValue(
MutableString(bbpe->getVelocity().getZ()));
1359 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_box_mass_min"))->getController()->setValue(
MutableString(
static_cast<int32_t
>(bbpe->getMass())));
1360 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_box_mass_max"))->getController()->setValue(
MutableString(
static_cast<int32_t
>(bbpe->getMass() + bbpe->getMassRnd())));
1362 if (particleSystem->getEmitter() == PrototypeParticleSystem_Emitter::CIRCLE_PARTICLE_EMITTER) {
1363 auto cpse = particleSystem->getCircleParticleEmitter();
1367 rotationMatrix.
setAxes(cpse->getAxis0(), Vector3::computeCrossProduct(cpse->getAxis0(), cpse->getAxis1()), cpse->getAxis1());
1371 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_type_details"))->getActiveConditions().
set(
"circle");
1372 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_circle_location_x"))->getController()->setValue(
MutableString(cpse->getCenter().getX()));
1373 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_circle_location_y"))->getController()->setValue(
MutableString(cpse->getCenter().getY()));
1374 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_circle_location_z"))->getController()->setValue(
MutableString(cpse->getCenter().getZ()));
1379 required_dynamic_cast<GUIImageNode*>(
screenNode->
getNodeById(
"particleemitter_circle_colorstart"))->setEffectColorMul(cpse->getColorStart());
1380 required_dynamic_cast<GUIImageNode*>(
screenNode->
getNodeById(
"particleemitter_circle_colorend"))->setEffectColorMul(cpse->getColorEnd());
1382 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_circle_lifetime_min"))->getController()->setValue(
MutableString(
static_cast<int32_t
>(cpse->getLifeTime())));
1383 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_circle_lifetime_max"))->getController()->setValue(
MutableString(
static_cast<int32_t
>(cpse->getLifeTime() + cpse->getLifeTimeRnd())));
1384 auto velocityMax = cpse->getVelocity().
clone().
add(cpse->getVelocityRnd());
1385 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_circle_velocity_min_x"))->getController()->setValue(
MutableString(cpse->getVelocity().getX()));
1386 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_circle_velocity_min_y"))->getController()->setValue(
MutableString(cpse->getVelocity().getY()));
1387 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_circle_velocity_min_z"))->getController()->setValue(
MutableString(cpse->getVelocity().getZ()));
1388 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_circle_velocity_max_x"))->getController()->setValue(
MutableString(velocityMax.getX()));
1389 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_circle_velocity_max_y"))->getController()->setValue(
MutableString(velocityMax.getY()));
1390 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_circle_velocity_max_z"))->getController()->setValue(
MutableString(velocityMax.getZ()));
1391 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_circle_mass_min"))->getController()->setValue(
MutableString(
static_cast<int32_t
>(cpse->getMass())));
1392 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_circle_mass_max"))->getController()->setValue(
MutableString(
static_cast<int32_t
>(cpse->getMass() + cpse->getMassRnd())));
1394 if (particleSystem->getEmitter() == PrototypeParticleSystem_Emitter::CIRCLE_PARTICLE_EMITTER_PLANE_VELOCITY) {
1395 auto rpse = particleSystem->getCircleParticleEmitterPlaneVelocity();
1399 rotationMatrix.
setAxes(rpse->getAxis0(), Vector3::computeCrossProduct(rpse->getAxis0(), rpse->getAxis1()), rpse->getAxis1());
1403 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_type_details"))->getActiveConditions().
set(
"radial");
1404 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_radial_location_x"))->getController()->setValue(
MutableString(rpse->getCenter().getX()));
1405 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_radial_location_y"))->getController()->setValue(
MutableString(rpse->getCenter().getY()));
1406 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_radial_location_z"))->getController()->setValue(
MutableString(rpse->getCenter().getZ()));
1411 required_dynamic_cast<GUIImageNode*>(
screenNode->
getNodeById(
"particleemitter_radial_colorstart"))->setEffectColorMul(rpse->getColorStart());
1412 required_dynamic_cast<GUIImageNode*>(
screenNode->
getNodeById(
"particleemitter_radial_colorend"))->setEffectColorMul(rpse->getColorEnd());
1414 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_radial_lifetime_min"))->getController()->setValue(
MutableString(
static_cast<int32_t
>(rpse->getLifeTime())));
1415 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_radial_lifetime_max"))->getController()->setValue(
MutableString(
static_cast<int32_t
>(rpse->getLifeTime() + rpse->getLifeTimeRnd())));
1416 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_radial_velocity_min"))->getController()->setValue(
MutableString(rpse->getVelocity()));
1417 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_radial_velocity_max"))->getController()->setValue(
MutableString(rpse->getVelocity() + rpse->getVelocityRnd()));
1418 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_radial_mass_min"))->getController()->setValue(
MutableString(
static_cast<int32_t
>(rpse->getMass())));
1419 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_radial_mass_max"))->getController()->setValue(
MutableString(
static_cast<int32_t
>(rpse->getMass() + rpse->getMassRnd())));
1421 if (particleSystem->getEmitter() == PrototypeParticleSystem_Emitter::SPHERE_PARTICLE_EMITTER) {
1422 auto spse = particleSystem->getSphereParticleEmitter();
1424 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_type_details"))->getActiveConditions().
set(
"sphere");
1425 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_sphere_location_x"))->getController()->setValue(
MutableString(spse->getCenter().getX()));
1426 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_sphere_location_y"))->getController()->setValue(
MutableString(spse->getCenter().getY()));
1427 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_sphere_location_z"))->getController()->setValue(
MutableString(spse->getCenter().getZ()));
1429 required_dynamic_cast<GUIImageNode*>(
screenNode->
getNodeById(
"particleemitter_sphere_colorstart"))->setEffectColorMul(spse->getColorStart());
1430 required_dynamic_cast<GUIImageNode*>(
screenNode->
getNodeById(
"particleemitter_sphere_colorend"))->setEffectColorMul(spse->getColorEnd());
1432 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_sphere_lifetime_min"))->getController()->setValue(
MutableString(
static_cast<int32_t
>(spse->getLifeTime())));
1433 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_sphere_lifetime_max"))->getController()->setValue(
MutableString(
static_cast<int32_t
>(spse->getLifeTime() + spse->getLifeTimeRnd())));
1434 auto velocityMax = spse->getVelocity().
clone().
add(spse->getVelocityRnd());
1435 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_sphere_velocity_min_x"))->getController()->setValue(
MutableString(spse->getVelocity().getX()));
1436 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_sphere_velocity_min_y"))->getController()->setValue(
MutableString(spse->getVelocity().getY()));
1437 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_sphere_velocity_min_z"))->getController()->setValue(
MutableString(spse->getVelocity().getZ()));
1438 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_sphere_velocity_max_x"))->getController()->setValue(
MutableString(velocityMax.getX()));
1439 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_sphere_velocity_max_y"))->getController()->setValue(
MutableString(velocityMax.getY()));
1440 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_sphere_velocity_max_z"))->getController()->setValue(
MutableString(velocityMax.getZ()));
1441 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_sphere_mass_min"))->getController()->setValue(
MutableString(
static_cast<int32_t
>(spse->getMass())));
1442 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_sphere_mass_max"))->getController()->setValue(
MutableString(
static_cast<int32_t
>(spse->getMass() + spse->getMassRnd())));
1444 Console::println(
"ParticleSystemEditorTabController::applyParticleSystemDetails(): unknown emitter");
1447 Console::println(
"ParticleSystemEditorTabController::setParticleSystemDetails(): An error occurred: " +
string(exception.what()));
1453 Console::println(
"ParticleSystemEditorTabController::applyParticleSystemDetails(): xxx");
1455 if (prototype ==
nullptr)
return;
1457 if (particleSystem ==
nullptr)
return;
1462 auto newParticleSystemTypeId = Integer::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particletype_type"))->getController()->getValue().getString());
1463 auto newParticleSystemType = PrototypeParticleSystem_Type::NONE;
1464 switch (newParticleSystemTypeId) {
1465 case 1: newParticleSystemType = PrototypeParticleSystem_Type::OBJECT_PARTICLE_SYSTEM;
break;
1466 case 2: newParticleSystemType = PrototypeParticleSystem_Type::POINT_PARTICLE_SYSTEM;
break;
1467 case 3: newParticleSystemType = PrototypeParticleSystem_Type::FOG_PARTICLE_SYSTEM;
break;
1469 Console::println(
"ParticleSystemEditorTabController::applyParticleSystemDetails: unknown particle system type");
1474 if (particleSystem->getType() != newParticleSystemType) {
1476 particleSystem->setType(newParticleSystemType);
1485 if (particleSystem->getType() == PrototypeParticleSystem_Type::OBJECT_PARTICLE_SYSTEM) {
1486 auto ops = particleSystem->getObjectParticleSystem();
1487 auto scale = Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particletype_object_scale"))->getController()->getValue().getString());
1488 ops->setScale(
Vector3(scale, scale, scale));
1489 ops->setMaxCount(Integer::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particletype_object_maxcount"))->getController()->getValue().getString()));
1490 ops->setAutoEmit(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particletype_object_autoemit"))->getController()->getValue().getString() ==
"1");
1492 if (particleSystem->getType() == PrototypeParticleSystem_Type::POINT_PARTICLE_SYSTEM) {
1493 auto pps = particleSystem->getPointParticleSystem();
1494 pps->setPointSize(Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particletype_point_size"))->getController()->getValue().getString()));
1495 pps->setMaxPoints(Integer::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particletype_point_maxcount"))->getController()->getValue().getString()));
1496 pps->setTextureHorizontalSprites(Math::max(1, Integer::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particletype_point_horizontal_sprites"))->getController()->getValue().getString())));
1497 pps->setTextureVerticalSprites(Math::max(1, Integer::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particletype_point_vertical_sprites"))->getController()->getValue().getString())));
1498 pps->setTextureSpritesFPS(Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particletype_point_fps"))->getController()->getValue().getString()));
1499 pps->setAutoEmit(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particletype_point_autoemit"))->getController()->getValue().getString() ==
"1");
1501 if (particleSystem->getType() == PrototypeParticleSystem_Type::FOG_PARTICLE_SYSTEM) {
1502 auto fps = particleSystem->getFogParticleSystem();
1503 fps->setPointSize(Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particletype_fog_size"))->getController()->getValue().getString()));
1504 fps->setMaxPoints(Integer::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particletype_fog_maxcount"))->getController()->getValue().getString()));
1505 fps->setTextureHorizontalSprites(Math::max(1, Integer::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particletype_fog_horizontal_sprites"))->getController()->getValue().getString())));
1506 fps->setTextureVerticalSprites(Math::max(1, Integer::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particletype_fog_vertical_sprites"))->getController()->getValue().getString())));
1507 fps->setTextureSpritesFPS(Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particletype_fog_fps"))->getController()->getValue().getString()));
1511 auto newEmitterTypeId = Integer::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_type"))->getController()->getValue().getString());
1512 auto newEmitterType = PrototypeParticleSystem_Emitter::NONE;
1513 switch (newEmitterTypeId) {
1514 case 1: newEmitterType = PrototypeParticleSystem_Emitter::POINT_PARTICLE_EMITTER;
break;
1515 case 2: newEmitterType = PrototypeParticleSystem_Emitter::BOUNDINGBOX_PARTICLE_EMITTER;
break;
1516 case 3: newEmitterType = PrototypeParticleSystem_Emitter::CIRCLE_PARTICLE_EMITTER;
break;
1517 case 4: newEmitterType = PrototypeParticleSystem_Emitter::CIRCLE_PARTICLE_EMITTER_PLANE_VELOCITY;
break;
1518 case 5: newEmitterType = PrototypeParticleSystem_Emitter::SPHERE_PARTICLE_EMITTER;
break;
1520 Console::println(
"ParticleSystemEditorTabController::applyParticleSystemDetails: unknown emitter");
1525 if (particleSystem->getEmitter() != newEmitterType) {
1527 particleSystem->setEmitter(newEmitterType);
1536 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"details_particletype"))->getActiveConditions().add(
"open");
1539 if (particleSystem->getEmitter() == PrototypeParticleSystem_Emitter::POINT_PARTICLE_EMITTER) {
1540 auto ppse = particleSystem->getPointParticleEmitter();
1543 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_point_location_x"))->getController()->getValue().getString()),
1544 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_point_location_y"))->getController()->getValue().getString()),
1545 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_point_location_z"))->getController()->getValue().getString())
1548 ppse->setCount(Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_point_count"))->getController()->getValue().getString()));
1549 ppse->setLifeTime(Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_point_lifetime_min"))->getController()->getValue().getString()));
1550 ppse->setLifeTimeRnd(
1551 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_point_lifetime_max"))->getController()->getValue().getString()) -
1552 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_point_lifetime_min"))->getController()->getValue().getString())
1554 ppse->setMass(Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_point_mass_min"))->getController()->getValue().getString()));
1556 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_point_mass_max"))->getController()->getValue().getString()) -
1557 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_point_mass_min"))->getController()->getValue().getString())
1561 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_point_velocity_min_x"))->getController()->getValue().getString()),
1562 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_point_velocity_min_y"))->getController()->getValue().getString()),
1563 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_point_velocity_min_z"))->getController()->getValue().getString())
1567 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_point_velocity_max_x"))->getController()->getValue().getString()),
1568 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_point_velocity_max_y"))->getController()->getValue().getString()),
1569 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_point_velocity_max_z"))->getController()->getValue().getString())
1571 ppse->setVelocity(velocityMin);
1572 ppse->setVelocityRnd(velocityMax.clone().sub(velocityMin));
1574 if (particleSystem->getEmitter() == PrototypeParticleSystem_Emitter::BOUNDINGBOX_PARTICLE_EMITTER) {
1575 auto bbpe = particleSystem->getBoundingBoxParticleEmitters();
1578 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_box_location_x"))->getController()->getValue().getString()),
1579 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_box_location_y"))->getController()->getValue().getString()),
1580 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_box_location_z"))->getController()->getValue().getString())
1584 transform.
addRotation(OrientedBoundingBox::AABB_AXIS_Z, Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_box_rotation_z"))->getController()->getValue().getString()));
1585 transform.
addRotation(OrientedBoundingBox::AABB_AXIS_Y, Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_box_rotation_y"))->getController()->getValue().getString()));
1586 transform.
addRotation(OrientedBoundingBox::AABB_AXIS_X, Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_box_rotation_x"))->getController()->getValue().getString()));
1592 bbpe->setObbAxis0(obbAxis0);
1593 bbpe->setObbAxis1(obbAxis1);
1594 bbpe->setObbAxis2(obbAxis2);
1595 bbpe->setObbHalfextension(
1597 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_box_halfsize_x"))->getController()->getValue().getString()),
1598 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_box_halfsize_y"))->getController()->getValue().getString()),
1599 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_box_halfsize_z"))->getController()->getValue().getString())
1602 bbpe->setCount(Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_box_count"))->getController()->getValue().getString()));
1603 bbpe->setLifeTime(Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_box_lifetime_min"))->getController()->getValue().getString()));
1604 bbpe->setLifeTimeRnd(
1605 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_box_lifetime_max"))->getController()->getValue().getString()) -
1606 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_box_lifetime_min"))->getController()->getValue().getString())
1608 bbpe->setMass(Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_box_mass_min"))->getController()->getValue().getString()));
1610 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_box_mass_max"))->getController()->getValue().getString()) -
1611 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_box_mass_min"))->getController()->getValue().getString())
1615 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_box_velocity_min_x"))->getController()->getValue().getString()),
1616 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_box_velocity_min_y"))->getController()->getValue().getString()),
1617 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_box_velocity_min_z"))->getController()->getValue().getString())
1621 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_box_velocity_max_x"))->getController()->getValue().getString()),
1622 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_box_velocity_max_y"))->getController()->getValue().getString()),
1623 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_box_velocity_max_z"))->getController()->getValue().getString())
1625 bbpe->setVelocity(velocityMin);
1626 bbpe->setVelocityRnd(velocityMax.clone().sub(velocityMin));
1628 if (particleSystem->getEmitter() == PrototypeParticleSystem_Emitter::CIRCLE_PARTICLE_EMITTER) {
1629 auto cpse = particleSystem->getCircleParticleEmitter();
1632 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_circle_location_x"))->getController()->getValue().getString()),
1633 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_circle_location_y"))->getController()->getValue().getString()),
1634 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_circle_location_z"))->getController()->getValue().getString())
1639 transform.
addRotation(OrientedBoundingBox::AABB_AXIS_Z, Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_circle_rotation_z"))->getController()->getValue().getString()));
1640 transform.
addRotation(OrientedBoundingBox::AABB_AXIS_Y, Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_circle_rotation_y"))->getController()->getValue().getString()));
1641 transform.
addRotation(OrientedBoundingBox::AABB_AXIS_X, Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_circle_rotation_x"))->getController()->getValue().getString()));
1647 cpse->setAxis0(axis0);
1648 cpse->setAxis1(axis1);
1650 cpse->setRadius(Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_circle_radius"))->getController()->getValue().getString()));
1651 cpse->setCount(Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_circle_count"))->getController()->getValue().getString()));
1652 cpse->setLifeTime(Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_circle_lifetime_min"))->getController()->getValue().getString()));
1653 cpse->setLifeTimeRnd(
1654 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_circle_lifetime_max"))->getController()->getValue().getString()) -
1655 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_circle_lifetime_min"))->getController()->getValue().getString())
1657 cpse->setMass(Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_circle_mass_min"))->getController()->getValue().getString()));
1659 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_circle_mass_max"))->getController()->getValue().getString()) -
1660 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_circle_mass_min"))->getController()->getValue().getString())
1664 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_circle_velocity_min_x"))->getController()->getValue().getString()),
1665 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_circle_velocity_min_y"))->getController()->getValue().getString()),
1666 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_circle_velocity_min_z"))->getController()->getValue().getString())
1670 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_circle_velocity_max_x"))->getController()->getValue().getString()),
1671 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_circle_velocity_max_y"))->getController()->getValue().getString()),
1672 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_circle_velocity_max_z"))->getController()->getValue().getString())
1674 cpse->setVelocity(velocityMin);
1675 cpse->setVelocityRnd(velocityMax.clone().sub(velocityMin));
1677 if (particleSystem->getEmitter() == PrototypeParticleSystem_Emitter::CIRCLE_PARTICLE_EMITTER_PLANE_VELOCITY) {
1678 auto cpse = particleSystem->getCircleParticleEmitterPlaneVelocity();
1681 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_radial_location_x"))->getController()->getValue().getString()),
1682 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_radial_location_y"))->getController()->getValue().getString()),
1683 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_radial_location_z"))->getController()->getValue().getString())
1688 transform.
addRotation(OrientedBoundingBox::AABB_AXIS_Z, Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_radial_rotation_z"))->getController()->getValue().getString()));
1689 transform.
addRotation(OrientedBoundingBox::AABB_AXIS_Y, Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_radial_rotation_y"))->getController()->getValue().getString()));
1690 transform.
addRotation(OrientedBoundingBox::AABB_AXIS_X, Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_radial_rotation_x"))->getController()->getValue().getString()));
1696 cpse->setAxis0(axis0);
1697 cpse->setAxis1(axis1);
1699 cpse->setRadius(Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_radial_radius"))->getController()->getValue().getString()));
1700 cpse->setCount(Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_radial_count"))->getController()->getValue().getString()));
1701 cpse->setLifeTime(Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_radial_lifetime_min"))->getController()->getValue().getString()));
1702 cpse->setLifeTimeRnd(
1703 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_radial_lifetime_max"))->getController()->getValue().getString()) -
1704 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_radial_lifetime_min"))->getController()->getValue().getString())
1706 cpse->setMass(Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_radial_mass_min"))->getController()->getValue().getString()));
1708 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_radial_mass_max"))->getController()->getValue().getString()) -
1709 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_radial_mass_min"))->getController()->getValue().getString())
1711 cpse->setVelocity(Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_radial_velocity_min"))->getController()->getValue().getString()));
1712 cpse->setVelocityRnd(
1713 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_radial_velocity_max"))->getController()->getValue().getString()) -
1714 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_radial_velocity_min"))->getController()->getValue().getString())
1717 if (particleSystem->getEmitter() == PrototypeParticleSystem_Emitter::SPHERE_PARTICLE_EMITTER) {
1718 auto spse = particleSystem->getSphereParticleEmitter();
1721 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_sphere_location_x"))->getController()->getValue().getString()),
1722 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_sphere_location_y"))->getController()->getValue().getString()),
1723 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_sphere_location_z"))->getController()->getValue().getString())
1726 spse->setRadius(Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_sphere_radius"))->getController()->getValue().getString()));
1727 spse->setCount(Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_sphere_count"))->getController()->getValue().getString()));
1728 spse->setLifeTime(Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_sphere_lifetime_min"))->getController()->getValue().getString()));
1729 spse->setLifeTimeRnd(
1730 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_sphere_lifetime_max"))->getController()->getValue().getString()) -
1731 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_sphere_lifetime_min"))->getController()->getValue().getString())
1733 spse->setMass(Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_sphere_mass_min"))->getController()->getValue().getString()));
1735 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_sphere_mass_max"))->getController()->getValue().getString()) -
1736 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_sphere_mass_min"))->getController()->getValue().getString())
1740 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_sphere_velocity_min_x"))->getController()->getValue().getString()),
1741 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_sphere_velocity_min_y"))->getController()->getValue().getString()),
1742 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_sphere_velocity_min_z"))->getController()->getValue().getString())
1746 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_sphere_velocity_max_x"))->getController()->getValue().getString()),
1747 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_sphere_velocity_max_y"))->getController()->getValue().getString()),
1748 Float::parse(required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_sphere_velocity_max_z"))->getController()->getValue().getString())
1750 spse->setVelocity(velocityMin);
1751 spse->setVelocityRnd(velocityMax.clone().sub(velocityMin));
1753 Console::println(
"ParticleSystemEditorTabController::applyParticleSystemDetails(): unknown emitter");
1756 Console::println(
"ParticleSystemEditorTabController::applyParticleSystemDetails(): An error occurred: " +
string(exception.what()));
1765 if (StringTools::startsWith(outlinerNode,
"particlesystems.") ==
true) {
1766 auto particleSystemIdx = Integer::parse(StringTools::substring(outlinerNode,
string(
"particlesystems.").size(), outlinerNode.size()));
1780 Console::println(
"ParticleSystemEditorTabController::updatePointParticleSystemEmitter(): An error occurred: " +
string(exception.what()));
1790 rotationMatrix.
setAxes(axis0, axis1, axis2);
1794 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_type_details"))->getActiveConditions().
set(
"box");
1805 Console::println(
"ParticleSystemEditorTabController::updateBoundingBoxParticleSystemEmitter(): An error occurred: " +
string(exception.what()));
1815 rotationMatrix.
setAxes(axis0, Vector3::computeCrossProduct(axis0, axis1), axis1);
1819 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_type_details"))->getActiveConditions().
set(
"circle");
1828 Console::println(
"ParticleSystemEditorTabController::updateCircleParticleSystemEmitter(): An error occurred: " +
string(exception.what()));
1838 rotationMatrix.
setAxes(axis0, Vector3::computeCrossProduct(axis0, axis1), axis1);
1842 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_type_details"))->getActiveConditions().
set(
"radial");
1851 Console::println(
"ParticleSystemEditorTabController::updateRadialParticleSystemEmitter(): An error occurred: " +
string(exception.what()));
1860 required_dynamic_cast<GUIElementNode*>(
screenNode->
getNodeById(
"particleemitter_type_details"))->getActiveConditions().set(
"sphere");
1866 Console::println(
"ParticleSystemEditorTabController::updateSphereParticleSystemEmitter(): An error occurred: " +
string(exception.what()));
1875 if (pps ==
nullptr)
return;
1878 pps->setTextureFileName(
1880 pps->getTransparencyTextureFileName()
1883 Console::println(
"ParticleSystemEditorTabController::setPointParticleSystemTexture(): An error occurred: " +
string(exception.what()));
1887 required_dynamic_cast<GUIImageNode*>(
screenNode->
getNodeById(
"particletype_point_texture"))->setSource(pps->getTextureFileName());
1888 required_dynamic_cast<GUIImageNode*>(
screenNode->
getNodeById(
"particletype_point_texture"))->setTooltip(pps->getTextureFileName());
1890 Console::println(
"ParticleSystemEditorTabController::setPointParticleSystemTexture(): An error occurred: " +
string(exception.what()));
1900 if (pps ==
nullptr)
return;
1903 pps->setTextureFileName(
1904 pps->getTextureFileName(),
1908 Console::println(
"ParticleSystemEditorTabController::setPointParticleSystemTransparencyTexture(): An error occurred: " +
string(exception.what()));
1912 required_dynamic_cast<GUIImageNode*>(
screenNode->
getNodeById(
"particletype_point_transparency"))->setSource(pps->getTransparencyTextureFileName());
1913 required_dynamic_cast<GUIImageNode*>(
screenNode->
getNodeById(
"particletype_point_transparency"))->setTooltip(pps->getTransparencyTextureFileName());
1915 Console::println(
"ParticleSystemEditorTabController::setPointParticleSystemTransparencyTexture(): An error occurred: " +
string(exception.what()));
1925 if (fps ==
nullptr)
return;
1928 fps->setTextureFileName(
1930 fps->getTransparencyTextureFileName()
1933 Console::println(
"ParticleSystemEditorTabController::setFogParticleSystemTexture(): An error occurred: " +
string(exception.what()));
1937 required_dynamic_cast<GUIImageNode*>(
screenNode->
getNodeById(
"particletype_fog_texture"))->setSource(fps->getTextureFileName());
1938 required_dynamic_cast<GUIImageNode*>(
screenNode->
getNodeById(
"particletype_fog_texture"))->setTooltip(fps->getTextureFileName());
1940 Console::println(
"ParticleSystemEditorTabController::setFogParticleSystemTexture(): An error occurred: " +
string(exception.what()));
1950 if (fps ==
nullptr)
return;
1953 fps->setTextureFileName(
1954 fps->getTextureFileName(),
1958 Console::println(
"ParticleSystemEditorTabController::setFogParticleSystemTransparencyTexture(): An error occurred: " +
string(exception.what()));
1962 required_dynamic_cast<GUIImageNode*>(
screenNode->
getNodeById(
"particletype_fog_transparency"))->setSource(fps->getTransparencyTextureFileName());
1963 required_dynamic_cast<GUIImageNode*>(
screenNode->
getNodeById(
"particletype_fog_transparency"))->setTooltip(fps->getTransparencyTextureFileName());
1965 Console::println(
"ParticleSystemEditorTabController::setFogParticleSystemTransparencyTexture(): An error occurred: " +
string(exception.what()));
1975 if (ops ==
nullptr)
return;
1978 ops->setModelFile(fileName);
1980 Console::println(
"ParticleSystemEditorTabController::setObjectParticleSystemModel(): An error occurred: " +
string(exception.what()));
1984 required_dynamic_cast<GUIImageNode*>(
screenNode->
getNodeById(
"particletype_object"))->setSource(ops->getModelFileName());
1985 required_dynamic_cast<GUIImageNode*>(
screenNode->
getNodeById(
"particletype_object"))->setTooltip(ops->getModelFileName());
1987 Console::println(
"ParticleSystemEditorTabController::setObjectParticleSystemModel(): An error occurred: " +
string(exception.what()));
Color 4 definition class.
Oriented bounding box physics primitive.
Prototype bounding box particle emitter definition.
Prototype circle particle emitter plane velocity definition.
Prototype circle particle emitter definition.
Prototype particle system emitter type enum.
Prototype point particle system definition.
Prototype object particle system definition.
Prototype point particle emitter definition.
Prototype point particle system definition.
Prototype sphere particle emitter definition.
Prototype particle system type enum.
Prototype particle system definition.
PrototypeParticleSystem_PointParticleSystem * getPointParticleSystem()
PrototypeParticleSystem_ObjectParticleSystem * getObjectParticleSystem()
PrototypeParticleSystem_FogParticleSystem * getFogParticleSystem()
const string & getFileName()
void addParticleSystem(PrototypeParticleSystem *particleSystem)
Add particle system.
PrototypeParticleSystem * getParticleSystemAt(int idx)
Get particle system at given index.
virtual const MutableString & getValue()=0
const string & getToolTip()
GUINodeController * getController()
GUI screen node that represents a screen that can be rendered via GUI system.
GUINode * getNodeById(const string &nodeId)
Get GUI node by id.
Matrix4x4 class representing matrix4x4 mathematical structure and operations for 3d space.
Matrix4x4 & identity()
Creates identity matrix.
void getAxes(Vector3 &xAxis, Vector3 &yAxis, Vector3 &zAxis) const
Get coordinate system axes.
Vector3 computeEulerAngles() const
Compute Euler angles (rotation around x, y, z axes)
Matrix4x4 & setAxes(const Vector3 &xAxis, const Vector3 &yAxis, const Vector3 &zAxis)
Set coordinate system axes.
Vector3 class representing vector3 mathematical structure and operations with x, y,...
Vector3 & add(float scalar)
Adds a scalar.
Vector3 clone() const
Clones this vector3.
Vector3 & set(float x, float y, float z)
Sets this vector3 by its components.
Particle system editor tab controller.
array< string, 16 > applyRPENodes
array< string, 6 > applyOPSNodes
void onContextMenuRequest(GUIElementNode *node, int mouseX, int mouseY) override
On context menu request.
void onDrop(const string &payload, int mouseX, int mouseY) override
On drop.
unique_ptr< PrototypeSoundsSubController > prototypeSoundsSubController
array< string, 3 > applyBaseNodes
void updateInfoText(const MutableString &text)
Update info text line.
void dispose() override
Dispose.
void applyParticleSystemDetails(int particleSystemIdx)
Apply particle system details.
void setOutlinerAddDropDownContent()
Set outliner add drop down content.
array< string, 5 > applyFPSNodes
void setObjectParticleSystemModel(int particleSystemIdx, const string &fileName)
Set object particle system model.
array< string, 14 > applyPPENodes
void onChange(GUIElementNode *node) override
On change.
array< string, 24 > applyBBPENodes
void onCommand(TabControllerCommand command) override
On command.
void updateSphereParticleSystemEmitter(const Vector3 ¢er, float radius)
Update sphere particle system emitter.
void setFogParticleSystemTransparencyTexture(int particleSystemIdx, const string &fileName)
Set fog particle system transparency texture.
void setPointParticleSystemTransparencyTexture(int particleSystemIdx, const string &fileName)
Set point particle system transparency texture.
void onUnfocus(GUIElementNode *node) override
On unfocus.
void onTooltipCloseRequest() override
On tooltip close request.
void setFogParticleSystemTexture(int particleSystemIdx, const string &fileName)
Set fog particle system texture.
void updateDetails(const string &outlinerNode)
Update details panel.
GUIScreenNode * screenNode
void onFocus(GUIElementNode *node) override
On focus.
unique_ptr< PrototypeScriptSubController > prototypeScriptSubController
void updateCircleParticleSystemEmitter(const Vector3 ¢er, const Vector3 &axis0, const Vector3 &axis1, float radius)
Update circle particle system emitter.
void setPointParticleSystemTexture(int particleSystemIdx, const string &fileName)
Set point particle system texture.
void updateRadialParticleSystemEmitter(const Vector3 ¢er, const Vector3 &axis0, const Vector3 &axis1, float radius)
Update radial particle system emitter.
array< string, 15 > applySPENodes
virtual ~ParticleSystemEditorTabController()
Destructor.
void setParticleSystemDetails(int particleSystemIdx)
Set particle system details.
void initialize(GUIScreenNode *screenNode) override
Init.
unique_ptr< PrototypePhysicsSubController > prototypePhysicsSubController
unique_ptr< PrototypeDisplaySubController > prototypeDisplaySubController
void showInfoPopUp(const string &caption, const string &message)
Show the information pop up / modal.
void onAction(GUIActionListenerType type, GUIElementNode *node) override
array< string, 18 > applyCPENodes
void updatePointParticleSystemEmitter(const Vector3 &position)
Update point particle system emitter.
array< string, 6 > applyPPSNodes
void updateBoundingBoxParticleSystemEmitter(const Vector3 ¢er, const Vector3 &axis0, const Vector3 &axis1, const Vector3 &axis2, const Vector3 &halfExtension)
Update bounding box particle system emitter.
void setOutlinerContent()
Set outliner content.
unique_ptr< BasePropertiesSubController > basePropertiesSubController
void onTooltipShowRequest(GUINode *node, int mouseX, int mouseY) override
On tooltip show request.
ParticleSystemEditorTabView * view
Particle system editor tab view.
void saveFile(const string &pathName, const string &fileName)
Saving prototype as tempty prototype.
const string & getTabId() override
Prototype * getPrototype()
EditorView * getEditorView()
void setParticleSystemIndex(int idx, bool changeOutlinerSelection=true)
Set particle system index, the particle system to edit.
void initParticleSystem()
Init particle system.
void uninitParticleSystem()
Uninit particle system.
Mutable utf8 aware string class.
const string & getString() const
std::exception Exception
Exception base class.