|
Cogs.Core
|
Public Member Functions | |
| void | setSelection (const EntityIds &ids) |
| Set new selected entities. | |
| void | setSelection (EntityId id) |
| void | clearSelection () |
| void | updateSelectedInfo () |
| Update information in LastPickedState when selection changes. | |
| size_t | numSelected () const |
| bool | hasSelected () const |
| bool | isSelected (EntityId entityId) const |
| EntityId | getSelectedId () const |
| Gets entity ID of the single selected entity. | |
| ComponentModel::Entity * | getSelected () const |
| Gets entity Pointer to the single selected entity. Nullptr if not one selected or not found. | |
| std::span< const EntityId > | getAllSelectedIds () const |
| Get Entity Ids of all selected entities. | |
| void | setFindPattern (const std::string &pattern) |
| Entity search pattern. | |
| const std::string & | getFindPattern () const |
| Gets Entity search pattern. | |
| const std::regex & | getFindRegex () const |
| Entity search pattern as Regexp for lookup. | |
| bool | isFindRegexValid () const |
| std::string | eraseInvalidSelected () |
Public Attributes | |
| EditingMode | mode = EditingMode::Select |
| EditingPivot | pivot = EditingPivot::Default |
| class Editor * | editor = nullptr |
| class Context * | context = nullptr |
| WeakEntityPtr | editorCamera |
| Editor scene camera. | |
| std::string | fileName |
| std::string | directory |
| LastPickState | lastPickState |
| EntityIds | selected |
| int | pickId = -1 |
| bool | scrolled = false |
| bool | findEntities = false |
| size_t | findOffset = 0 |
| bool | showSettings = false |
| std::vector< ComponentModel::Entity * > | selectedPath |
| std::unordered_map< int, TextureHandle > | icons |
| glm::vec3 | startTranslation = glm::vec3(0) |
| glm::vec3 | endTranslation = glm::vec3(0) |
| glm::quat | startRotation |
| glm::quat | endRotation |
| glm::vec3 | startScale |
| glm::vec3 | endScale |
| std::vector< glm::vec3 > | startTranslations |
| std::vector< glm::quat > | startRotations |
| std::vector< glm::vec3 > | startScales |
| glm::vec3 | startMin |
| glm::vec3 | startMax |
| bool | wasUsingGizmo = false |
| bool | lButtonDown = false |
| int | downX = 0 |
| int | downY = 0 |
| rapidjson::Document | copied |
| float | translateSnap = 0.1f |
| float | rotateSnap = 1.0f |
| float | scaleSnap = 0.1f |
| std::vector< std::shared_ptr< ICommandState > > | commandStates |
Private Attributes | |
| std::string | findPattern |
| std::regex | findRegex |
| bool | validRegex = true |
Definition at line 75 of file EditorState.h.
|
inline |
Definition at line 111 of file EditorState.h.
|
inline |
Erase invalid selected entities. Like Internal Asset LOD entites. Returns string with entity ids.
Definition at line 161 of file EditorState.h.
References Cogs::Core::EntityStore::getEntityPtr(), Cogs::Core::Context::store, and updateSelectedInfo().
|
inline |
Get Entity Ids of all selected entities.
Definition at line 136 of file EditorState.h.
Referenced by Cogs::Core::Editor::open().
|
inline |
Gets Entity search pattern.
Definition at line 153 of file EditorState.h.
|
inline |
Entity search pattern as Regexp for lookup.
Definition at line 155 of file EditorState.h.
|
inline |
Gets entity Pointer to the single selected entity. Nullptr if not one selected or not found.
Definition at line 133 of file EditorState.h.
References Cogs::Core::EntityStore::getEntityPtr(), getSelectedId(), and Cogs::Core::Context::store.
Referenced by Cogs::Core::CreateEntityCommand::apply(), and Cogs::Core::ExportCommand::apply().
|
inline |
Gets entity ID of the single selected entity.
Definition at line 130 of file EditorState.h.
Referenced by getSelected(), and Cogs::Core::Editor::open().
|
inline |
Definition at line 122 of file EditorState.h.
|
inline |
Definition at line 156 of file EditorState.h.
|
inline |
Definition at line 124 of file EditorState.h.
|
inline |
Definition at line 120 of file EditorState.h.
|
inline |
Entity search pattern.
Definition at line 139 of file EditorState.h.
|
inline |
Set new selected entities.
Definition at line 100 of file EditorState.h.
References updateSelectedInfo().
Referenced by Cogs::Core::CreateEntityCommand::apply(), and Cogs::Core::Editor::open().
|
inline |
Definition at line 106 of file EditorState.h.
| void Cogs::Core::EditorState::updateSelectedInfo | ( | ) |
Update information in LastPickedState when selection changes.
Definition at line 2970 of file Editor.cpp.
References Cogs::ComponentModel::Entity::getComponent(), Cogs::Core::EntityStore::getEntityPtr(), Cogs::ComponentModel::Entity::getId(), Cogs::ComponentModel::Entity::getName(), and Cogs::Core::Context::store.
Referenced by eraseInvalidSelected(), and setSelection().
| std::vector<std::shared_ptr<ICommandState> > Cogs::Core::EditorState::commandStates |
Preserved command state. See ICommandState. Cleared at end of batch run.
Definition at line 213 of file EditorState.h.
| class Context* Cogs::Core::EditorState::context = nullptr |
Definition at line 81 of file EditorState.h.
| rapidjson::Document Cogs::Core::EditorState::copied |
Definition at line 205 of file EditorState.h.
| std::string Cogs::Core::EditorState::directory |
Definition at line 87 of file EditorState.h.
| int Cogs::Core::EditorState::downX = 0 |
Definition at line 202 of file EditorState.h.
| int Cogs::Core::EditorState::downY = 0 |
Definition at line 203 of file EditorState.h.
| class Editor* Cogs::Core::EditorState::editor = nullptr |
Definition at line 80 of file EditorState.h.
| WeakEntityPtr Cogs::Core::EditorState::editorCamera |
Editor scene camera.
Definition at line 84 of file EditorState.h.
| glm::quat Cogs::Core::EditorState::endRotation |
Definition at line 186 of file EditorState.h.
| glm::vec3 Cogs::Core::EditorState::endScale |
Definition at line 189 of file EditorState.h.
| glm::vec3 Cogs::Core::EditorState::endTranslation = glm::vec3(0) |
Definition at line 183 of file EditorState.h.
| std::string Cogs::Core::EditorState::fileName |
Definition at line 86 of file EditorState.h.
| bool Cogs::Core::EditorState::findEntities = false |
Definition at line 94 of file EditorState.h.
| size_t Cogs::Core::EditorState::findOffset = 0 |
Definition at line 95 of file EditorState.h.
|
private |
Definition at line 215 of file EditorState.h.
|
private |
Definition at line 216 of file EditorState.h.
| std::unordered_map<int, TextureHandle> Cogs::Core::EditorState::icons |
Definition at line 180 of file EditorState.h.
| LastPickState Cogs::Core::EditorState::lastPickState |
Definition at line 89 of file EditorState.h.
| bool Cogs::Core::EditorState::lButtonDown = false |
Definition at line 200 of file EditorState.h.
| EditingMode Cogs::Core::EditorState::mode = EditingMode::Select |
Definition at line 77 of file EditorState.h.
| int Cogs::Core::EditorState::pickId = -1 |
Definition at line 91 of file EditorState.h.
| EditingPivot Cogs::Core::EditorState::pivot = EditingPivot::Default |
Definition at line 78 of file EditorState.h.
| float Cogs::Core::EditorState::rotateSnap = 1.0f |
Definition at line 208 of file EditorState.h.
| float Cogs::Core::EditorState::scaleSnap = 0.1f |
Definition at line 209 of file EditorState.h.
| bool Cogs::Core::EditorState::scrolled = false |
Definition at line 92 of file EditorState.h.
| EntityIds Cogs::Core::EditorState::selected |
Definition at line 90 of file EditorState.h.
| std::vector<ComponentModel::Entity *> Cogs::Core::EditorState::selectedPath |
Definition at line 178 of file EditorState.h.
| bool Cogs::Core::EditorState::showSettings = false |
Definition at line 97 of file EditorState.h.
| glm::vec3 Cogs::Core::EditorState::startMax |
Definition at line 196 of file EditorState.h.
| glm::vec3 Cogs::Core::EditorState::startMin |
Definition at line 195 of file EditorState.h.
| glm::quat Cogs::Core::EditorState::startRotation |
Definition at line 185 of file EditorState.h.
| std::vector<glm::quat> Cogs::Core::EditorState::startRotations |
Definition at line 192 of file EditorState.h.
| glm::vec3 Cogs::Core::EditorState::startScale |
Definition at line 188 of file EditorState.h.
| std::vector<glm::vec3> Cogs::Core::EditorState::startScales |
Definition at line 193 of file EditorState.h.
| glm::vec3 Cogs::Core::EditorState::startTranslation = glm::vec3(0) |
Definition at line 182 of file EditorState.h.
| std::vector<glm::vec3> Cogs::Core::EditorState::startTranslations |
Definition at line 191 of file EditorState.h.
| float Cogs::Core::EditorState::translateSnap = 0.1f |
Definition at line 207 of file EditorState.h.
|
private |
Definition at line 217 of file EditorState.h.
| bool Cogs::Core::EditorState::wasUsingGizmo = false |
Definition at line 198 of file EditorState.h.