载入中...
搜索中...
未找到
eve::archspace::SpaceQuery类 参考

Presentation-agnostic query facade over an ArchSpace document. 更多...

#include <ArchSpaceQuery.h>

Public 成员函数

 SpaceQuery (const Document &document) noexcept
 Bind to an existing document. @ownership Non-owning borrow of document; caller retains ownership. @lifetime Must outlive every SpaceQuery call on this instance.
 
TopologyKind topology () const noexcept
 Document topology dialect.
 
std::vector< std::string > strata () const
 Level (stratum) ids in document iteration order.
 
std::vector< SpaceRegion > regions () const
 All Zone regions as SpaceRegion snapshots.
 
std::optional< SpaceRegion > regionAt (Vec2 xz, const std::string &levelId) const
 First region whose polygon contains the XZ point on the given level.
 
std::vector< SpacePortal > portals () const
 Wall openings and level portals as SpacePortal snapshots.
 
std::vector< SpacePortal > portalsFrom (const std::string &regionId) const
 Portals that touch the given region id.
 
eve::Result< bool > regionsConnected (const std::string &regionAId, const std::string &regionBId) const
 Whether two regions share a portal path (undirected, same connected component).
 
std::vector< SpaceAnchor > anchorsIn (const std::string &regionId) const
 Item anchors whose position lies inside the region polygon (same level).
 

详细描述

Presentation-agnostic query facade over an ArchSpace document.

@ownership Borrows the document; does not own or mutate it. @lifetime Valid while the borrowed document remains alive and is not mutated. @thread Owner thread only. @cost Building a SpaceQuery is O(nodes). Individual queries are O(regions) or BFS over the portal graph unless noted.

在文件 ArchSpaceQuery.h 第 24 行定义.

构造及析构函数说明

◆ SpaceQuery()

eve::archspace::SpaceQuery::SpaceQuery ( const Document &  document)
explicitnoexcept

Bind to an existing document. @ownership Non-owning borrow of document; caller retains ownership. @lifetime Must outlive every SpaceQuery call on this instance.

在文件 ArchSpaceQuery.cpp 第 114 行定义.

成员函数说明

◆ anchorsIn()

◆ portals()

std::vector< SpacePortal > eve::archspace::SpaceQuery::portals ( ) const

Wall openings and level portals as SpacePortal snapshots.

在文件 ArchSpaceQuery.cpp 第 149 行定义.

引用了 node, eve::archspace::Document::nodes(), eve::archspace::Opening, out , 以及 eve::archspace::Portal.

被这些函数引用 portalsFrom() , 以及 regionsConnected().

◆ portalsFrom()

std::vector< SpacePortal > eve::archspace::SpaceQuery::portalsFrom ( const std::string &  regionId) const

Portals that touch the given region id.

在文件 ArchSpaceQuery.cpp 第 162 行定义.

引用了 out , 以及 portals().

◆ regionAt()

std::optional< SpaceRegion > eve::archspace::SpaceQuery::regionAt ( Vec2  xz,
const std::string &  levelId 
) const

First region whose polygon contains the XZ point on the given level.

返回
Region snapshot, or nullopt when none match. @cost O(regions on level) point-in-polygon tests.

在文件 ArchSpaceQuery.cpp 第 139 行定义.

引用了 node, eve::archspace::Document::nodes(), eve::archspace::Vec2::x, eve::archspace::Vec2::z , 以及 eve::archspace::Zone.

◆ regions()

std::vector< SpaceRegion > eve::archspace::SpaceQuery::regions ( ) const

All Zone regions as SpaceRegion snapshots.

在文件 ArchSpaceQuery.cpp 第 129 行定义.

引用了 node, eve::archspace::Document::nodes(), out , 以及 eve::archspace::Zone.

◆ regionsConnected()

eve::Result< bool > eve::archspace::SpaceQuery::regionsConnected ( const std::string &  regionAId,
const std::string &  regionBId 
) const

Whether two regions share a portal path (undirected, same connected component).

返回
Success with true/false; InvalidArgument when either id is empty or unknown. @cost BFS over portal adjacency.

在文件 ArchSpaceQuery.cpp 第 171 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::archspace::Document::find(), eve::InvalidArgument, eve::NotFound, portals(), q , 以及 eve::Result< T >::success().

◆ strata()

std::vector< std::string > eve::archspace::SpaceQuery::strata ( ) const

Level (stratum) ids in document iteration order.

在文件 ArchSpaceQuery.cpp 第 120 行定义.

引用了 eve::archspace::Level, node, eve::archspace::Document::nodes() , 以及 out.

◆ topology()

TopologyKind eve::archspace::SpaceQuery::topology ( ) const
noexcept

Document topology dialect.

在文件 ArchSpaceQuery.cpp 第 116 行定义.

引用了 eve::archspace::Architectural , 以及 eve::archspace::Document::topology().


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