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

EVENGINE_API_WORLD public API. 更多...

#include <Ghost.h>

Public 成员函数

 Ghost ()=default
 Ghost.
 
 ~Ghost ()=default
 Ghost.
 
void destroy ()
 Destroys .
 
std::string getBuildingId () const
 Returns the building id.
 
void setBuildingId (const std::string &id)
 Sets the building id.
 
int getCellX () const
 Returns the cell x.
 
int getCellY () const
 Returns the cell y.
 
void setCell (int cellX, int cellY)
 Sets the cell.
 
float getWorldX () const
 Returns the world x.
 
float getWorldY () const
 Returns the world y.
 
void setWorld (float worldX, float worldY)
 Sets the world.
 
float getElevation () const
 Returns the elevation.
 
void setElevation (float elevation)
 Sets the elevation.
 
float getRotationDeg () const
 Returns the rotation deg.
 
void setRotationDeg (float deg)
 Sets the rotation deg.
 
void rotateBy (float deltaDeg)
 Rotate by.
 
std::string getPlacementKind () const
 Current placement domain (cell, edge, corner, or free).
 
std::string getEdgeAxis () const
 Canonical edge axis (horizontal/vertical), empty for cell ghosts.
 
void setEdge (PlacementWorld *world, int cellX, int cellY, const std::string &direction)
 Snap this ghost to a canonicalized cell edge and its exact midpoint pose.
 
void setCorner (PlacementWorld *world, int vertexX, int vertexY)
 Snap this ghost to one canonical grid vertex.
 
void setFree (PlacementWorld *world, float worldX, float worldY, float elevation=0.f)
 Set an exact unsnapped world-plane anchor for a free-domain definition.
 
bool isValid () const
 True when valid.
 
std::string getReason () const
 Returns the reason.
 
std::string getSurfaceId () const
 Surface identity captured by the last successful setFromSurface call.
 
int64_t getSurfaceRevision () const
 Surface revision captured by the last successful setFromSurface call.
 
float getSurfaceNormalX () const
 X component of the captured unit surface normal.
 
float getSurfaceNormalY () const
 Y component of the captured unit surface normal.
 
float getSurfaceNormalZ () const
 Z component of the captured unit surface normal.
 
float getSurfaceTangentX () const
 X component of the captured unit surface tangent.
 
float getSurfaceTangentY () const
 Y component of the captured unit surface tangent.
 
float getSurfaceTangentZ () const
 Z component of the captured unit surface tangent.
 
int getSurfaceSampleCount () const
 Number of occupied footprint cells sampled in the current patch.
 
float getSurfaceMaxSlopeDegrees () const
 Maximum sampled slope relative to the grid-plane up axis.
 
float getSurfaceHeightDelta () const
 Sampled elevation range across the complete footprint.
 
void setFromWorld (PlacementWorld *world, float worldX, float worldY)
 按世界吸附模式,从世界坐标刷新格子与世界位姿。
 
void setFromWorld3D (PlacementWorld *world, float worldX, float worldY, float worldZ)
 Sets the from world 3 d.
 
void setFromSurface (PlacementWorld *world, const std::string &surface, float x, float y)
 Sets the from surface.
 
bool validate (PlacementWorld *world)
 对当前姿态做校验,写入 valid_/reason_。
 

友元

class PlacementSystem
 

详细描述

EVENGINE_API_WORLD public API.

在文件 Ghost.h 第 16 行定义.

构造及析构函数说明

◆ Ghost()

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

◆ ~Ghost()

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

成员函数说明

◆ destroy()

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

Destroys .

在文件 Ghost.cpp 第 11 行定义.

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

◆ getBuildingId()

◆ getCellX()

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

◆ getCellY()

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

◆ getEdgeAxis()

std::string eve::building::Ghost::getEdgeAxis ( ) const

Canonical edge axis (horizontal/vertical), empty for cell ghosts.

在文件 Ghost.cpp 第 157 行定义.

引用了 eve::building::EdgeAddress::axis , 以及 eve::building::Horizontal.

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

◆ getElevation()

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

Returns the elevation.

在文件 Ghost.h 第 45 行定义.

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

◆ getPlacementKind()

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

Current placement domain (cell, edge, corner, or free).

在文件 Ghost.h 第 56 行定义.

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

◆ getReason()

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

Returns the reason.

在文件 Ghost.h 第 69 行定义.

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

◆ getRotationDeg()

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

◆ getSurfaceHeightDelta()

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

Sampled elevation range across the complete footprint.

在文件 Ghost.h 第 91 行定义.

◆ getSurfaceId()

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

Surface identity captured by the last successful setFromSurface call.

在文件 Ghost.h 第 71 行定义.

被这些函数引用 eve::buildingfx::BuildingFx::updateGhost().

◆ getSurfaceMaxSlopeDegrees()

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

Maximum sampled slope relative to the grid-plane up axis.

在文件 Ghost.h 第 89 行定义.

◆ getSurfaceNormalX()

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

X component of the captured unit surface normal.

在文件 Ghost.h 第 75 行定义.

被这些函数引用 eve::buildingfx::BuildingFx::updateGhost().

◆ getSurfaceNormalY()

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

Y component of the captured unit surface normal.

在文件 Ghost.h 第 77 行定义.

被这些函数引用 eve::buildingfx::BuildingFx::updateGhost().

◆ getSurfaceNormalZ()

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

Z component of the captured unit surface normal.

在文件 Ghost.h 第 79 行定义.

被这些函数引用 eve::buildingfx::BuildingFx::updateGhost().

◆ getSurfaceRevision()

int64_t eve::building::Ghost::getSurfaceRevision ( ) const
inline

Surface revision captured by the last successful setFromSurface call.

在文件 Ghost.h 第 73 行定义.

◆ getSurfaceSampleCount()

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

Number of occupied footprint cells sampled in the current patch.

在文件 Ghost.h 第 87 行定义.

◆ getSurfaceTangentX()

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

X component of the captured unit surface tangent.

在文件 Ghost.h 第 81 行定义.

被这些函数引用 eve::buildingfx::BuildingFx::updateGhost().

◆ getSurfaceTangentY()

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

Y component of the captured unit surface tangent.

在文件 Ghost.h 第 83 行定义.

被这些函数引用 eve::buildingfx::BuildingFx::updateGhost().

◆ getSurfaceTangentZ()

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

Z component of the captured unit surface tangent.

在文件 Ghost.h 第 85 行定义.

被这些函数引用 eve::buildingfx::BuildingFx::updateGhost().

◆ getWorldX()

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

◆ getWorldY()

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

◆ isValid()

◆ rotateBy()

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

Rotate by.

在文件 Ghost.cpp 第 101 行定义.

引用了 setRotationDeg().

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

◆ setBuildingId()

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

Sets the building id.

在文件 Ghost.cpp 第 13 行定义.

引用了 id.

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

◆ setCell()

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

Sets the cell.

在文件 Ghost.cpp 第 33 行定义.

◆ setCorner()

void eve::building::Ghost::setCorner ( PlacementWorld *  world,
int  vertexX,
int  vertexY 
)

Snap this ghost to one canonical grid vertex.

在文件 Ghost.cpp 第 190 行定义.

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

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

◆ setEdge()

void eve::building::Ghost::setEdge ( PlacementWorld *  world,
int  cellX,
int  cellY,
const std::string &  direction 
)

◆ setElevation()

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

Sets the elevation.

在文件 Ghost.cpp 第 75 行定义.

引用了 elevation.

◆ setFree()

void eve::building::Ghost::setFree ( PlacementWorld *  world,
float  worldX,
float  worldY,
float  elevation = 0.f 
)

Set an exact unsnapped world-plane anchor for a free-domain definition.

在文件 Ghost.cpp 第 207 行定义.

引用了 elevation, eve::building::PlacementSystem::normalizeRotation(), world , 以及 eve::grid::worldToCell().

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

◆ 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.cpp 第 105 行定义.

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

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

◆ setFromWorld3D()

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

Sets the from world 3 d.

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

在文件 Ghost.cpp 第 131 行定义.

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

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

◆ setRotationDeg()

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

Sets the rotation deg.

在文件 Ghost.cpp 第 94 行定义.

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

◆ setWorld()

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

Sets the world.

在文件 Ghost.cpp 第 54 行定义.

◆ validate()

友元及相关函数文档

◆ PlacementSystem

friend class PlacementSystem
friend

在文件 Ghost.h 第 105 行定义.


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