#include <PlacementSession.h>
Public 成员函数 | |
| PlacementSession () | |
| ~PlacementSession ()=default | |
| PlacementSession (const PlacementSession &)=delete | |
| PlacementSession & | operator= (const PlacementSession &)=delete |
| void | destroy () |
| bool | startPlacement (PlacementWorld *world, const std::string &buildingId) |
| void | stopPlacement () |
| bool | isActive () const |
| PlacementWorld * | getWorld () const |
| std::string | getBuildingId () const |
| Ghost * | getGhost () const |
| void | setMode (const std::string &mode) |
| std::string | getMode () const |
| void | setRotationDeg (float deg) |
| void | rotateBy (float deltaDeg) |
| float | getRotationDeg () const |
| bool | updateFromWorld (PlacementWorld *world, float worldX, float worldY) |
| bool | updateFromWorld3D (PlacementWorld *world, float worldX, float worldY, float worldZ) |
| bool | updateFromSurface (PlacementWorld *world, const std::string &surface, float x, float y) |
| bool | isValid () const |
| std::string | getReason () const |
| int | execute () |
详细描述
在文件 PlacementSession.h 第 13 行定义.
构造及析构函数说明
◆ PlacementSession() [1/2]
| eve::building::PlacementSession::PlacementSession | ( | ) |
在文件 PlacementSession.cpp 第 7 行定义.
◆ ~PlacementSession()
|
default |
◆ PlacementSession() [2/2]
|
delete |
成员函数说明
◆ destroy()
| void eve::building::PlacementSession::destroy | ( | ) |
在文件 PlacementSession.cpp 第 9 行定义.
◆ execute()
| int eve::building::PlacementSession::execute | ( | ) |
确认当前姿态: place -> world.placeGhost(ghost),成功返回 instanceId(0 = 失败)。 remove -> 拆除鬼影所在格(默认通道)的建筑,返回被拆 instanceId(0 = 无)。
在文件 PlacementSession.cpp 第 92 行定义.
引用了 eve::building::Ghost::getCellX(), eve::building::Ghost::getCellY(), eve::building::PlacementWorld::getOccupant(), eve::building::PlacementWorld::placeGhost() , 以及 eve::building::PlacementWorld::removeBuilding().
◆ getBuildingId()
| std::string eve::building::PlacementSession::getBuildingId | ( | ) | const |
在文件 PlacementSession.cpp 第 29 行定义.
◆ getGhost()
|
inline |
在文件 PlacementSession.h 第 28 行定义.
◆ getMode()
|
inline |
在文件 PlacementSession.h 第 32 行定义.
◆ getReason()
| std::string eve::building::PlacementSession::getReason | ( | ) | const |
在文件 PlacementSession.cpp 第 84 行定义.
◆ getRotationDeg()
| float eve::building::PlacementSession::getRotationDeg | ( | ) | const |
在文件 PlacementSession.cpp 第 49 行定义.
◆ getWorld()
|
inline |
在文件 PlacementSession.h 第 26 行定义.
◆ isActive()
|
inline |
在文件 PlacementSession.h 第 25 行定义.
◆ isValid()
| bool eve::building::PlacementSession::isValid | ( | ) | const |
在文件 PlacementSession.cpp 第 82 行定义.
◆ operator=()
|
delete |
◆ rotateBy()
| void eve::building::PlacementSession::rotateBy | ( | float | deltaDeg | ) |
在文件 PlacementSession.cpp 第 45 行定义.
◆ setMode()
| void eve::building::PlacementSession::setMode | ( | const std::string & | mode | ) |
交互模式:"place" 放置 / "remove" 拆除(默认 place)。
在文件 PlacementSession.cpp 第 33 行定义.
◆ setRotationDeg()
| void eve::building::PlacementSession::setRotationDeg | ( | float | deg | ) |
在文件 PlacementSession.cpp 第 41 行定义.
◆ startPlacement()
| bool eve::building::PlacementSession::startPlacement | ( | PlacementWorld * | world, |
| const std::string & | buildingId | ||
| ) |
在文件 PlacementSession.cpp 第 15 行定义.
◆ stopPlacement()
| void eve::building::PlacementSession::stopPlacement | ( | ) |
在文件 PlacementSession.cpp 第 24 行定义.
◆ updateFromSurface()
| bool eve::building::PlacementSession::updateFromSurface | ( | PlacementWorld * | world, |
| const std::string & | surface, | ||
| float | x, | ||
| float | y | ||
| ) |
通过注册表面(如 "plane")刷新鬼影并校验。
在文件 PlacementSession.cpp 第 72 行定义.
引用了 eve::building::Ghost::setFromSurface(), x , 以及 y.
◆ updateFromWorld()
| bool eve::building::PlacementSession::updateFromWorld | ( | PlacementWorld * | world, |
| float | worldX, | ||
| float | worldY | ||
| ) |
◆ updateFromWorld3D()
| bool eve::building::PlacementSession::updateFromWorld3D | ( | PlacementWorld * | world, |
| float | worldX, | ||
| float | worldY, | ||
| float | worldZ | ||
| ) |
该类的文档由以下文件生成:
- src/modules/building/PlacementSession.h
- src/modules/building/PlacementSession.cpp