载入中...
搜索中...
未找到
eve::building::PlacementSession类 参考

#include <PlacementSession.h>

Public 成员函数

 PlacementSession ()
 
 ~PlacementSession ()=default
 
 PlacementSession (const PlacementSession &)=delete
 
PlacementSessionoperator= (const PlacementSession &)=delete
 
void destroy ()
 
bool startPlacement (PlacementWorld *world, const std::string &buildingId)
 
void stopPlacement ()
 
bool isActive () const
 
PlacementWorldgetWorld () const
 
std::string getBuildingId () const
 
GhostgetGhost () 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.h13 行定义.

构造及析构函数说明

◆ PlacementSession() [1/2]

eve::building::PlacementSession::PlacementSession ( )

在文件 PlacementSession.cpp7 行定义.

◆ ~PlacementSession()

eve::building::PlacementSession::~PlacementSession ( )
default

◆ PlacementSession() [2/2]

eve::building::PlacementSession::PlacementSession ( const PlacementSession )
delete

成员函数说明

◆ destroy()

void eve::building::PlacementSession::destroy ( )

在文件 PlacementSession.cpp9 行定义.

引用了 eve::building::Ghost::destroy().

◆ execute()

int eve::building::PlacementSession::execute ( )

确认当前姿态: place -> world.placeGhost(ghost),成功返回 instanceId(0 = 失败)。 remove -> 拆除鬼影所在格(默认通道)的建筑,返回被拆 instanceId(0 = 无)。

在文件 PlacementSession.cpp92 行定义.

引用了 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.cpp29 行定义.

引用了 eve::building::Ghost::getBuildingId().

◆ getGhost()

Ghost * eve::building::PlacementSession::getGhost ( ) const
inline

在文件 PlacementSession.h28 行定义.

◆ getMode()

std::string eve::building::PlacementSession::getMode ( ) const
inline

在文件 PlacementSession.h32 行定义.

◆ getReason()

std::string eve::building::PlacementSession::getReason ( ) const

在文件 PlacementSession.cpp84 行定义.

引用了 eve::building::Ghost::getReason().

◆ getRotationDeg()

float eve::building::PlacementSession::getRotationDeg ( ) const

在文件 PlacementSession.cpp49 行定义.

引用了 eve::building::Ghost::getRotationDeg().

◆ getWorld()

PlacementWorld * eve::building::PlacementSession::getWorld ( ) const
inline

在文件 PlacementSession.h26 行定义.

◆ isActive()

bool eve::building::PlacementSession::isActive ( ) const
inline

在文件 PlacementSession.h25 行定义.

◆ isValid()

bool eve::building::PlacementSession::isValid ( ) const

在文件 PlacementSession.cpp82 行定义.

引用了 eve::building::Ghost::isValid().

◆ operator=()

PlacementSession & eve::building::PlacementSession::operator= ( const PlacementSession )
delete

◆ rotateBy()

void eve::building::PlacementSession::rotateBy ( float  deltaDeg)

在文件 PlacementSession.cpp45 行定义.

引用了 eve::building::Ghost::rotateBy().

◆ setMode()

void eve::building::PlacementSession::setMode ( const std::string &  mode)

交互模式:"place" 放置 / "remove" 拆除(默认 place)。

在文件 PlacementSession.cpp33 行定义.

◆ setRotationDeg()

void eve::building::PlacementSession::setRotationDeg ( float  deg)

在文件 PlacementSession.cpp41 行定义.

引用了 eve::building::Ghost::setRotationDeg().

◆ startPlacement()

bool eve::building::PlacementSession::startPlacement ( PlacementWorld world,
const std::string &  buildingId 
)

在文件 PlacementSession.cpp15 行定义.

引用了 eve::building::Ghost::setBuildingId().

◆ stopPlacement()

void eve::building::PlacementSession::stopPlacement ( )

在文件 PlacementSession.cpp24 行定义.

◆ updateFromSurface()

bool eve::building::PlacementSession::updateFromSurface ( PlacementWorld world,
const std::string &  surface,
float  x,
float  y 
)

通过注册表面(如 "plane")刷新鬼影并校验。

在文件 PlacementSession.cpp72 行定义.

引用了 eve::building::Ghost::setFromSurface(), x , 以及 y.

◆ updateFromWorld()

bool eve::building::PlacementSession::updateFromWorld ( PlacementWorld world,
float  worldX,
float  worldY 
)

2D:世界坐标刷新鬼影并校验。

在文件 PlacementSession.cpp53 行定义.

引用了 eve::building::Ghost::setFromWorld().

◆ updateFromWorld3D()

bool eve::building::PlacementSession::updateFromWorld3D ( PlacementWorld world,
float  worldX,
float  worldY,
float  worldZ 
)

3D:真实世界坐标刷新鬼影并校验。

在文件 PlacementSession.cpp62 行定义.

引用了 eve::building::Ghost::setFromWorld3D().


该类的文档由以下文件生成: