#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()
|
default |
◆ ~Ghost()
|
default |
成员函数说明
◆ destroy()
| void eve::building::Ghost::destroy | ( | ) |
◆ getBuildingId()
|
inline |
◆ getCellX()
|
inline |
◆ getCellY()
|
inline |
◆ getElevation()
|
inline |
◆ getReason()
|
inline |
◆ getRotationDeg()
|
inline |
◆ getWorldX()
|
inline |
◆ getWorldY()
|
inline |
◆ isValid()
|
inline |
◆ rotateBy()
| void eve::building::Ghost::rotateBy | ( | float | deltaDeg | ) |
◆ setBuildingId()
| void eve::building::Ghost::setBuildingId | ( | const std::string & | id | ) |
◆ setCell()
◆ setElevation()
◆ setFromSurface()
| void eve::building::Ghost::setFromSurface | ( | PlacementWorld * | world, |
| const std::string & | surface, | ||
| float | x, | ||
| float | y | ||
| ) |
通过注册的放置表面(如内置 "plane")刷新位姿。
引用了 setFromWorld3D(), eve::building::PlacementSystem::surfaceHit(), eve::building::PlacementSystem::PlacementHit::worldX, eve::building::PlacementSystem::PlacementHit::worldY, eve::building::PlacementSystem::PlacementHit::worldZ, x , 以及 y.
被这些函数引用 eve::building::PlacementSession::updateFromSurface().
◆ setFromWorld()
| void eve::building::Ghost::setFromWorld | ( | PlacementWorld * | world, |
| float | worldX, | ||
| float | worldY | ||
| ) |
按世界吸附模式,从世界坐标刷新格子与世界位姿。
引用了 s , 以及 eve::building::PlacementSystem::snap().
◆ setFromWorld3D()
| void eve::building::Ghost::setFromWorld3D | ( | PlacementWorld * | world, |
| float | worldX, | ||
| float | worldY, | ||
| float | worldZ | ||
| ) |
3D 版本:真实世界坐标 (wx, wy, wz),按世界平面轴映射后吸附。
引用了 s , 以及 eve::building::PlacementSystem::snap3D().
被这些函数引用 setFromSurface() , 以及 eve::building::PlacementSession::updateFromWorld3D().
◆ setRotationDeg()
| void eve::building::Ghost::setRotationDeg | ( | float | deg | ) |
被这些函数引用 rotateBy() , 以及 eve::building::PlacementSession::setRotationDeg().
◆ setWorld()
◆ validate()
| bool eve::building::Ghost::validate | ( | PlacementWorld * | world | ) |
对当前姿态做校验,写入 valid_/reason_。
引用了 eve::building::PlacementSystem::canPlaceElev() , 以及 eve::building::PlacementSystem::normalizeRotation().
友元及相关函数文档
◆ PlacementSystem
|
friend |
该类的文档由以下文件生成: