TDME2  1.9.200
ParticleSystemEditorTabView.cpp
Go to the documentation of this file.
2 
3 #include <memory>
4 #include <string>
5 
6 #include <tdme/tdme.h>
7 #include <tdme/audio/Audio.h>
8 #include <tdme/audio/Sound.h>
20 #include <tdme/engine/Engine.h>
24 #include <tdme/engine/Timing.h>
28 #include <tdme/gui/nodes/GUINode.h>
30 #include <tdme/gui/GUI.h>
46 #include <tdme/utilities/Console.h>
49 #include <tdme/utilities/Time.h>
50 
51 using std::make_unique;
52 using std::string;
53 using std::unique_ptr;
54 
56 
57 using tdme::audio::Audio;
58 using tdme::audio::Sound;
79 using tdme::gui::GUI;
99 
100 ParticleSystemEditorTabView::ParticleSystemEditorTabView(EditorView* editorView, const string& tabId, Prototype* prototype): Gizmo(nullptr, "spsv")
101 {
102  this->editorView = editorView;
103  this->tabId = tabId;
104  this->popUps = editorView->getPopUps();
105  this->prototype = unique_ptr<Prototype>(prototype);
106  this->audio = Audio::getInstance();
107  this->engine = unique_ptr<Engine>(Engine::createOffScreenInstance(512, 512, true, true, true));
108  this->engine->setShadowMapLightEyeDistanceScale(0.1f);
109  this->engine->setSceneColor(Color4(39.0f / 255.0f, 39.0f / 255.0f, 39.0f / 255.0f, 1.0f));
110  this->cameraRotationInputHandler = make_unique<CameraRotationInputHandler>(engine.get(), this);
111  this->audioStarted = -1LL;
112  this->audioOffset = -1LL;
113  Gizmo::setEngine(engine.get());
115  outlinerState.expandedOutlinerParentOptionValues.push_back("prototype");
116 }
117 
119 }
120 
122 {
124  for (auto& event: engine->getGUI()->getKeyboardEvents()) {
125  if (event.isProcessed() == true) continue;
126  auto isKeyDown = event.getType() == GUIKeyboardEvent::KEYBOARDEVENT_KEY_PRESSED;
127  if (Character::toLowerCase(event.getKeyChar()) == '1') { if (isKeyDown == true) setGizmoType(GIZMOTYPE_ALL); updateGizmo(); event.setProcessed(true); }
128  if (Character::toLowerCase(event.getKeyChar()) == '2') { if (isKeyDown == true) setGizmoType(GIZMOTYPE_TRANSLATE); updateGizmo(); event.setProcessed(true); }
129  if (Character::toLowerCase(event.getKeyChar()) == '3') { if (isKeyDown == true) setGizmoType(GIZMOTYPE_ROTATE); updateGizmo(); event.setProcessed(true); }
130  if (Character::toLowerCase(event.getKeyChar()) == '4') { if (isKeyDown == true) setGizmoType(GIZMOTYPE_SCALE); updateGizmo(); event.setProcessed(true); }
131  }
132  for (auto& event: engine->getGUI()->getMouseEvents()) {
133  if (event.isProcessed() == true) continue;
134 
135  if (event.getButton() == MOUSE_BUTTON_LEFT) {
136  if (event.getType() == GUIMouseEvent::MOUSEEVENT_RELEASED) {
137  auto selectedEntity = engine->getEntity("model");
138  auto psg = dynamic_cast<ParticleSystemGroup*>(selectedEntity);
139  if (psg != nullptr) selectedEntity = psg->getParticleSystems()[particleSystemIdx];
140  if (getGizmoMode() != GIZMOMODE_NONE) {
141  if (selectedEntity != nullptr) applyParticleSystemTransform(dynamic_cast<ParticleSystem*>(selectedEntity), false);
143  updateGizmo();
144  }
145  totalDeltaScale.set(0.0, 0.0f, 0.0f);
146  event.setProcessed(true);
147  } else
148  if (event.getType() == GUIMouseEvent::MOUSEEVENT_PRESSED) {
149  Node* selectedEntityNode = nullptr;
150  ParticleSystem* selectedSubParticleSystem = nullptr;
151  Entity* selectedEntity = nullptr;
152  if (getGizmoMode() == GIZMOMODE_NONE) selectedEntity = engine->getEntityByMousePosition(event.getXUnscaled(), event.getYUnscaled(), nullptr, &selectedEntityNode, &selectedSubParticleSystem);
153  if (getGizmoMode() == GIZMOMODE_NONE && selectedEntity == nullptr) {
155  event.setProcessed(true);
156  } else
157  if (determineGizmoMode(selectedEntity, selectedEntityNode) == true) {
158  event.setProcessed(true);
159  } else
160  if (selectedEntity != nullptr) {
161  auto psg = dynamic_cast<ParticleSystemGroup*>(selectedEntity);
162  if (psg != nullptr && selectedSubParticleSystem != nullptr) {
163  auto particleSystemIdx = 0;
164  for (auto pse: psg->getParticleSystems()) {
165  if (pse == selectedSubParticleSystem) {
167  break;
168  }
170  }
171  } else {
173  }
174  event.setProcessed(true);
175  }
176  } else
177  if (event.getType() == GUIMouseEvent::MOUSEEVENT_DRAGGED) {
178  if (getGizmoMode() != GIZMOMODE_NONE) {
179  Vector3 deltaTranslation;
180  Vector3 deltaRotation;
181  Vector3 deltaScale;
182  if (determineGizmoDeltaTransformations(event.getXUnscaled(), event.getYUnscaled(), deltaTranslation, deltaRotation, deltaScale) == true) {
183  totalDeltaScale.add(deltaScale.clone().sub(Vector3(1.0f, 1.0f, 1.0f)));
184  auto gizmoEntity = getGizmoObject();
185  auto selectedEntity = engine->getEntity("model");
186  auto psg = dynamic_cast<ParticleSystemGroup*>(selectedEntity);
187  if (psg != nullptr) selectedEntity = psg->getParticleSystems()[particleSystemIdx];
188  if (gizmoEntity != nullptr && selectedEntity != nullptr) {
189  selectedEntity->setTranslation(selectedEntity->getTranslation().clone().add(deltaTranslation));
190  selectedEntity->update();
191  auto localTransformations = dynamic_cast<ParticleSystem*>(selectedEntity)->getLocalTransform();
192  localTransformations.setScale(localTransformations.getScale().clone().scale(deltaScale));
193  if (deltaRotation.computeLengthSquared() > Math::square(Math::EPSILON) * 3.0f) {
194  if (localTransformations.getRotationCount() == 0) {
195  localTransformations.addRotation(Rotation::Z_AXIS, 0.0f);
196  localTransformations.addRotation(Rotation::Y_AXIS, 0.0f);
197  localTransformations.addRotation(Rotation::X_AXIS, 0.0f);
198  }
199  localTransformations.setRotationAngle(0, localTransformations.getRotationAngle(0) + deltaRotation[2]);
200  localTransformations.setRotationAngle(1, localTransformations.getRotationAngle(1) + deltaRotation[1]);
201  localTransformations.setRotationAngle(2, localTransformations.getRotationAngle(2) + deltaRotation[0]);
202  }
203  localTransformations.update();
204  dynamic_cast<ParticleSystem*>(selectedEntity)->setLocalTransform(localTransformations);
205  setGizmoRotation(localTransformations);
206  applyParticleSystemTransform(dynamic_cast<ParticleSystem*>(selectedEntity), true);
207  }
208  if (Math::abs(deltaTranslation.getX()) > Math::EPSILON ||
209  Math::abs(deltaTranslation.getY()) > Math::EPSILON ||
210  Math::abs(deltaTranslation.getZ()) > Math::EPSILON) {
211  updateGizmo();
212  }
213  }
214  event.setProcessed(true);
215  }
216  }
217  }
218  }
219  } else {
221  }
222  cameraRotationInputHandler->handleInputEvents();
223 }
224 
226 {
227  // audio
228  if (audioOffset > 0 && Time::getCurrentMillis() - audioStarted >= audioOffset) {
229  auto sound = audio->getEntity("sound");
230  if (sound != nullptr) sound->play();
231  audioOffset = -1LL;
232  }
233 
234  //
235  particleSystemEditorTabController->updateInfoText(MutableString(engine->getTiming()->getAvarageFPS()).append(" FPS"));
236 
237  // rendering
240  engine->display();
241 }
242 
244 {
245  try {
246  particleSystemEditorTabController = make_unique<ParticleSystemEditorTabController>(this);
248  prototypePhysicsView = particleSystemEditorTabController->getPrototypePhysicsSubController()->getView();
249  prototypeDisplayView = particleSystemEditorTabController->getPrototypeDisplaySubController()->getView();
250  prototypeSoundsView = particleSystemEditorTabController->getPrototypeSoundsSubController()->getView();
251  } catch (Exception& exception) {
252  Console::println("ParticleSystemEditorTabView::initialize(): An error occurred: " + string(exception.what()));
253  }
254  // TODO: load settings
256 }
257 
259 {
260  engine->dispose();
261 }
262 
264 }
265 
267  return engine.get();
268 }
269 
271  particleSystemEditorTabController->setOutlinerAddDropDownContent();
272  particleSystemEditorTabController->setOutlinerContent();
275 }
276 
279 }
280 
282  particleSystemEditorTabController->setOutlinerContent();
284 }
285 
288  if (getParticleSystemIndex() != -1) updateGizmo();
289 }
290 
293  if (getParticleSystemIndex() != -1) updateGizmo();
294 }
295 
296 void ParticleSystemEditorTabView::playSound(const string& soundId) {
297  audio->removeEntity("sound");
298  auto soundDefinition = prototype->getSound(soundId);
299  if (soundDefinition != nullptr && soundDefinition->getFileName().length() > 0) {
300  auto pathName = PrototypeReader::getResourcePathName(
301  Tools::getPathName(prototype->getFileName()),
302  soundDefinition->getFileName()
303  );
304  auto fileName = Tools::getFileName(soundDefinition->getFileName());
305  auto sound = new Sound(
306  "sound",
307  pathName,
308  fileName
309  );
310  sound->setGain(soundDefinition->getGain());
311  sound->setPitch(soundDefinition->getPitch());
312  sound->setLooping(soundDefinition->isLooping());
313  sound->setFixed(true);
314  audio->addEntity(sound);
315  audioStarted = Time::getCurrentMillis();
316  audioOffset = -1LL;
317  if (soundDefinition->getOffset() <= 0) {
318  sound->play();
319  } else {
320  audioOffset = soundDefinition->getOffset();
321  }
322  }
323 }
324 
326  audio->removeEntity("sound");
327 }
328 
330  Tools::setupPrototype(prototype.get(), engine.get(), cameraRotationInputHandler->getLookFromRotations(), 1, objectScale, cameraRotationInputHandler.get());
332 }
333 
335  engine->removeEntity("model");
336  removeGizmo();
337 }
338 
340  return particleSystemIdx;
341 }
342 
343 void ParticleSystemEditorTabView::setParticleSystemIndex(int idx, bool changeOutlinerSelection) {
344  if (particleSystemIdx == idx) return;
345  particleSystemIdx = idx;
346  totalDeltaScale.set(0.0, 0.0f, 0.0f);
347  if (particleSystemIdx == -1) {
348  if (changeOutlinerSelection == true) {
349  editorView->getScreenController()->setOutlinerSelection("particlesystems");
350  editorView->getScreenController()->getScreenNode()->forwardChange(required_dynamic_cast<GUIElementNode*>(editorView->getScreenController()->getScreenNode()->getNodeById("selectbox_outliner")));
351  }
352  removeGizmo();
353  } else {
354  if (changeOutlinerSelection == true) {
355  editorView->getScreenController()->setOutlinerSelection("particlesystems." + to_string(idx));
356  editorView->getScreenController()->getScreenNode()->forwardChange(required_dynamic_cast<GUIElementNode*>(editorView->getScreenController()->getScreenNode()->getNodeById("selectbox_outliner")));
357  }
358  updateGizmo();
359  }
360 }
361 
363  auto selectedEntity = engine->getEntity("model");
364  auto psg = dynamic_cast<ParticleSystemGroup*>(selectedEntity);
365  if (psg != nullptr) {
366  selectedEntity = particleSystemIdx >= psg->getParticleSystems().size()?nullptr:psg->getParticleSystems()[particleSystemIdx];
367  } else {
368  if (particleSystemIdx > 0) selectedEntity = nullptr;
369  }
370  auto pse = dynamic_cast<ParticleSystem*>(selectedEntity);
371  if (selectedEntity != nullptr) {
372  if (pse != nullptr) {
373  Gizmo::updateGizmo(pse->getEmitter()->getCenter().clone().scale(objectScale).add(selectedEntity->getTranslation()), selectedEntity->getTransform());
374  } else {
375  Gizmo::updateGizmo(selectedEntity->getWorldBoundingBox()->getCenter(), selectedEntity->getTransform());
376  }
377  } else {
378  removeGizmo();
379  }
380 }
381 
383  Gizmo::setGizmoRotation(transform);
384 }
385 
387  {
388  auto transform = particleSystemEntity->getTransform();
389  auto localTransform = particleSystemEntity->getLocalTransform();
390  auto objectScaleInverted = Vector3(
391  1.0f / objectScale.getX(),
392  1.0f / objectScale.getY(),
393  1.0f / objectScale.getZ()
394  );
395  transform.setScale(objectScaleInverted);
396  transform.update();
397  auto particleSystem = prototype->getParticleSystemAt(particleSystemIdx);
398  auto emitterType = particleSystem->getEmitter();
399  if (emitterType == PrototypeParticleSystem_Emitter::NONE) {
400  // no op
401  } else
402  if (emitterType == PrototypeParticleSystem_Emitter::POINT_PARTICLE_EMITTER) {
403  auto emitter = particleSystem->getPointParticleEmitter();
404  auto position = transform.getTranslation().clone().scale(objectScaleInverted).add(emitter->getPosition());
405  if (guiOnly == false) {
406  emitter->setPosition(position);
407  } else {
408  particleSystemEditorTabController->updatePointParticleSystemEmitter(position);
409  }
410  } else
411  if (emitterType == PrototypeParticleSystem_Emitter::BOUNDINGBOX_PARTICLE_EMITTER) {
412  auto emitter = particleSystem->getBoundingBoxParticleEmitters();
413  auto center = transform.getTranslation().clone().scale(objectScaleInverted).add(emitter->getObbCenter());
414  auto axis0 = emitter->getObbAxis0().clone().scale(emitter->getObbHalfextension().getX() * 2.0f);
415  auto axis1 = emitter->getObbAxis1().clone().scale(emitter->getObbHalfextension().getY() * 2.0f);
416  auto axis2 = emitter->getObbAxis2().clone().scale(emitter->getObbHalfextension().getZ() * 2.0f);
417  auto halfExtension = emitter->getObbHalfextension();
418  axis0 = localTransform.getTransformMatrix().multiplyNoTranslation(axis0);
419  axis1 = localTransform.getTransformMatrix().multiplyNoTranslation(axis1);
420  axis2 = localTransform.getTransformMatrix().multiplyNoTranslation(axis2);
421  halfExtension.set(
422  Vector3(
423  Math::clamp(axis0.computeLength() / 2.0f, 0.01f, 1000.0f),
424  Math::clamp(axis1.computeLength() / 2.0f, 0.01f, 1000.0f),
425  Math::clamp(axis2.computeLength() / 2.0f, 0.01f, 1000.0f)
426  )
427  );
428  axis0.normalize();
429  axis1.normalize();
430  axis2.normalize();
431  if (guiOnly == false) {
432  emitter->setObbCenter(center);
433  emitter->setObbAxis0(axis0);
434  emitter->setObbAxis1(axis1);
435  emitter->setObbAxis2(axis2);
436  emitter->setObbHalfextension(halfExtension);
437  } else {
438  particleSystemEditorTabController->updateBoundingBoxParticleSystemEmitter(center, axis0, axis1, axis2, halfExtension);
439  }
440  } else
441  if (emitterType == PrototypeParticleSystem_Emitter::CIRCLE_PARTICLE_EMITTER) {
442  auto emitter = particleSystem->getCircleParticleEmitter();
443  auto center = transform.getTranslation().clone().scale(objectScaleInverted).add(emitter->getCenter());
444  auto axis0 = emitter->getAxis0();
445  auto axis1 = emitter->getAxis1();
446  axis0 = localTransform.getTransformMatrix().multiplyNoTranslation(axis0).normalize();
447  axis1 = localTransform.getTransformMatrix().multiplyNoTranslation(axis1).normalize();
448  auto scale = 1.0f;
449  if (Math::abs(totalDeltaScale.getX()) > Math::abs(totalDeltaScale.getY()) &&
450  Math::abs(totalDeltaScale.getX()) > Math::abs(totalDeltaScale.getZ())) {
451  scale+= totalDeltaScale.getX();
452  } else
453  if (Math::abs(totalDeltaScale.getY()) > Math::abs(totalDeltaScale.getX()) &&
454  Math::abs(totalDeltaScale.getY()) > Math::abs(totalDeltaScale.getZ())) {
455  scale+= totalDeltaScale.getY();
456  } else
457  if (Math::abs(totalDeltaScale.getZ()) > Math::abs(totalDeltaScale.getX()) &&
458  Math::abs(totalDeltaScale.getZ()) > Math::abs(totalDeltaScale.getY())) {
459  scale+= totalDeltaScale.getZ();
460  }
461  auto radius = Math::clamp(emitter->getRadius() * Math::abs(scale), 0.01f, 1000.0f);
462  if (guiOnly == false) {
463  emitter->setCenter(center);
464  emitter->setAxis0(axis0);
465  emitter->setAxis1(axis1);
466  emitter->setRadius(radius);
467  } else {
468  particleSystemEditorTabController->updateCircleParticleSystemEmitter(center, axis0, axis1, radius);
469  }
470  } else
471  if (emitterType == PrototypeParticleSystem_Emitter::CIRCLE_PARTICLE_EMITTER_PLANE_VELOCITY) {
472  auto emitter = particleSystem->getCircleParticleEmitterPlaneVelocity();
473  auto center = transform.getTranslation().clone().scale(objectScaleInverted).add(emitter->getCenter());
474  auto axis0 = emitter->getAxis0();
475  auto axis1 = emitter->getAxis1();
476  axis0 = localTransform.getTransformMatrix().multiplyNoTranslation(axis0).normalize();
477  axis1 = localTransform.getTransformMatrix().multiplyNoTranslation(axis1).normalize();
478  auto scale = 1.0f;
479  if (Math::abs(totalDeltaScale.getX()) > Math::abs(totalDeltaScale.getY()) &&
480  Math::abs(totalDeltaScale.getX()) > Math::abs(totalDeltaScale.getZ())) {
481  scale+= totalDeltaScale.getX();
482  } else
483  if (Math::abs(totalDeltaScale.getY()) > Math::abs(totalDeltaScale.getX()) &&
484  Math::abs(totalDeltaScale.getY()) > Math::abs(totalDeltaScale.getZ())) {
485  scale+= totalDeltaScale.getY();
486  } else
487  if (Math::abs(totalDeltaScale.getZ()) > Math::abs(totalDeltaScale.getX()) &&
488  Math::abs(totalDeltaScale.getZ()) > Math::abs(totalDeltaScale.getY())) {
489  scale+= totalDeltaScale.getZ();
490  }
491  auto radius = Math::clamp(emitter->getRadius() * Math::abs(scale), 0.01f, 1000.0f);
492  if (guiOnly == false) {
493  emitter->setCenter(center);
494  emitter->setAxis0(axis0);
495  emitter->setAxis1(axis1);
496  emitter->setRadius(radius);
497  } else {
498  particleSystemEditorTabController->updateRadialParticleSystemEmitter(center, axis0, axis1, radius);
499  }
500  } else
501  if (emitterType == PrototypeParticleSystem_Emitter::SPHERE_PARTICLE_EMITTER) {
502  auto emitter = particleSystem->getSphereParticleEmitter();
503  auto center = transform.getTranslation().clone().scale(objectScaleInverted).add(emitter->getCenter());
504  auto scale = 1.0f;
505  if (Math::abs(totalDeltaScale.getX()) > Math::abs(totalDeltaScale.getY()) &&
506  Math::abs(totalDeltaScale.getX()) > Math::abs(totalDeltaScale.getZ())) {
507  scale+= totalDeltaScale.getX();
508  } else
509  if (Math::abs(totalDeltaScale.getY()) > Math::abs(totalDeltaScale.getX()) &&
510  Math::abs(totalDeltaScale.getY()) > Math::abs(totalDeltaScale.getZ())) {
511  scale+= totalDeltaScale.getY();
512  } else
513  if (Math::abs(totalDeltaScale.getZ()) > Math::abs(totalDeltaScale.getX()) &&
514  Math::abs(totalDeltaScale.getZ()) > Math::abs(totalDeltaScale.getY())) {
515  scale+= totalDeltaScale.getZ();
516  }
517  auto radius = Math::clamp(emitter->getRadius() * Math::abs(scale), 0.01f, 1000.0f);
518  if (guiOnly == false) {
519  emitter->setCenter(center);
520  emitter->setRadius(radius);
521  } else {
522  particleSystemEditorTabController->updateSphereParticleSystemEmitter(center, radius);
523  }
524  } else {
525  Console::println("SharedParticleSystemView::applyParticleSystemTransform(): unknown particle system emitter '" + particleSystem->getEmitter()->getName() + "'");
526  }
527  }
528  if (guiOnly == false) {
530  auto modelEntity = engine->getEntity("model");
531  if (modelEntity != nullptr) engine->removeEntity("model");
532  Transform transform;
533  transform.setScale(objectScale);
534  transform.update();
535  modelEntity = SceneConnector::createEntity(prototype.get(), "model", transform);
536  if (modelEntity != nullptr) {
537  modelEntity->setPickable(true);
538  engine->addEntity(modelEntity);
539  }
540  }
541 }
542 
543 void ParticleSystemEditorTabView::saveFile(const string& pathName, const string& fileName) {
544  PrototypeWriter::write(pathName, fileName, prototype.get());
545 }
#define MOUSE_BUTTON_LEFT
virtual void play()=0
Plays this audio entity.
Interface to audio module.
Definition: Audio.h:29
AudioEntity * getEntity(const string &id)
Returns an audio entity identified by given id.
Definition: Audio.h:145
void addEntity(AudioEntity *entity)
Adds a audio entity.
Definition: Audio.cpp:67
void removeEntity(const string &id)
Removes an audio entity.
Definition: Audio.cpp:86
Sound audio entity implementation.
Definition: Sound.h:19
Color 4 definition class.
Definition: Color4.h:18
Engine main class.
Definition: Engine.h:131
Engine entity.
Definition: Entity.h:30
virtual void setScale(const Vector3 &scale)=0
Set scale.
virtual const Transform & getTransform() const =0
Particle system group, which combines several particle systems into a group, to be used with engine c...
const vector< ParticleSystem * > & getParticleSystems()
Scene engine/physics connector.
Timing class.
Definition: Timing.h:16
Transform which contain scale, rotations and translation.
Definition: Transform.h:29
void setScale(const Vector3 &scale)
Set scale.
Definition: Transform.h:79
virtual void update()
Computes transform matrix.
Definition: Transform.cpp:33
Model node.
Definition: Node.h:32
Prototype audio definition.
Prototype definition.
Definition: Prototype.h:55
GUI module class.
Definition: GUI.h:64
GUI node base class.
Definition: GUINode.h:64
GUI screen node that represents a screen that can be rendered via GUI system.
Definition: GUIScreenNode.h:72
void forwardChange(GUIElementNode *node)
Forward change event.
GUINode * getNodeById(const string &nodeId)
Get GUI node by id.
Vector3 class representing vector3 mathematical structure and operations with x, y,...
Definition: Vector3.h:20
float getY() const
Definition: Vector3.h:117
float getX() const
Definition: Vector3.h:100
float getZ() const
Definition: Vector3.h:134
Vector3 & add(float scalar)
Adds a scalar.
Definition: Vector3.h:153
float computeLengthSquared() const
Definition: Vector3.h:281
Vector3 clone() const
Clones this vector3.
Definition: Vector3.h:374
Vector3 & sub(float scalar)
Subtracts a scalar.
Definition: Vector3.h:177
Vector3 & set(float x, float y, float z)
Sets this vector3 by its components.
Definition: Vector3.h:70
void setOutlinerSelection(const string &newSelectionValue)
Set outliner selection.
void restoreOutlinerState(const TabView::OutlinerState &outlinerState)
Restore outliner state.
void storeOutlinerState(TabView::OutlinerState &outlinerState)
Store outliner state.
Gizmo tool for views.
Definition: Gizmo.h:31
void setGizmoMode(GizmoMode gizmoMode)
Set GIZMO mode.
Definition: Gizmo.h:167
bool determineGizmoDeltaTransformations(int mouseX, int mouseY, Vector3 &deltaTranslation, Vector3 &deltaRotation, Vector3 &deltaScale)
Determine GIZMO delta transform.
Definition: Gizmo.cpp:329
void removeGizmo()
Remove gizmo.
Definition: Gizmo.cpp:208
void setGizmoType(GizmoType gizmoType)
Set GIZMO type.
Definition: Gizmo.h:151
GizmoMode getGizmoMode() const
Definition: Gizmo.h:159
bool determineGizmoMode(Entity *selectedEntity, Node *selectedEntityNode)
Select GIZMO mode.
Definition: Gizmo.cpp:515
void saveFile(const string &pathName, const string &fileName)
Saving prototype as tempty prototype.
void setGizmoRotation(const Transform &transform)
Set GIZMO rotation.
void onCameraRotation() override
On rotation event to be overloaded.
unique_ptr< ParticleSystemEditorTabController > particleSystemEditorTabController
void handleInputEvents() override
Handle input events that have not yet been processed.
void applyParticleSystemTransform(ParticleSystem *particleSystemEntity, bool guiOnly)
Apply particle system transform.
unique_ptr< CameraRotationInputHandler > cameraRotationInputHandler
void setParticleSystemIndex(int idx, bool changeOutlinerSelection=true)
Set particle system index, the particle system to edit.
void onCameraScale() override
On scale event to be overloaded.
void handleInputEvents(Prototype *prototype)
Handle input events.
void setObjectScale(const Vector3 &objectScale)
Set object scale.
EditorScreenController * getScreenController()
Definition: EditorView.h:69
Character class.
Definition: Character.h:17
Console class.
Definition: Console.h:29
Mutable utf8 aware string class.
Definition: MutableString.h:23
MutableString & append(char c)
Append character.
String tools class.
Definition: StringTools.h:22
Time utility class.
Definition: Time.h:20
std::exception Exception
Exception base class.
Definition: Exception.h:18
Particle system entity interface.
virtual const Transform & getLocalTransform()=0
Playable sound view interface, which represents a view that supports playing sounds additionally.