|
DIE Engine
|
#include <editor.h>
Public Member Functions | |
| Editor () | |
| void | init () |
| void | terminate () |
| void | snapCoords (QVector2D &pos) |
| Snap a 2D position to the active grid. | |
| bool | inView (const QVector3D &pos) const |
| void | selectAll () |
| void | deselect () |
| void | clearSelection () |
| void | cut () |
| void | copy () |
| void | paste (VIEW_MODES mode, QVector2D pos) |
| Paste the copied objects, positioned relative to the last copied node. | |
| void | align () |
| void | nodeSelect (int nId) |
| bool | nodeAdd (QVector3D pos, int &nId) |
| void | nodeDelete (int nId) |
| void | nodeSelectAll () |
| void | nodeDeselectAll () |
| bool | nodeFindInCircle (VIEW_MODES mode, QVector2D pos, int &nId) |
| bool | nodeFindInRect (VIEW_MODES mode, QVector2D c1, QVector2D c2, int &nId) |
| void | wallSelect (int wId) |
| bool | wallAdd (int n1, int n2, uint16_t texId, int &wId) |
| void | wallDelete (int wId) |
| void | wallSelectAll () |
| void | wallDeselectAll () |
| bool | wallFindInCircle (VIEW_MODES mode, QVector2D pos, int &wId) |
| bool | wallFindInRect (VIEW_MODES mode, QVector2D c1, QVector2D c2, int &wId) |
| void | submapSelect (int mId) |
| bool | submapAdd (int node, int &mId) |
| void | submapDelete (int mId) |
| void | submapSelectAll () |
| void | submapDeselectAll () |
| bool | submapFindInCircle (VIEW_MODES mode, QVector2D pos, int &mId) |
| bool | submapFindInRect (VIEW_MODES mode, QVector2D c1, QVector2D c2, int &mId) |
| void | doorSelect (int dId) |
| bool | doorAdd (int node, uint16_t texId, int &dId) |
| void | doorDelete (int dId) |
| void | doorSelectAll () |
| void | doorDeselectAll () |
| bool | doorFindInCircle (VIEW_MODES mode, QVector2D pos, int &dId) |
| bool | doorFindInRect (VIEW_MODES mode, QVector2D c1, QVector2D c2, int &dId) |
| void | liftSelect (int eId) |
| bool | liftAdd (int node, uint16_t texId, int &eId) |
| void | liftDelete (int eId) |
| void | liftSelectAll () |
| void | liftDeselectAll () |
| bool | liftFindInCircle (VIEW_MODES mode, QVector2D pos, int &eId) |
| bool | liftFindInRect (VIEW_MODES mode, QVector2D c1, QVector2D c2, int &eId) |
| void | spriteSelect (int sId) |
| bool | spriteAdd (int node, uint16_t texId, int &sId) |
| void | spriteDelete (int sId) |
| void | spriteSelectAll () |
| void | spriteDeselectAll () |
| bool | spriteFindInCircle (VIEW_MODES mode, QVector2D pos, int &bId) |
| bool | spriteFindInRect (VIEW_MODES mode, QVector2D c1, QVector2D c2, int &bId) |
| void | staircaseSelect (int hId) |
| bool | staircaseAdd (int node, uint16_t texId, int &hId) |
| void | staircaseDelete (int hId) |
| void | staircaseSelectAll () |
| void | staircaseDeselectAll () |
| bool | staircaseFindInCircle (VIEW_MODES mode, QVector2D pos, int &hId) |
| bool | staircaseFindInRect (VIEW_MODES mode, QVector2D c1, QVector2D c2, int &hId) |
| void | lightSelect (int lId) |
| bool | lightAdd (int node, int &lId) |
| void | lightDelete (int lId) |
| void | lightSelectAll () |
| void | lightDeselectAll () |
| bool | lightFindInCircle (VIEW_MODES mode, QVector2D pos, int &lId) |
| bool | lightFindInRect (VIEW_MODES mode, QVector2D c1, QVector2D c2, int &lId) |
| void | speakerSelect (int aId) |
| bool | speakerAdd (int node, int &aId) |
| void | speakerDelete (int aId) |
| void | speakerSelectAll () |
| void | speakerDeselectAll () |
| bool | speakerFindInCircle (VIEW_MODES mode, QVector2D pos, int &aId) |
| bool | speakerFindInRect (VIEW_MODES mode, QVector2D c1, QVector2D c2, int &aId) |
| void | pathSelect (int pId) |
| bool | pathAdd (int &pId) |
| void | pathDelete (int pId) |
| void | pathSelectAll () |
| void | pathDeselectAll () |
Static Public Member Functions | |
| static QVector2D | to2D (VIEW_MODES mode, const QVector3D &pos) |
| Project a world position onto a 2D editor view. | |
| static QVector3D | to3D (VIEW_MODES mode, const QVector2D &pos, const QVector3D &ref) |
| Lift a 2D editor view position back to world space (ref fills the missing axis). | |
Public Attributes | |
| EDIT_MODES | editMode |
| Viewpoint | viewPoint |
| Env | env |
| Map | rootMap |
| Map * | editedMap |
| int | selectedNode |
| int | selectedWall |
| int | selectedSubmap |
| int | selectedDoor |
| int | selectedLift |
| int | selectedSprite |
| int | selectedStaircase |
| int | selectedLight |
| int | selectedSpeaker |
| int | selectedPath |
| uint16_t | selectedTextureID |
| QList< uint16_t > | copyNodeIDs |
| QList< Node > | copyNodes |
| QList< Wall > | copyWalls |
| bool | gridSnap |
| float | gridSize |
| float | zoom |
| float | viewMinY |
| float | viewMaxY |
| bool | gravity |
| bool | collisions |
| bool | wallSelector |
| Editor::Editor | ( | ) |
| void Editor::align | ( | ) |
| void Editor::clearSelection | ( | ) |
| void Editor::copy | ( | ) |
| void Editor::cut | ( | ) |
| void Editor::deselect | ( | ) |
| bool Editor::doorAdd | ( | int | node, |
| uint16_t | texId, | ||
| int & | dId ) |
| void Editor::doorDelete | ( | int | dId | ) |
| void Editor::doorDeselectAll | ( | ) |
| bool Editor::doorFindInCircle | ( | VIEW_MODES | mode, |
| QVector2D | pos, | ||
| int & | dId ) |
| bool Editor::doorFindInRect | ( | VIEW_MODES | mode, |
| QVector2D | c1, | ||
| QVector2D | c2, | ||
| int & | dId ) |
| void Editor::doorSelect | ( | int | dId | ) |
| void Editor::doorSelectAll | ( | ) |
| void Editor::init | ( | ) |
|
inline |
| bool Editor::liftAdd | ( | int | node, |
| uint16_t | texId, | ||
| int & | eId ) |
| void Editor::liftDelete | ( | int | eId | ) |
| void Editor::liftDeselectAll | ( | ) |
| bool Editor::liftFindInCircle | ( | VIEW_MODES | mode, |
| QVector2D | pos, | ||
| int & | eId ) |
| bool Editor::liftFindInRect | ( | VIEW_MODES | mode, |
| QVector2D | c1, | ||
| QVector2D | c2, | ||
| int & | eId ) |
| void Editor::liftSelect | ( | int | eId | ) |
| void Editor::liftSelectAll | ( | ) |
| bool Editor::lightAdd | ( | int | node, |
| int & | lId ) |
| void Editor::lightDelete | ( | int | lId | ) |
| void Editor::lightDeselectAll | ( | ) |
| bool Editor::lightFindInCircle | ( | VIEW_MODES | mode, |
| QVector2D | pos, | ||
| int & | lId ) |
| bool Editor::lightFindInRect | ( | VIEW_MODES | mode, |
| QVector2D | c1, | ||
| QVector2D | c2, | ||
| int & | lId ) |
| void Editor::lightSelect | ( | int | lId | ) |
| void Editor::lightSelectAll | ( | ) |
| bool Editor::nodeAdd | ( | QVector3D | pos, |
| int & | nId ) |
| void Editor::nodeDelete | ( | int | nId | ) |
| void Editor::nodeDeselectAll | ( | ) |
| bool Editor::nodeFindInCircle | ( | VIEW_MODES | mode, |
| QVector2D | pos, | ||
| int & | nId ) |
| bool Editor::nodeFindInRect | ( | VIEW_MODES | mode, |
| QVector2D | c1, | ||
| QVector2D | c2, | ||
| int & | nId ) |
| void Editor::nodeSelect | ( | int | nId | ) |
| void Editor::nodeSelectAll | ( | ) |
| void Editor::paste | ( | VIEW_MODES | mode, |
| QVector2D | pos ) |
Paste the copied objects, positioned relative to the last copied node.
| bool Editor::pathAdd | ( | int & | pId | ) |
| void Editor::pathDelete | ( | int | pId | ) |
| void Editor::pathDeselectAll | ( | ) |
| void Editor::pathSelect | ( | int | pId | ) |
| void Editor::pathSelectAll | ( | ) |
| void Editor::selectAll | ( | ) |
| void Editor::snapCoords | ( | QVector2D & | pos | ) |
Snap a 2D position to the active grid.
| bool Editor::speakerAdd | ( | int | node, |
| int & | aId ) |
| void Editor::speakerDelete | ( | int | aId | ) |
| void Editor::speakerDeselectAll | ( | ) |
| bool Editor::speakerFindInCircle | ( | VIEW_MODES | mode, |
| QVector2D | pos, | ||
| int & | aId ) |
| bool Editor::speakerFindInRect | ( | VIEW_MODES | mode, |
| QVector2D | c1, | ||
| QVector2D | c2, | ||
| int & | aId ) |
| void Editor::speakerSelect | ( | int | aId | ) |
| void Editor::speakerSelectAll | ( | ) |
| bool Editor::spriteAdd | ( | int | node, |
| uint16_t | texId, | ||
| int & | sId ) |
| void Editor::spriteDelete | ( | int | sId | ) |
| void Editor::spriteDeselectAll | ( | ) |
| bool Editor::spriteFindInCircle | ( | VIEW_MODES | mode, |
| QVector2D | pos, | ||
| int & | bId ) |
| bool Editor::spriteFindInRect | ( | VIEW_MODES | mode, |
| QVector2D | c1, | ||
| QVector2D | c2, | ||
| int & | bId ) |
| void Editor::spriteSelect | ( | int | sId | ) |
| void Editor::spriteSelectAll | ( | ) |
| bool Editor::staircaseAdd | ( | int | node, |
| uint16_t | texId, | ||
| int & | hId ) |
| void Editor::staircaseDelete | ( | int | hId | ) |
| void Editor::staircaseDeselectAll | ( | ) |
| bool Editor::staircaseFindInCircle | ( | VIEW_MODES | mode, |
| QVector2D | pos, | ||
| int & | hId ) |
| bool Editor::staircaseFindInRect | ( | VIEW_MODES | mode, |
| QVector2D | c1, | ||
| QVector2D | c2, | ||
| int & | hId ) |
| void Editor::staircaseSelect | ( | int | hId | ) |
| void Editor::staircaseSelectAll | ( | ) |
| bool Editor::submapAdd | ( | int | node, |
| int & | mId ) |
| void Editor::submapDelete | ( | int | mId | ) |
| void Editor::submapDeselectAll | ( | ) |
| bool Editor::submapFindInCircle | ( | VIEW_MODES | mode, |
| QVector2D | pos, | ||
| int & | mId ) |
| bool Editor::submapFindInRect | ( | VIEW_MODES | mode, |
| QVector2D | c1, | ||
| QVector2D | c2, | ||
| int & | mId ) |
| void Editor::submapSelect | ( | int | mId | ) |
| void Editor::submapSelectAll | ( | ) |
| void Editor::terminate | ( | ) |
|
static |
Project a world position onto a 2D editor view.
|
static |
Lift a 2D editor view position back to world space (ref fills the missing axis).
| bool Editor::wallAdd | ( | int | n1, |
| int | n2, | ||
| uint16_t | texId, | ||
| int & | wId ) |
| void Editor::wallDelete | ( | int | wId | ) |
| void Editor::wallDeselectAll | ( | ) |
| bool Editor::wallFindInCircle | ( | VIEW_MODES | mode, |
| QVector2D | pos, | ||
| int & | wId ) |
| bool Editor::wallFindInRect | ( | VIEW_MODES | mode, |
| QVector2D | c1, | ||
| QVector2D | c2, | ||
| int & | wId ) |
| void Editor::wallSelect | ( | int | wId | ) |
| void Editor::wallSelectAll | ( | ) |
| bool Editor::collisions |
| QList<uint16_t> Editor::copyNodeIDs |
| QList<Node> Editor::copyNodes |
| QList<Wall> Editor::copyWalls |
| Map* Editor::editedMap |
| EDIT_MODES Editor::editMode |
| Env Editor::env |
| bool Editor::gravity |
| float Editor::gridSize |
| bool Editor::gridSnap |
| Map Editor::rootMap |
| int Editor::selectedDoor |
| int Editor::selectedLift |
| int Editor::selectedLight |
| int Editor::selectedNode |
| int Editor::selectedPath |
| int Editor::selectedSpeaker |
| int Editor::selectedSprite |
| int Editor::selectedStaircase |
| int Editor::selectedSubmap |
| uint16_t Editor::selectedTextureID |
| int Editor::selectedWall |
| float Editor::viewMaxY |
| float Editor::viewMinY |
| Viewpoint Editor::viewPoint |
| bool Editor::wallSelector |
| float Editor::zoom |