Editor API
UnigineEditor public API
|
This class represents a list of indices of selected subitems of a selected node. When an object is selected, some of its surfaces or collision shapes can also be selected, the index list shall contain indices for all of them grouped by type. More...
#include <Selector.h>
Public Member Functions | |
IndexList () | |
~IndexList () override | |
void | extend (Constants::SubObjectType stype, int index) |
Extends the list by adding an item of the specified type with the specified index (e.g., you can add the third surface). More... | |
void | extend (Constants::SubObjectType stype, int from, int to) |
Extends the list by adding a range of items of the specified type having indices in the specified range (e.g., you can add surfaces with indices from 2 to 6). More... | |
int | type () const override |
Returns the type of the index list. More... | |
bool | equal (SubItemList *other) const override |
Checks whether the index list is equal to the other list specified. More... | |
void | merge (SubItemList *other) override |
Merges the index list with the other list specified. More... | |
void | exclude (Constants::SubObjectType stype) override |
Excludes all indices of subitems of the specified type from the list (e.g., remove all joints). More... | |
void | exclude (Constants::SubObjectType stype, int index) |
Excludes the specified index of a subitem of the specified type from the list (e.g., remove third joint). More... | |
bool | contains (Constants::SubObjectType stype, int index) const |
Checks whether the index list contains the subitem of the specified type having the specified index (e.g., you can check whether the second shape is selected). More... | |
QSet< int > | getSubObjectIndexes (Constants::SubObjectType stype) const |
Returns all indices of subitems of the specified type stored in the list (e.g., you can get all surfaces). More... | |
bool | empty (Constants::SubObjectType stype) const |
Checks whether the index list does not contain any indices of subitems of the specified type. More... | |
int | size (Constants::SubObjectType stype) const |
Returns the number of indices of subitems of the specified type. More... | |
IndexList * | clone () const override |
Clones the index list. More... | |
![]() | |
SubItemList () | |
virtual | ~SubItemList () |
virtual bool | equal (SubItemList *other) const =0 |
Checks whether the subitems list is equal to the other list specified. More... | |
virtual void | merge (SubItemList *other)=0 |
Merges the subitems list with the other list specified. More... | |
This class represents a list of indices of selected subitems of a selected node. When an object is selected, some of its surfaces or collision shapes can also be selected, the index list shall contain indices for all of them grouped by type.
Editor::IndexList::IndexList | ( | ) |
|
override |
|
overridevirtual |
Clones the index list.
Implements Editor::SelectorNodes::SubItemList.
bool Editor::IndexList::contains | ( | Constants::SubObjectType | stype, |
int | index | ||
) | const |
Checks whether the index list contains the subitem of the specified type having the specified index (e.g., you can check whether the second shape is selected).
stype | Subitem type. One of the Constants::SubObjectType enum values. |
index | Subitem index. |
bool Editor::IndexList::empty | ( | Constants::SubObjectType | stype | ) | const |
Checks whether the index list does not contain any indices of subitems of the specified type.
|
override |
Checks whether the index list is equal to the other list specified.
other | Other subitems list. |
|
overridevirtual |
Excludes all indices of subitems of the specified type from the list (e.g., remove all joints).
stype | Type of subitems to be excluded from the list (Constants::SubObjectType). |
Implements Editor::SelectorNodes::SubItemList.
void Editor::IndexList::exclude | ( | Constants::SubObjectType | stype, |
int | index | ||
) |
Excludes the specified index of a subitem of the specified type from the list (e.g., remove third joint).
stype | Type of subitems to be excluded from the list (Constants::SubObjectType). |
index | Item index. |
void Editor::IndexList::extend | ( | Constants::SubObjectType | stype, |
int | index | ||
) |
Extends the list by adding an item of the specified type with the specified index (e.g., you can add the third surface).
stype | Type of the item to be added. One of the Constants::SubObjectType enum values. |
index | Index of the item to be added. |
void Editor::IndexList::extend | ( | Constants::SubObjectType | stype, |
int | from, | ||
int | to | ||
) |
Extends the list by adding a range of items of the specified type having indices in the specified range (e.g., you can add surfaces with indices from 2 to 6).
stype | Type of the item to be added. One of the Constants::SubObjectType enum values. |
from | Index of the first item of the range to be added. |
to | Index of the last item of the range to be added. |
QSet<int> Editor::IndexList::getSubObjectIndexes | ( | Constants::SubObjectType | stype | ) | const |
Returns all indices of subitems of the specified type stored in the list (e.g., you can get all surfaces).
stype | Subitem type. One of the Constants::SubObjectType enum values. |
|
override |
Merges the index list with the other list specified.
other | Other subitems list. |
int Editor::IndexList::size | ( | Constants::SubObjectType | stype | ) | const |
Returns the number of indices of subitems of the specified type.
stype | Subitem type. One of the Constants::SubObjectType enum values. |
|
overridevirtual |
Returns the type of the index list.
Implements Editor::SelectorNodes::SubItemList.