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

EVENGINE_API_WORLD public API. 更多...

#include <PlacementSystem.h>

类

struct  AreaCellPreview
 One requested area anchor and its deterministic validation result. 更多...
 
struct  AreaPlacement
 Atomic receipt for a committed area placement. 更多...
 
struct  AreaPreview
 Owning row-major preview for a rectangular or circular brush request. 更多...
 
struct  EdgeCurveSurface
 Owning same-identity surface frames sampled along an analytic edge curve. 更多...
 
struct  EdgeLinePlacement
 Atomic result of placing one axis-aligned continuous edge line. 更多...
 
struct  EdgePathPlacement
 Atomic result of placing one multi-segment edge path. 更多...
 
struct  EdgePathPreview
 Owning validated edge addresses for one non-mutating path preview. 更多...
 
struct  PatternPlacement
 Atomic placement receipt shared by every built-in pattern kind. 更多...
 
struct  PatternPreview
 Owning non-mutating expansion of an edge or area pattern. 更多...
 
struct  PatternRequest
 Owning, renderer-neutral request for one atomic placement pattern. 更多...
 
struct  PlacementHit
 One sampled point and orthonormal frame on a placement surface. 更多...
 
struct  SurfacePatch
 Surface samples and continuity metrics for one rotated building footprint. 更多...
 
struct  SurfacePatchSample
 One footprint-relative surface sample. 更多...
 

Public 类型

enum class  PatternKind {
  EdgeLine , EdgePath , EdgeCubicBezier , RectangleFill ,
  RectangleOutline , CircleBrush
}
 Built-in geometry families accepted by the unified placement-pattern protocol. 更多...
 
using ValidateFn = std::function< bool(const PlacementWorld &world, const PlacementQuery &q, std::string *reason)>
 
using SnapFn = std::function< SnapResult(const PlacementWorld &world, float worldX, float worldY)>
 
using ChangeHook = std::function< void(const BuildingChangeEvent &ev)>
 
using EdgeCurvePoint = EdgeCurveControlPoint
 One control point in logical grid-vertex space.
 
using SurfaceFn = std::function< bool(const PlacementWorld &world, float x, float y, PlacementHit *hit)>
 
using SurfaceProviderFn = std::function< eve::Result< PlacementHit >(const PlacementWorld &world, float x, float y)>
 Canonical surface provider contract.
 

静态 Public 成员函数

static PlacementSystem & inst ()
 Process singleton holding all PlacementSystem state.
 
static void registerValidateRule (const std::string &name, ValidateFn fn)
 
static void unregisterValidateRule (const std::string &name)
 
static bool hasValidateRule (const std::string &name)
 
static void registerSnapRule (const std::string &name, SnapFn fn)
 
static void unregisterSnapRule (const std::string &name)
 
static bool hasSnapRule (const std::string &name)
 
static void registerChangeHook (const std::string &name, ChangeHook fn)
 
static void unregisterChangeHook (const std::string &name)
 
static bool hasChangeHook (const std::string &name)
 
static void registerSurface (const std::string &name, SurfaceFn fn)
 
static void registerSurfaceProvider (const std::string &name, SurfaceProviderFn fn)
 Register or replace a structured surface provider.
 
static eve::Result< void > registerHeightfieldSurface (const std::string &name, std::shared_ptr< const HeightfieldSurface > surface)
 Register an immutable built-in heightfield and retain it until unregistration.
 
static eve::Result< void > registerStaticMeshSurface (const std::string &name, std::shared_ptr< const StaticMeshSurface > surface)
 Register an immutable BVH-accelerated triangle mesh and retain its snapshot.
 
static void unregisterSurface (const std::string &name)
 
static bool hasSurface (const std::string &name)
 
static bool surfaceHit (const PlacementWorld &world, const std::string &name, float x, float y, PlacementHit *hit)
 
static eve::Result< PlacementHit > sampleSurface (const PlacementWorld &world, const std::string &name, float x, float y)
 Sample a named placement surface.
 
static eve::Result< SurfacePatch > sampleSurfacePatch (const PlacementWorld &world, const std::string &buildingId, const std::string &surfaceName, float x, float y, float rotationDegrees=0.f)
 Sample the occupied cells of a rotated footprint relative to an exact anchor hit.
 
static std::vector< std::string > surfaceNames ()
 
static void setPlaneSurfaceHeight (float h)
 
static float getPlaneSurfaceHeight ()
 
static void ensureBuiltins ()
 确保内置规则已注册(模块首次使用时自动调用)。
 
static SnapResult snap (const PlacementWorld &world, const std::string &buildingId, float worldX, float worldY)
 
static SnapResult snap3D (const PlacementWorld &world, const std::string &buildingId, float worldX, float worldY, float worldZ)
 
static SnapResult snapWithMode (const PlacementWorld &world, const std::string &mode, float worldX, float worldY)
 
static float normalizeRotation (const std::string &buildingId, float rotationDeg)
 规范化旋转角(cardinal → 0/90/180/270;none → 0)。
 
static void effectiveFootprint (const BuildingDefinition &def, float rotationDeg, int *outW, int *outH)
 旋转后的占地宽高(cardinal 90/270 交换)。
 
static bool foreachFootprintCell (const BuildingDefinition &def, int originCellX, int originCellY, float rotationDeg, const std::function< bool(int cx, int cy)> &fn)
 枚举占地格子(旋转后局部 → 世界格子)。返回 false 若定义未知。
 
static eve::Result< EdgeAddress > canonicalEdge (int cellX, int cellY, const std::string &direction)
 Normalize a cell-relative cardinal direction to a unique edge address.
 
static bool canPlaceEdge (PlacementWorld *world, const std::string &buildingId, int cellX, int cellY, const std::string &direction, int excludeInstanceId=0, std::string *reason=nullptr, int level=std::numeric_limits< int >::min())
 Validate an edge-domain placement without mutating the world.
 
static int placeEdge (PlacementWorld *world, const std::string &buildingId, int cellX, int cellY, const std::string &direction)
 Place an edge-domain definition, returning the new instance id or zero.
 
static bool canPlaceCorner (PlacementWorld *world, const std::string &buildingId, int vertexX, int vertexY, int excludeInstanceId=0, std::string *reason=nullptr, int level=std::numeric_limits< int >::min())
 Validate a corner-domain placement at one canonical grid vertex.
 
static eve::Result< PlacedBuilding > placeCornerResult (PlacementWorld *world, const std::string &buildingId, int vertexX, int vertexY)
 Atomically place a corner-domain definition.
 
static int placeCorner (PlacementWorld *world, const std::string &buildingId, int vertexX, int vertexY)
 Compatibility-only id projection; prefer placeCornerResult in C++.
 
static bool canPlaceFree (PlacementWorld *world, const std::string &buildingId, float worldX, float worldY, int excludeInstanceId=0, std::string *reason=nullptr, int level=std::numeric_limits< int >::min(), float rotationDeg=0.f)
 Validate an exact free-domain world-plane anchor and circular or oriented-box footprint.
 
static bool containsFreePoint (const PlacedBuilding &placed, float worldX, float worldY)
 Test a world-plane point against a committed circular or oriented-box footprint.
 
static eve::Result< PlacedBuilding > placeFreeResult (PlacementWorld *world, const std::string &buildingId, float worldX, float worldY, float elevation=0.f, float rotationDeg=0.f)
 Atomically place a free-domain definition at an unsnapped world-plane anchor.
 
static eve::Result< PlacedBuilding > placeFreeSurfaceResult (PlacementWorld *world, const std::string &buildingId, const SurfacePatch &patch, float rotationDeg=0.f)
 Atomically place a free object from an owning validated surface patch snapshot.
 
static int placeFree (PlacementWorld *world, const std::string &buildingId, float worldX, float worldY, float elevation=0.f, float rotationDeg=0.f)
 Compatibility-only id projection; prefer placeFreeResult in C++.
 
static uint8_t edgeConnectionMask (const PlacementWorld &world, int instanceId)
 Compute compatible neighbouring edge topology.
 
static std::string edgeVariant (const PlacementWorld &world, int instanceId)
 Stable visual topology class: isolated/end/straight/corner/tee/cross.
 
static eve::Result< EdgeLinePlacement > placeEdgeLine (PlacementWorld *world, const std::string &buildingId, int startVertexX, int startVertexY, int endVertexX, int endVertexY)
 Atomically place every unit edge between two logical grid vertices.
 
static eve::Result< EdgePathPlacement > placeEdgePath (PlacementWorld *world, const std::string &buildingId, const std::vector< CornerAddress > &vertices)
 Atomically place every unit edge along a multi-segment orthogonal vertex path.
 
static eve::Result< EdgePathPreview > previewEdgePath (PlacementWorld *world, const std::string &buildingId, const std::vector< CornerAddress > &vertices)
 Validate and expand a multi-segment orthogonal path without mutation.
 
static eve::Result< std::vector< CornerAddress > > sampleEdgeCubicBezier (const std::vector< EdgeCurvePoint > &controlPoints, int subdivisions)
 Deterministically rasterize four cubic Bezier controls to adjacent grid vertices.
 
static eve::Result< EdgePathPreview > previewEdgeCubicBezier (PlacementWorld *world, const std::string &buildingId, const std::vector< EdgeCurvePoint > &controlPoints, int subdivisions)
 Sample and validate a cubic Bezier edge curve without mutating the world.
 
static eve::Result< EdgePathPlacement > placeEdgeCubicBezier (PlacementWorld *world, const std::string &buildingId, const std::vector< EdgeCurvePoint > &controlPoints, int subdivisions)
 Atomically place the deterministic grid-edge rasterization of a cubic Bezier.
 
static eve::Result< EdgeCurveSurface > sampleEdgeCurveSurface (const PlacementWorld &world, const std::string &surfaceName, const std::vector< EdgeCurvePoint > &controlPoints, int subdivisions)
 Sample one same-identity custom surface frame at every analytic curve segment.
 
static eve::Result< EdgePathPlacement > placeEdgeCubicBezierOnSurface (PlacementWorld *world, const std::string &buildingId, const std::vector< EdgeCurvePoint > &controlPoints, int subdivisions, const std::string &surfaceName)
 Atomically place a curve whose committed centerline follows a custom surface.
 
static eve::Result< AreaPreview > previewRectangle (PlacementWorld *world, const std::string &buildingId, int minCellX, int minCellY, int maxCellX, int maxCellY, float rotationDeg=0.f)
 Preview every anchor in an inclusive rectangular area without mutation.
 
static eve::Result< AreaPreview > previewBrush (PlacementWorld *world, const std::string &buildingId, int centerCellX, int centerCellY, int radius, float rotationDeg=0.f)
 Preview anchors inside an inclusive Euclidean cell-radius brush.
 
static eve::Result< AreaPreview > previewRectangleOutline (PlacementWorld *world, const std::string &buildingId, int minCellX, int minCellY, int maxCellX, int maxCellY, float rotationDeg=0.f)
 Preview only the perimeter anchors of an inclusive rectangle.
 
static eve::Result< AreaPlacement > placeRectangle (PlacementWorld *world, const std::string &buildingId, int minCellX, int minCellY, int maxCellX, int maxCellY, float rotationDeg=0.f)
 Atomically commit a previously shaped rectangle; any rejection aborts all cells.
 
static eve::Result< AreaPlacement > placeBrush (PlacementWorld *world, const std::string &buildingId, int centerCellX, int centerCellY, int radius, float rotationDeg=0.f)
 Atomically commit a circular brush; any rejection aborts all cells.
 
static eve::Result< AreaPlacement > placeRectangleOutline (PlacementWorld *world, const std::string &buildingId, int minCellX, int minCellY, int maxCellX, int maxCellY, float rotationDeg=0.f)
 Atomically commit only the perimeter anchors of an inclusive rectangle.
 
static eve::Result< PatternPreview > previewPattern (PlacementWorld *world, const std::string &buildingId, const PatternRequest &request)
 Expand any built-in placement pattern without mutating the world.
 
static eve::Result< PatternPlacement > placePattern (PlacementWorld *world, const std::string &buildingId, const PatternRequest &request)
 Validate and atomically commit any built-in placement pattern.
 
static bool canPlace (PlacementWorld *world, const std::string &buildingId, int cellX, int cellY, float rotationDeg=0.f, int excludeInstanceId=0, std::string *reason=nullptr)
 
static bool canPlaceElev (PlacementWorld *world, const std::string &buildingId, int cellX, int cellY, float elevation, float rotationDeg=0.f, int excludeInstanceId=0, std::string *reason=nullptr, int level=std::numeric_limits< int >::min())
 
static int placeAt (PlacementWorld *world, const std::string &buildingId, int cellX, int cellY, float rotationDeg=0.f)
 成功返回 instanceId;失败返回 0。
 
static int placeAtWorld (PlacementWorld *world, const std::string &buildingId, float worldX, float worldY, float rotationDeg=0.f)
 先吸附再放置;free/自定义 snap 会保留吸附后的世界坐标。
 
static int placeAtWorld3D (PlacementWorld *world, const std::string &buildingId, float worldX, float worldY, float worldZ, float rotationDeg=0.f)
 
static int placeGhost (PlacementWorld *world, Ghost *ghost)
 
static PlacementRestoreStatus restoreExact (PlacementWorld *world, const PlacedBuilding &placed, std::string *reason=nullptr)
 Restore an exact persistent instance for editor undo or snapshot loading.
 
static eve::Result< EdgeCurveGroup > restoreEdgeCurveGroupExact (PlacementWorld *world, const EdgeCurveGroup &group, const std::vector< PlacedBuilding > &members)
 Atomically restore an exact curve group and all of its exact-id edge members.
 
static bool removeBuilding (PlacementWorld *world, int instanceId)
 
static eve::Result< StructuralRemovalReceipt > removeBuildingCascadeResult (PlacementWorld *world, int instanceId)
 Atomically remove a support subtree in dependent-first order.
 
static int removeBuildingCascade (PlacementWorld *world, int instanceId)
 Compatibility-only count projection; prefer removeBuildingCascadeResult in C++.
 
static eve::Result< StructuralLinkRebuildReceipt > rebuildStructuralLinksResult (PlacementWorld *world)
 Atomically validate and rebuild every derived structural support link.
 
static eve::Result< PlacementEditReceipt > moveBuildingResult (PlacementWorld *world, int instanceId, int cellX, int cellY, float rotationDeg=-1.f)
 Atomically move a cell-domain instance while preserving its identity and state.
 
static eve::Result< PlacementEditReceipt > moveEdgeResult (PlacementWorld *world, int instanceId, int cellX, int cellY, const std::string &direction)
 Atomically move an edge-domain instance to a canonical grid edge.
 
static eve::Result< PlacementEditReceipt > moveCornerResult (PlacementWorld *world, int instanceId, int vertexX, int vertexY)
 Atomically move a corner-domain instance to another grid vertex.
 
static eve::Result< PlacementEditReceipt > moveFreeResult (PlacementWorld *world, int instanceId, float worldX, float worldY, float elevation, float rotationDeg)
 Atomically move a free-domain instance to an exact world-plane anchor.
 
static eve::Result< PlacementEditReceipt > moveFreeSurfaceResult (PlacementWorld *world, int instanceId, const SurfacePatch &patch, float rotationDeg)
 Atomically move a free-domain instance and replace its surface attachment.
 
static eve::Result< PlacementEditReceipt > replaceBuildingResult (PlacementWorld *world, int instanceId, const std::string &replacementBuildingId)
 Atomically replace an instance definition at its current cell or edge address.
 
static bool moveBuilding (PlacementWorld *world, int instanceId, int cellX, int cellY, float rotationDeg=-1.f)
 Compatibility projection of moveBuildingResult; prefer the Result API in C++.
 
static void clearBuildings (PlacementWorld *world)
 
static void pushEvent (BuildingChangeEvent ev)
 
static void pollEvents (std::vector< BuildingChangeEvent > &out)
 
static void clearEvents ()
 
static const std::vector< BuildingChangeEvent > & events ()
 
static int nextInstanceId ()
 

友元

class Ghost
 

详细描述

EVENGINE_API_WORLD public API.

在文件 PlacementSystem.h 第 31 行定义.

成员类型定义说明

◆ ChangeHook

using eve::building::PlacementSystem::ChangeHook = std::function<void(const BuildingChangeEvent &ev)>

在文件 PlacementSystem.h 第 38 行定义.

◆ EdgeCurvePoint

One control point in logical grid-vertex space.

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

◆ SnapFn

using eve::building::PlacementSystem::SnapFn = std::function<SnapResult(const PlacementWorld &world, float worldX, float worldY)>

在文件 PlacementSystem.h 第 35 行定义.

◆ SurfaceFn

using eve::building::PlacementSystem::SurfaceFn = std::function<bool(const PlacementWorld &world, float x, float y, PlacementHit *hit)>

放置表面:把指针坐标(2D 场景为鼠标世界坐标;3D 场景由游戏自行做 射线/高度采样后传入平面坐标)换算成真实世界命中点。 引擎只提供接口 + 内置 "plane"(Y=常数平面),物理射线 / 高度场等 表面由游戏侧按接口实现。

在文件 PlacementSystem.h 第 159 行定义.

◆ SurfaceProviderFn

Canonical surface provider contract.

返回
An owning sample or a structured diagnostic. Providers execute synchronously on the caller thread and must not retain references to world or invoke script callbacks.

在文件 PlacementSystem.h 第 166 行定义.

◆ ValidateFn

using eve::building::PlacementSystem::ValidateFn = std::function<bool(const PlacementWorld &world, const PlacementQuery &q, std::string *reason)>

在文件 PlacementSystem.h 第 33 行定义.

成员枚举类型说明

◆ PatternKind

Built-in geometry families accepted by the unified placement-pattern protocol.

枚举值
EdgeLine 
EdgePath 
EdgeCubicBezier 
RectangleFill 
RectangleOutline 
CircleBrush 

在文件 PlacementSystem.h 第 117 行定义.

成员函数说明

◆ canonicalEdge()

eve::Result< EdgeAddress > eve::building::PlacementSystem::canonicalEdge ( int  cellX,
int  cellY,
const std::string &  direction 
)
static

◆ canPlace()

bool eve::building::PlacementSystem::canPlace ( PlacementWorld *  world,
const std::string &  buildingId,
int  cellX,
int  cellY,
float  rotationDeg = 0.f,
int  excludeInstanceId = 0,
std::string *  reason = nullptr 
)
static

◆ canPlaceCorner()

bool eve::building::PlacementSystem::canPlaceCorner ( PlacementWorld *  world,
const std::string &  buildingId,
int  vertexX,
int  vertexY,
int  excludeInstanceId = 0,
std::string *  reason = nullptr,
int  level = std::numeric_limits<int>::min() 
)
static

◆ canPlaceEdge()

bool eve::building::PlacementSystem::canPlaceEdge ( PlacementWorld *  world,
const std::string &  buildingId,
int  cellX,
int  cellY,
const std::string &  direction,
int  excludeInstanceId = 0,
std::string *  reason = nullptr,
int  level = std::numeric_limits<int>::min() 
)
static

◆ canPlaceElev()

bool eve::building::PlacementSystem::canPlaceElev ( PlacementWorld *  world,
const std::string &  buildingId,
int  cellX,
int  cellY,
float  elevation,
float  rotationDeg = 0.f,
int  excludeInstanceId = 0,
std::string *  reason = nullptr,
int  level = std::numeric_limits<int>::min() 
)
static

◆ canPlaceFree()

bool eve::building::PlacementSystem::canPlaceFree ( PlacementWorld *  world,
const std::string &  buildingId,
float  worldX,
float  worldY,
int  excludeInstanceId = 0,
std::string *  reason = nullptr,
int  level = std::numeric_limits<int>::min(),
float  rotationDeg = 0.f 
)
static

◆ clearBuildings()

void eve::building::PlacementSystem::clearBuildings ( PlacementWorld *  world)
static

在文件 PlacementSystem.cpp 第 3354 行定义.

引用了 ids , 以及 world.

被这些函数引用 eve::building::PlacementWorld::clearBuildings().

◆ clearEvents()

void eve::building::PlacementSystem::clearEvents ( )
static

在文件 PlacementSystem.cpp 第 649 行定义.

被这些函数引用 eve::building::Building::clearChangeEvents().

◆ containsFreePoint()

bool eve::building::PlacementSystem::containsFreePoint ( const PlacedBuilding &  placed,
float  worldX,
float  worldY 
)
static

Test a world-plane point against a committed circular or oriented-box footprint.

在文件 PlacementSystem.cpp 第 1339 行定义.

引用了 placed.

被这些函数引用 eve::building::PlacementWorld::getFreeOccupantAtLevel().

◆ edgeConnectionMask()

uint8_t eve::building::PlacementSystem::edgeConnectionMask ( const PlacementWorld &  world,
int  instanceId 
)
static

Compute compatible neighbouring edge topology.

返回
Bits 0..5: collinear start/end, perpendicular start -/+, perpendicular end -/+.

在文件 PlacementSystem.cpp 第 1482 行定义.

引用了 eve::building::EdgeAddress::axis, channels, eve::building::BuildingDefinition::connectionGroup, edge, group, eve::building::BuildingDefinition::id, index, mask, placed, world, eve::building::EdgeAddress::x , 以及 eve::building::EdgeAddress::y.

被这些函数引用 eve::building::PlacementWorld::getEdgeConnectionMask().

◆ edgeVariant()

std::string eve::building::PlacementSystem::edgeVariant ( const PlacementWorld &  world,
int  instanceId 
)
static

Stable visual topology class: isolated/end/straight/corner/tee/cross.

在文件 PlacementSystem.cpp 第 1540 行定义.

引用了 count, mask , 以及 world.

被这些函数引用 eve::building::PlacementWorld::getEdgeVariant().

◆ effectiveFootprint()

void eve::building::PlacementSystem::effectiveFootprint ( const BuildingDefinition &  def,
float  rotationDeg,
int *  outW,
int *  outH 
)
static

◆ ensureBuiltins()

◆ events()

◆ foreachFootprintCell()

bool eve::building::PlacementSystem::foreachFootprintCell ( const BuildingDefinition &  def,
int  originCellX,
int  originCellY,
float  rotationDeg,
const std::function< bool(int cx, int cy)> &  fn 
)
static

◆ getPlaneSurfaceHeight()

float eve::building::PlacementSystem::getPlaneSurfaceHeight ( )
static

在文件 PlacementSystem.cpp 第 539 行定义.

被这些函数引用 eve::building::Building::getPlaneSurfaceHeight().

◆ hasChangeHook()

bool eve::building::PlacementSystem::hasChangeHook ( const std::string &  name)
static

在文件 PlacementSystem.cpp 第 333 行定义.

引用了 name.

◆ hasSnapRule()

bool eve::building::PlacementSystem::hasSnapRule ( const std::string &  name)
static

在文件 PlacementSystem.cpp 第 321 行定义.

引用了 ensureBuiltins() , 以及 name.

被这些函数引用 eve::building::Building::hasSnapRule().

◆ hasSurface()

bool eve::building::PlacementSystem::hasSurface ( const std::string &  name)
static

在文件 PlacementSystem.cpp 第 392 行定义.

引用了 ensureBuiltins() , 以及 name.

被这些函数引用 eve::building::Building::hasSurface().

◆ hasValidateRule()

bool eve::building::PlacementSystem::hasValidateRule ( const std::string &  name)
static

在文件 PlacementSystem.cpp 第 309 行定义.

引用了 ensureBuiltins() , 以及 name.

被这些函数引用 eve::building::Building::hasValidateRule().

◆ inst()

PlacementSystem & eve::building::PlacementSystem::inst ( )
static

Process singleton holding all PlacementSystem state.

Rules / hooks / events / counters used to live in one function-local static per accessor, which made the state invisible, non-destructible and hard to reason about across hot-reload and tests. State now lives in this single instance's members; the static API below delegates to it.

在文件 PlacementSystem.cpp 第 262 行定义.

◆ moveBuilding()

bool eve::building::PlacementSystem::moveBuilding ( PlacementWorld *  world,
int  instanceId,
int  cellX,
int  cellY,
float  rotationDeg = -1.f 
)
static

Compatibility projection of moveBuildingResult; prefer the Result API in C++.

在文件 PlacementSystem.cpp 第 2704 行定义.

引用了 world.

被这些函数引用 eve::building::PlacementWorld::moveBuilding().

◆ moveBuildingResult()

eve::Result< PlacementEditReceipt > eve::building::PlacementSystem::moveBuildingResult ( PlacementWorld *  world,
int  instanceId,
int  cellX,
int  cellY,
float  rotationDeg = -1.f 
)
static

Atomically move a cell-domain instance while preserving its identity and state.

返回
An owning before/after receipt, or a diagnostic without world/event mutation. @thread Caller-thread only; change hooks run synchronously after the commit.

在文件 PlacementSystem.cpp 第 2845 行定义.

引用了 eve::building::BuildingChangeEvent::action, eve::building::PlacementEditReceipt::after, eve::building::PlacementEditReceipt::before, eve::building::PlacedBuilding::buildingId, eve::building::BuildingChangeEvent::buildingId, eve::building::BuildingChangeEvent::cellX, eve::building::PlacementQuery::cellX, eve::building::BuildingChangeEvent::cellY, eve::building::PlacementQuery::cellY, eve::building::PlacedBuilding::channel, eve::building::BuildingChangeEvent::channel, eve::Conflict, eve::building::PlacedBuilding::elevation, eve::building::BuildingChangeEvent::elevation, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::building::BuildingChangeEvent::instanceId, eve::InvalidArgument, eve::building::PlacedBuilding::level, eve::building::PlacementQuery::level, eve::NotFound, eve::building::PlacedBuilding::originCellX, eve::building::PlacedBuilding::originCellY, eve::building::BuildingChangeEvent::otherCellX, eve::building::BuildingChangeEvent::otherCellY, eve::building::PlacedBuilding::placementKind, px, py, eve::building::PlacedBuilding::rotationDeg, eve::building::BuildingChangeEvent::rotationDeg, eve::building::PlacementQuery::rotationDeg, eve::Result< T >::success(), eve::building::PlacedBuilding::supportInstanceIds, world, eve::building::BuildingChangeEvent::worldId, eve::building::PlacedBuilding::worldX, eve::building::BuildingChangeEvent::worldX, eve::building::PlacedBuilding::worldY , 以及 eve::building::BuildingChangeEvent::worldY.

被这些函数引用 eve::building_editing::BuildingPlacementTarget::applyDomainOperation().

◆ moveCornerResult()

eve::Result< PlacementEditReceipt > eve::building::PlacementSystem::moveCornerResult ( PlacementWorld *  world,
int  instanceId,
int  vertexX,
int  vertexY 
)
static

Atomically move a corner-domain instance to another grid vertex.

返回
An owning before/after receipt, or a diagnostic without world/event mutation. @thread Caller-thread only; change hooks run synchronously after commit.

在文件 PlacementSystem.cpp 第 3013 行定义.

引用了 eve::building::BuildingChangeEvent::action, eve::building::PlacementEditReceipt::after, eve::building::PlacementEditReceipt::before, eve::Conflict, eve::building::PlacedBuilding::corner, eve::Diagnostic::error(), eve::Result< T >::failure(), found, eve::InvalidArgument, eve::NotFound, placed, required, eve::Result< T >::success(), world, eve::building::CornerAddress::x , 以及 eve::building::CornerAddress::y.

被这些函数引用 eve::building_editing::BuildingPlacementTarget::applyDomainOperation().

◆ moveEdgeResult()

eve::Result< PlacementEditReceipt > eve::building::PlacementSystem::moveEdgeResult ( PlacementWorld *  world,
int  instanceId,
int  cellX,
int  cellY,
const std::string &  direction 
)
static

◆ moveFreeResult()

eve::Result< PlacementEditReceipt > eve::building::PlacementSystem::moveFreeResult ( PlacementWorld *  world,
int  instanceId,
float  worldX,
float  worldY,
float  elevation,
float  rotationDeg 
)
static

◆ moveFreeSurfaceResult()

eve::Result< PlacementEditReceipt > eve::building::PlacementSystem::moveFreeSurfaceResult ( PlacementWorld *  world,
int  instanceId,
const SurfacePatch &  patch,
float  rotationDeg 
)
static

◆ nextInstanceId()

int eve::building::PlacementSystem::nextInstanceId ( )
static

在文件 PlacementSystem.cpp 第 640 行定义.

◆ normalizeRotation()

◆ placeAt()

int eve::building::PlacementSystem::placeAt ( PlacementWorld *  world,
const std::string &  buildingId,
int  cellX,
int  cellY,
float  rotationDeg = 0.f 
)
static

◆ placeAtWorld()

int eve::building::PlacementSystem::placeAtWorld ( PlacementWorld *  world,
const std::string &  buildingId,
float  worldX,
float  worldY,
float  rotationDeg = 0.f 
)
static

先吸附再放置;free/自定义 snap 会保留吸附后的世界坐标。

在文件 PlacementSystem.cpp 第 2295 行定义.

引用了 id, s , 以及 world.

被这些函数引用 eve::building::PlacementWorld::placeAtWorld().

◆ placeAtWorld3D()

int eve::building::PlacementSystem::placeAtWorld3D ( PlacementWorld *  world,
const std::string &  buildingId,
float  worldX,
float  worldY,
float  worldZ,
float  rotationDeg = 0.f 
)
static

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

在文件 PlacementSystem.cpp 第 2311 行定义.

引用了 id, s , 以及 world.

被这些函数引用 eve::building::PlacementWorld::placeAtWorld3D().

◆ placeBrush()

eve::Result< PlacementSystem::AreaPlacement > eve::building::PlacementSystem::placeBrush ( PlacementWorld *  world,
const std::string &  buildingId,
int  centerCellX,
int  centerCellY,
int  radius,
float  rotationDeg = 0.f 
)
static

Atomically commit a circular brush; any rejection aborts all cells.

在文件 PlacementSystem.cpp 第 2178 行定义.

引用了 eve::Result< T >::failure(), radius , 以及 world.

◆ placeCorner()

int eve::building::PlacementSystem::placeCorner ( PlacementWorld *  world,
const std::string &  buildingId,
int  vertexX,
int  vertexY 
)
static

Compatibility-only id projection; prefer placeCornerResult in C++.

在文件 PlacementSystem.cpp 第 1280 行定义.

引用了 world.

被这些函数引用 eve::building::PlacementWorld::placeCorner().

◆ placeCornerResult()

eve::Result< PlacedBuilding > eve::building::PlacementSystem::placeCornerResult ( PlacementWorld *  world,
const std::string &  buildingId,
int  vertexX,
int  vertexY 
)
static

◆ placeEdge()

int eve::building::PlacementSystem::placeEdge ( PlacementWorld *  world,
const std::string &  buildingId,
int  cellX,
int  cellY,
const std::string &  direction 
)
static

◆ placeEdgeCubicBezier()

eve::Result< PlacementSystem::EdgePathPlacement > eve::building::PlacementSystem::placeEdgeCubicBezier ( PlacementWorld *  world,
const std::string &  buildingId,
const std::vector< EdgeCurvePoint > &  controlPoints,
int  subdivisions 
)
static

Atomically place the deterministic grid-edge rasterization of a cubic Bezier.

在文件 PlacementSystem.cpp 第 1695 行定义.

引用了 eve::Result< T >::failure() , 以及 world.

◆ placeEdgeCubicBezierOnSurface()

eve::Result< PlacementSystem::EdgePathPlacement > eve::building::PlacementSystem::placeEdgeCubicBezierOnSurface ( PlacementWorld *  world,
const std::string &  buildingId,
const std::vector< EdgeCurvePoint > &  controlPoints,
int  subdivisions,
const std::string &  surfaceName 
)
static

Atomically place a curve whose committed centerline follows a custom surface.

在文件 PlacementSystem.cpp 第 1758 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument , 以及 world.

◆ placeEdgeLine()

eve::Result< PlacementSystem::EdgeLinePlacement > eve::building::PlacementSystem::placeEdgeLine ( PlacementWorld *  world,
const std::string &  buildingId,
int  startVertexX,
int  startVertexY,
int  endVertexX,
int  endVertexY 
)
static

Atomically place every unit edge between two logical grid vertices.

返回
All new instance ids, or a failure with no occupancy, instance, or event mutation.

在文件 PlacementSystem.cpp 第 1775 行定义.

引用了 eve::Result< T >::failure(), eve::building::PlacementSystem::EdgeLinePlacement::instanceIds, path, eve::Result< T >::success() , 以及 world.

◆ placeEdgePath()

eve::Result< PlacementSystem::EdgePathPlacement > eve::building::PlacementSystem::placeEdgePath ( PlacementWorld *  world,
const std::string &  buildingId,
const std::vector< CornerAddress > &  vertices 
)
static

Atomically place every unit edge along a multi-segment orthogonal vertex path.

返回
Ordered instance ids, or a diagnostic without world/event mutation. @thread Caller-thread only; hooks run synchronously after the complete commit.

在文件 PlacementSystem.cpp 第 1787 行定义.

引用了 eve::Result< T >::failure(), vertices , 以及 world.

◆ placeFree()

int eve::building::PlacementSystem::placeFree ( PlacementWorld *  world,
const std::string &  buildingId,
float  worldX,
float  worldY,
float  elevation = 0.f,
float  rotationDeg = 0.f 
)
static

Compatibility-only id projection; prefer placeFreeResult in C++.

在文件 PlacementSystem.cpp 第 1475 行定义.

引用了 elevation , 以及 world.

被这些函数引用 eve::building::PlacementWorld::placeFree().

◆ placeFreeResult()

eve::Result< PlacedBuilding > eve::building::PlacementSystem::placeFreeResult ( PlacementWorld *  world,
const std::string &  buildingId,
float  worldX,
float  worldY,
float  elevation = 0.f,
float  rotationDeg = 0.f 
)
static

◆ placeFreeSurfaceResult()

eve::Result< PlacedBuilding > eve::building::PlacementSystem::placeFreeSurfaceResult ( PlacementWorld *  world,
const std::string &  buildingId,
const SurfacePatch &  patch,
float  rotationDeg = 0.f 
)
static

Atomically place a free object from an owning validated surface patch snapshot.

在文件 PlacementSystem.cpp 第 1392 行定义.

引用了 eve::building::BuildingChangeEvent::action, eve::building::PlacementSystem::SurfacePatch::anchor, eve::building::BuildingDefinition::channel, eve::Conflict, elevation, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::building::PlacementSystem::SurfacePatch::heightDelta, eve::building::PlacedBuilding::instanceId, eve::InvalidArgument, eve::building::PlacementSystem::SurfacePatch::maxSlopeDegrees, eve::building::BuildingDefinition::maxSurfaceHeightDelta, eve::building::BuildingDefinition::maxSurfaceSlopeDegrees, eve::building::PlacementSystem::PlacementHit::normalX, eve::building::PlacementSystem::PlacementHit::normalY, eve::building::PlacementSystem::PlacementHit::normalZ, placed, eve::building::BuildingDefinition::placementKind, eve::building::PlacementSystem::SurfacePatch::samples, eve::Result< T >::success(), eve::building::PlacementSystem::PlacementHit::surfaceId, eve::building::PlacementSystem::PlacementHit::surfaceRevision, eve::building::BuildingDefinition::tags, eve::building::PlacementSystem::PlacementHit::tangentX, eve::building::PlacementSystem::PlacementHit::tangentY, eve::building::PlacementSystem::PlacementHit::tangentZ, world, eve::grid::worldToCell(), eve::building::PlacementSystem::PlacementHit::worldX, eve::building::PlacementSystem::PlacementHit::worldY, eve::building::PlacementSystem::PlacementHit::worldZ , 以及 eve::grid::XZ.

◆ placeGhost()

int eve::building::PlacementSystem::placeGhost ( PlacementWorld *  world,
Ghost *  ghost 
)
static

在文件 PlacementSystem.cpp 第 2328 行定义.

引用了 eve::building::BuildingChangeEvent::action, eve::building::PlacementSystem::SurfacePatch::anchor, eve::building::EdgeAddress::axis, eve::building::PlacementQuery::cellX, eve::building::PlacementQuery::cellY, eve::building::BuildingDefinition::channel, direction, eve::building::Ghost::getBuildingId(), eve::building::Ghost::getCellX(), eve::building::Ghost::getCellY(), eve::building::Ghost::getElevation(), eve::building::Ghost::getRotationDeg(), eve::building::Ghost::getWorldX(), eve::building::Ghost::getWorldY(), eve::building::PlacementSystem::SurfacePatch::heightDelta, eve::building::PlacedBuilding::instanceId, eve::building::PlacementQuery::level, eve::building::PlacementSystem::SurfacePatch::maxSlopeDegrees, eve::building::PlacementSystem::PlacementHit::normalX, eve::building::PlacementSystem::PlacementHit::normalY, eve::building::PlacementSystem::PlacementHit::normalZ, placed, eve::building::BuildingDefinition::placementKind, eve::building::PlacementQuery::rotationDeg, eve::building::PlacementSystem::SurfacePatch::samples, eve::building::PlacementSystem::PlacementHit::surfaceId, eve::building::PlacementSystem::PlacementHit::surfaceRevision, eve::building::BuildingDefinition::tags, eve::building::PlacementSystem::PlacementHit::tangentX, eve::building::PlacementSystem::PlacementHit::tangentY, eve::building::PlacementSystem::PlacementHit::tangentZ, eve::building::Ghost::validate(), world, eve::building::PlacementSystem::PlacementHit::worldX, eve::building::PlacementSystem::PlacementHit::worldY, eve::building::PlacementSystem::PlacementHit::worldZ, eve::building::EdgeAddress::x, eve::building::CornerAddress::x, eve::grid::XZ, eve::building::EdgeAddress::y , 以及 eve::building::CornerAddress::y.

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

◆ placePattern()

eve::Result< PlacementSystem::PatternPlacement > eve::building::PlacementSystem::placePattern ( PlacementWorld *  world,
const std::string &  buildingId,
const PatternRequest &  request 
)
static

Validate and atomically commit any built-in placement pattern.

返回
Unified preview and all committed instance ids, or no mutation on failure. @thread Caller-thread only; hooks run synchronously after the whole pattern commits.

在文件 PlacementSystem.cpp 第 2076 行定义.

引用了 eve::building::PlacementSystem::PatternPreview::area, eve::building::PlacementSystem::PatternPreview::edge, eve::Result< T >::failure(), eve::building::PlacementSystem::PatternPlacement::instanceIds, placed, eve::building::PlacementSystem::PatternRequest::points, eve::building::PlacementSystem::PatternPlacement::preview, request, eve::building::PlacementSystem::PatternPreview::request, eve::Result< T >::success() , 以及 world.

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

◆ placeRectangle()

eve::Result< PlacementSystem::AreaPlacement > eve::building::PlacementSystem::placeRectangle ( PlacementWorld *  world,
const std::string &  buildingId,
int  minCellX,
int  minCellY,
int  maxCellX,
int  maxCellY,
float  rotationDeg = 0.f 
)
static

Atomically commit a previously shaped rectangle; any rejection aborts all cells.

在文件 PlacementSystem.cpp 第 2168 行定义.

引用了 eve::Result< T >::failure() , 以及 world.

◆ placeRectangleOutline()

eve::Result< PlacementSystem::AreaPlacement > eve::building::PlacementSystem::placeRectangleOutline ( PlacementWorld *  world,
const std::string &  buildingId,
int  minCellX,
int  minCellY,
int  maxCellX,
int  maxCellY,
float  rotationDeg = 0.f 
)
static

Atomically commit only the perimeter anchors of an inclusive rectangle.

在文件 PlacementSystem.cpp 第 2186 行定义.

引用了 eve::Result< T >::failure() , 以及 world.

◆ pollEvents()

void eve::building::PlacementSystem::pollEvents ( std::vector< BuildingChangeEvent > &  out)
static

在文件 PlacementSystem.cpp 第 644 行定义.

◆ previewBrush()

eve::Result< PlacementSystem::AreaPreview > eve::building::PlacementSystem::previewBrush ( PlacementWorld *  world,
const std::string &  buildingId,
int  centerCellX,
int  centerCellY,
int  radius,
float  rotationDeg = 0.f 
)
static

Preview anchors inside an inclusive Euclidean cell-radius brush.

在文件 PlacementSystem.cpp 第 1938 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, radius, world, x , 以及 y.

被这些函数引用 eve::building_editing::BuildingPlacementTarget::makeBrush().

◆ previewEdgeCubicBezier()

eve::Result< PlacementSystem::EdgePathPreview > eve::building::PlacementSystem::previewEdgeCubicBezier ( PlacementWorld *  world,
const std::string &  buildingId,
const std::vector< EdgeCurvePoint > &  controlPoints,
int  subdivisions 
)
static

Sample and validate a cubic Bezier edge curve without mutating the world.

在文件 PlacementSystem.cpp 第 1687 行定义.

引用了 eve::Result< T >::failure(), vertices , 以及 world.

◆ previewEdgePath()

eve::Result< PlacementSystem::EdgePathPreview > eve::building::PlacementSystem::previewEdgePath ( PlacementWorld *  world,
const std::string &  buildingId,
const std::vector< CornerAddress > &  vertices 
)
static

◆ previewPattern()

eve::Result< PlacementSystem::PatternPreview > eve::building::PlacementSystem::previewPattern ( PlacementWorld *  world,
const std::string &  buildingId,
const PatternRequest &  request 
)
static

Expand any built-in placement pattern without mutating the world.

参数
worldBorrowed placement world.
buildingIdDefinition placed at every expanded anchor.
requestOwning geometry and pattern options.
返回
Complete edge/area preview or a structured validation failure.

在文件 PlacementSystem.cpp 第 1976 行定义.

引用了 a, eve::building::PlacementSystem::PatternPreview::area, area, b, eve::building::PlacementSystem::PatternPreview::edge, edge, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, message, point, request, eve::building::PlacementSystem::PatternPreview::request, eve::Result< T >::success(), vertices , 以及 world.

◆ previewRectangle()

eve::Result< PlacementSystem::AreaPreview > eve::building::PlacementSystem::previewRectangle ( PlacementWorld *  world,
const std::string &  buildingId,
int  minCellX,
int  minCellY,
int  maxCellX,
int  maxCellY,
float  rotationDeg = 0.f 
)
static

Preview every anchor in an inclusive rectangular area without mutation.

在文件 PlacementSystem.cpp 第 1926 行定义.

引用了 world, x , 以及 y.

被这些函数引用 eve::building_editing::BuildingPlacementTarget::makeRectangle().

◆ previewRectangleOutline()

eve::Result< PlacementSystem::AreaPreview > eve::building::PlacementSystem::previewRectangleOutline ( PlacementWorld *  world,
const std::string &  buildingId,
int  minCellX,
int  minCellY,
int  maxCellX,
int  maxCellY,
float  rotationDeg = 0.f 
)
static

Preview only the perimeter anchors of an inclusive rectangle.

在文件 PlacementSystem.cpp 第 1955 行定义.

引用了 world, x , 以及 y.

◆ pushEvent()

void eve::building::PlacementSystem::pushEvent ( BuildingChangeEvent  ev)
static

在文件 PlacementSystem.cpp 第 642 行定义.

◆ rebuildStructuralLinksResult()

eve::Result< StructuralLinkRebuildReceipt > eve::building::PlacementSystem::rebuildStructuralLinksResult ( PlacementWorld *  world)
static

Atomically validate and rebuild every derived structural support link.

Intended for snapshot restore and definition hot reload. Validation and link computation happen in an independently owned candidate; failure leaves the source world unchanged.

返回
Counts for the committed rebuild, or a diagnostic naming the invalid instance.

在文件 PlacementSystem.cpp 第 2789 行定义.

引用了 eve::building::StructuralLinkRebuildReceipt::changedCount, eve::Conflict, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::building::StructuralLinkRebuildReceipt::inspectedCount, eve::InvalidArgument, eve::InvariantViolation, eve::NotFound, placed, eve::Result< T >::success(), eve::building::BuildingDefinition::supportMode , 以及 world.

◆ registerChangeHook()

void eve::building::PlacementSystem::registerChangeHook ( const std::string &  name,
ChangeHook  fn 
)
static

在文件 PlacementSystem.cpp 第 326 行定义.

引用了 fn , 以及 name.

◆ registerHeightfieldSurface()

eve::Result< void > eve::building::PlacementSystem::registerHeightfieldSurface ( const std::string &  name,
std::shared_ptr< const HeightfieldSurface >  surface 
)
static

Register an immutable built-in heightfield and retain it until unregistration.

返回
Applied, or a structured validation failure without changing the registry. @thread Caller-thread only; registration must not race sampling or unregistration.

在文件 PlacementSystem.cpp 第 357 行定义.

引用了 eve::Applied, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, name, registerSurfaceProvider(), eve::Status::success(), eve::Result< T >::success(), world, x , 以及 y.

◆ registerSnapRule()

void eve::building::PlacementSystem::registerSnapRule ( const std::string &  name,
SnapFn  fn 
)
static

在文件 PlacementSystem.cpp 第 314 行定义.

引用了 fn , 以及 name.

被这些函数引用 ensureBuiltins().

◆ registerStaticMeshSurface()

eve::Result< void > eve::building::PlacementSystem::registerStaticMeshSurface ( const std::string &  name,
std::shared_ptr< const StaticMeshSurface >  surface 
)
static

Register an immutable BVH-accelerated triangle mesh and retain its snapshot.

参数
nameRegistry key used by placement and preview operations.
surfaceImmutable owning mesh snapshot retained until replacement or removal.
返回
Applied, or a structured validation failure without changing the registry. @thread Caller-thread only; registration must not race sampling or unregistration.

在文件 PlacementSystem.cpp 第 372 行定义.

引用了 eve::Applied, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, name, registerSurfaceProvider(), eve::Status::success(), eve::Result< T >::success(), world, x , 以及 y.

◆ registerSurface()

void eve::building::PlacementSystem::registerSurface ( const std::string &  name,
SurfaceFn  fn 
)
static

◆ registerSurfaceProvider()

void eve::building::PlacementSystem::registerSurfaceProvider ( const std::string &  name,
SurfaceProviderFn  fn 
)
static

Register or replace a structured surface provider.

在文件 PlacementSystem.cpp 第 352 行定义.

引用了 fn , 以及 name.

被这些函数引用 ensureBuiltins(), registerHeightfieldSurface(), registerStaticMeshSurface() , 以及 registerSurface().

◆ registerValidateRule()

void eve::building::PlacementSystem::registerValidateRule ( const std::string &  name,
ValidateFn  fn 
)
static

在文件 PlacementSystem.cpp 第 300 行定义.

引用了 fn , 以及 name.

被这些函数引用 ensureBuiltins().

◆ removeBuilding()

bool eve::building::PlacementSystem::removeBuilding ( PlacementWorld *  world,
int  instanceId 
)
static

◆ removeBuildingCascade()

int eve::building::PlacementSystem::removeBuildingCascade ( PlacementWorld *  world,
int  instanceId 
)
static

Compatibility-only count projection; prefer removeBuildingCascadeResult in C++.

在文件 PlacementSystem.cpp 第 2783 行定义.

引用了 world.

被这些函数引用 eve::building::PlacementWorld::removeBuildingCascade().

◆ removeBuildingCascadeResult()

eve::Result< StructuralRemovalReceipt > eve::building::PlacementSystem::removeBuildingCascadeResult ( PlacementWorld *  world,
int  instanceId 
)
static

Atomically remove a support subtree in dependent-first order.

返回
Owning removal receipt, or a diagnostic without world/event mutation.

在文件 PlacementSystem.cpp 第 2717 行定义.

引用了 eve::building::BuildingChangeEvent::action, eve::Conflict, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::NotFound, placed, eve::building::StructuralRemovalReceipt::removed, removed, eve::Result< T >::success(), visiting , 以及 world.

◆ replaceBuildingResult()

eve::Result< PlacementEditReceipt > eve::building::PlacementSystem::replaceBuildingResult ( PlacementWorld *  world,
int  instanceId,
const std::string &  replacementBuildingId 
)
static

Atomically replace an instance definition at its current cell or edge address.

The instance id, properties, garrison and surface attachment remain owned by the instance. Source and replacement definitions must use the same placement domain.

返回
An owning before/after receipt, or a diagnostic without world/event mutation. @thread Caller-thread only; change hooks run synchronously after the commit.

在文件 PlacementSystem.cpp 第 3221 行定义.

引用了 eve::building::BuildingChangeEvent::action, eve::building::PlacementEditReceipt::after, eve::building::EdgeAddress::axis, eve::building::PlacementEditReceipt::before, eve::building::PlacedBuilding::buildingId, eve::building::PlacementQuery::cellX, eve::building::PlacementQuery::cellY, eve::building::BuildingDefinition::channel, eve::building::PlacedBuilding::channel, channels, eve::Conflict, eve::building::PlacedBuilding::corner, direction, eve::building::PlacedBuilding::edge, eve::building::PlacedBuilding::edgeCurveGroupId, eve::building::PlacedBuilding::elevation, eve::Diagnostic::error(), eve::Result< T >::failure(), index, eve::InvalidArgument, eve::building::PlacedBuilding::level, eve::building::PlacementQuery::level, eve::NotFound, eve::building::PlacedBuilding::originCellX, eve::building::PlacedBuilding::originCellY, eve::building::BuildingDefinition::placementKind, eve::building::PlacedBuilding::placementKind, required, eve::building::PlacedBuilding::rotationDeg, eve::building::PlacementQuery::rotationDeg, eve::Result< T >::success(), eve::building::PlacedBuilding::supportInstanceIds, eve::building::BuildingDefinition::tags, eve::building::PlacedBuilding::tags, world, eve::building::PlacedBuilding::worldX, eve::building::PlacedBuilding::worldY, eve::building::EdgeAddress::x, eve::building::CornerAddress::x, eve::building::EdgeAddress::y , 以及 eve::building::CornerAddress::y.

被这些函数引用 eve::building_editing::BuildingPlacementTarget::applyDomainOperation().

◆ restoreEdgeCurveGroupExact()

eve::Result< EdgeCurveGroup > eve::building::PlacementSystem::restoreEdgeCurveGroupExact ( PlacementWorld *  world,
const EdgeCurveGroup &  group,
const std::vector< PlacedBuilding > &  members 
)
static

◆ restoreExact()

PlacementRestoreStatus eve::building::PlacementSystem::restoreExact ( PlacementWorld *  world,
const PlacedBuilding &  placed,
std::string *  reason = nullptr 
)
static

Restore an exact persistent instance for editor undo or snapshot loading.

参数
worldDestination placement world.
placedComplete instance value with a positive unused instance id.
reasonOptional validation failure token.
返回
Restored when validation passed and the exact id/pose was restored; otherwise Rejected.

在文件 PlacementSystem.cpp 第 2423 行定义.

引用了 eve::building::BuildingChangeEvent::action, eve::building::EdgeAddress::axis, eve::building::PlacedBuilding::buildingId, eve::building::PlacementQuery::cellX, eve::building::PlacementQuery::cellY, eve::building::BuildingDefinition::channel, eve::building::PlacedBuilding::channel, channels, eve::building::PlacedBuilding::corner, direction, eve::building::PlacedBuilding::edge, eve::building::PlacedBuilding::edgeCurveGroupId, eve::building::PlacedBuilding::elevation, index, eve::building::PlacedBuilding::instanceId, eve::building::PlacedBuilding::level, eve::building::PlacementQuery::level, eve::building::PlacedBuilding::originCellX, eve::building::PlacedBuilding::originCellY, placed, eve::building::BuildingDefinition::placementKind, eve::building::PlacedBuilding::placementKind, required, rotation, eve::building::PlacedBuilding::rotationDeg, eve::building::PlacementQuery::rotationDeg, eve::building::PlacedBuilding::supportInstanceIds, eve::building::BuildingDefinition::tags, eve::building::PlacedBuilding::tags, eve::building::EdgeCurveGroupId::value, world, eve::grid::worldToCell(), eve::building::PlacedBuilding::worldX, eve::building::PlacedBuilding::worldY, eve::building::EdgeAddress::x, eve::building::CornerAddress::x, eve::building::EdgeAddress::y , 以及 eve::building::CornerAddress::y.

被这些函数引用 eve::building_editing::BuildingPlacementTarget::applyDomainOperation().

◆ sampleEdgeCubicBezier()

eve::Result< std::vector< CornerAddress > > eve::building::PlacementSystem::sampleEdgeCubicBezier ( const std::vector< EdgeCurvePoint > &  controlPoints,
int  subdivisions 
)
static

Deterministically rasterize four cubic Bezier controls to adjacent grid vertices.

返回
An owning vertex path, or InvalidArgument for invalid controls/subdivision limits.

在文件 PlacementSystem.cpp 第 1610 行定义.

引用了 cursor, eve::Diagnostic::error(), eve::Result< T >::failure(), first, eve::InvalidArgument, point, eve::Result< T >::success(), t, target, u, vertices, x , 以及 y.

◆ sampleEdgeCurveSurface()

◆ sampleSurface()

eve::Result< PlacementSystem::PlacementHit > eve::building::PlacementSystem::sampleSurface ( const PlacementWorld &  world,
const std::string &  name,
float  x,
float  y 
)
static

Sample a named placement surface.

返回
Owning hit data, or NotFound/Rejected with a stable diagnostic. @thread Caller-thread only; provider registration must not race sampling.

在文件 PlacementSystem.cpp 第 407 行定义.

引用了 end, ensureBuiltins(), eve::Diagnostic::error(), eve::Result< T >::failure(), hit, eve::InvalidArgument, name, eve::NotFound, eve::Result< T >::success(), world, x , 以及 y.

被这些函数引用 eve::building_editing::BuildingPlacementTarget::edgeCubicBezierGizmo(), sampleSurfacePatch() , 以及 surfaceHit().

◆ sampleSurfacePatch()

eve::Result< PlacementSystem::SurfacePatch > eve::building::PlacementSystem::sampleSurfacePatch ( const PlacementWorld &  world,
const std::string &  buildingId,
const std::string &  surfaceName,
float  x,
float  y,
float  rotationDegrees = 0.f 
)
static

◆ setPlaneSurfaceHeight()

void eve::building::PlacementSystem::setPlaneSurfaceHeight ( float  h)
static

内置 "plane" 表面的常量高度(默认 0)。

在文件 PlacementSystem.cpp 第 537 行定义.

引用了 h.

被这些函数引用 eve::building::Building::setPlaneSurfaceHeight().

◆ snap()

SnapResult eve::building::PlacementSystem::snap ( const PlacementWorld &  world,
const std::string &  buildingId,
float  worldX,
float  worldY 
)
static

◆ snap3D()

SnapResult eve::building::PlacementSystem::snap3D ( const PlacementWorld &  world,
const std::string &  buildingId,
float  worldX,
float  worldY,
float  worldZ 
)
static

3D 版本:按世界平面轴把 (wx, wy, wz) 映射到网格平面坐标再吸附。

在文件 PlacementSystem.cpp 第 687 行定义.

引用了 px, py, s, snap(), world , 以及 eve::grid::XZ.

被这些函数引用 eve::building::Ghost::setFromWorld3D().

◆ snapWithMode()

SnapResult eve::building::PlacementSystem::snapWithMode ( const PlacementWorld &  world,
const std::string &  mode,
float  worldX,
float  worldY 
)
static

在文件 PlacementSystem.cpp 第 660 行定义.

引用了 eve::building::SnapResult::cellX, ensureBuiltins(), r , 以及 world.

被这些函数引用 snap().

◆ surfaceHit()

bool eve::building::PlacementSystem::surfaceHit ( const PlacementWorld &  world,
const std::string &  name,
float  x,
float  y,
PlacementHit *  hit 
)
static

在文件 PlacementSystem.cpp 第 397 行定义.

引用了 hit, name, sampleSurface(), world, x , 以及 y.

◆ surfaceNames()

std::vector< std::string > eve::building::PlacementSystem::surfaceNames ( )
static

在文件 PlacementSystem.cpp 第 529 行定义.

引用了 ensureBuiltins() , 以及 size.

被这些函数引用 eve::building::Building::getSurfaceCount() , 以及 eve::building::Building::getSurfaceName().

◆ unregisterChangeHook()

void eve::building::PlacementSystem::unregisterChangeHook ( const std::string &  name)
static

在文件 PlacementSystem.cpp 第 331 行定义.

引用了 name.

◆ unregisterSnapRule()

void eve::building::PlacementSystem::unregisterSnapRule ( const std::string &  name)
static

在文件 PlacementSystem.cpp 第 319 行定义.

引用了 name.

◆ unregisterSurface()

void eve::building::PlacementSystem::unregisterSurface ( const std::string &  name)
static

在文件 PlacementSystem.cpp 第 387 行定义.

引用了 name.

◆ unregisterValidateRule()

void eve::building::PlacementSystem::unregisterValidateRule ( const std::string &  name)
static

在文件 PlacementSystem.cpp 第 305 行定义.

引用了 name.

友元及相关函数文档

◆ Ghost

friend class Ghost
friend

在文件 PlacementSystem.h 第 519 行定义.


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