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

#include <Ghost.h>

Public 成员函数

 Ghost ()=default
 
 ~Ghost ()=default
 
void destroy ()
 
std::string getBuildingId () const
 
void setBuildingId (const std::string &id)
 
int getCellX () const
 
int getCellY () const
 
void setCell (int cellX, int cellY)
 
float getWorldX () const
 
float getWorldY () const
 
void setWorld (float worldX, float worldY)
 
float getElevation () const
 
void setElevation (float elevation)
 
float getRotationDeg () const
 
void setRotationDeg (float deg)
 
void rotateBy (float deltaDeg)
 
bool isValid () const
 
std::string getReason () const
 
void setFromWorld (PlacementWorld *world, float worldX, float worldY)
 按世界吸附模式,从世界坐标刷新格子与世界位姿。
 
void setFromWorld3D (PlacementWorld *world, float worldX, float worldY, float worldZ)
 
void setFromSurface (PlacementWorld *world, const std::string &surface, float x, float y)
 
bool validate (PlacementWorld *world)
 对当前姿态做校验,写入 valid_/reason_。
 

友元

class PlacementSystem
 

详细描述

在文件 Ghost.h13 行定义.

构造及析构函数说明

◆ Ghost()

eve::building::Ghost::Ghost ( )
default

◆ ~Ghost()

eve::building::Ghost::~Ghost ( )
default

成员函数说明

◆ destroy()

void eve::building::Ghost::destroy ( )

在文件 Ghost.cpp7 行定义.

被这些函数引用 eve::building::PlacementSession::destroy().

◆ getBuildingId()

std::string eve::building::Ghost::getBuildingId ( ) const
inline

◆ getCellX()

int eve::building::Ghost::getCellX ( ) const
inline

◆ getCellY()

int eve::building::Ghost::getCellY ( ) const
inline

◆ getElevation()

float eve::building::Ghost::getElevation ( ) const
inline

◆ getReason()

std::string eve::building::Ghost::getReason ( ) const
inline

在文件 Ghost.h38 行定义.

被这些函数引用 eve::building::PlacementSession::getReason().

◆ getRotationDeg()

float eve::building::Ghost::getRotationDeg ( ) const
inline

◆ getWorldX()

float eve::building::Ghost::getWorldX ( ) const
inline

◆ getWorldY()

float eve::building::Ghost::getWorldY ( ) const
inline

◆ isValid()

bool eve::building::Ghost::isValid ( ) const
inline

在文件 Ghost.h37 行定义.

被这些函数引用 eve::building::PlacementSession::isValid() , 以及 eve::buildingfx::BuildingFx::updateGhost().

◆ rotateBy()

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

在文件 Ghost.cpp41 行定义.

引用了 setRotationDeg().

被这些函数引用 eve::building::PlacementSession::rotateBy().

◆ setBuildingId()

void eve::building::Ghost::setBuildingId ( const std::string &  id)

在文件 Ghost.cpp9 行定义.

引用了 id.

被这些函数引用 eve::building::PlacementSession::startPlacement().

◆ setCell()

void eve::building::Ghost::setCell ( int  cellX,
int  cellY 
)

在文件 Ghost.cpp15 行定义.

◆ setElevation()

void eve::building::Ghost::setElevation ( float  elevation)

在文件 Ghost.cpp29 行定义.

◆ setFromSurface()

void eve::building::Ghost::setFromSurface ( PlacementWorld world,
const std::string &  surface,
float  x,
float  y 
)

◆ setFromWorld()

void eve::building::Ghost::setFromWorld ( PlacementWorld world,
float  worldX,
float  worldY 
)

按世界吸附模式,从世界坐标刷新格子与世界位姿。

在文件 Ghost.cpp45 行定义.

引用了 s , 以及 eve::building::PlacementSystem::snap().

被这些函数引用 eve::building::PlacementSession::updateFromWorld().

◆ setFromWorld3D()

void eve::building::Ghost::setFromWorld3D ( PlacementWorld world,
float  worldX,
float  worldY,
float  worldZ 
)

3D 版本:真实世界坐标 (wx, wy, wz),按世界平面轴映射后吸附。

在文件 Ghost.cpp57 行定义.

引用了 s , 以及 eve::building::PlacementSystem::snap3D().

被这些函数引用 setFromSurface() , 以及 eve::building::PlacementSession::updateFromWorld3D().

◆ setRotationDeg()

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

在文件 Ghost.cpp35 行定义.

被这些函数引用 rotateBy() , 以及 eve::building::PlacementSession::setRotationDeg().

◆ setWorld()

void eve::building::Ghost::setWorld ( float  worldX,
float  worldY 
)

在文件 Ghost.cpp22 行定义.

◆ validate()

bool eve::building::Ghost::validate ( PlacementWorld world)

对当前姿态做校验,写入 valid_/reason_。

在文件 Ghost.cpp80 行定义.

引用了 eve::building::PlacementSystem::canPlaceElev() , 以及 eve::building::PlacementSystem::normalizeRotation().

被这些函数引用 eve::building::PlacementSystem::placeGhost().

友元及相关函数文档

◆ PlacementSystem

friend class PlacementSystem
friend

在文件 Ghost.h50 行定义.


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