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

Authoritative architectural space document (Pascal-like node graph). 更多...

#include <ArchSpaceDocument.h>

Public 成员函数

 Document ()=default
 Document.
 
const std::string & rootId () const noexcept
 Root id.
 
const std::unordered_map< std::string, Node > & nodes () const noexcept
 
std::size_t nodeCount () const noexcept
 Node count.
 
const Node * find (const std::string &id) const
 Borrow a node by id. @ownership Non-owning pointer into this document's node map; do not free. @lifetime Until the next mutating call.
 
Node * findMutable (const std::string &id)
 Borrow a mutable node by id. @ownership Non-owning pointer into this document's node map; do not free. @lifetime Until the next structural mutation.
 
eve::Result< void > insert (Node node)
 Insert a validated node and link it into the parent child list.
 
eve::Result< void > replace (Node node)
 Replace authored fields while preserving id, kind, parent and children.
 
eve::Result< void > eraseCascade (const std::string &id)
 Delete a node and every descendant. Root deletion clears the document.
 
void clear ()
 Remove every node.
 
eve::Result< void > bootstrap (const std::string &siteId, const std::string &buildingId, const std::string &levelId, double levelHeight=3.0)
 Create site → building → level skeleton when the document is empty.
 
eve::Result< void > createRoom (const std::string &levelId, const std::string &roomId, std::string roomName, std::vector< Vec2 > polygon, double wallHeight, double wallThickness, double slabThickness)
 Create a closed room: perimeter walls + slab + zone under an existing level.
 
eve::Result< void > createWall (const std::string &levelId, const std::string &wallId, std::string wallName, Vec2 start, Vec2 end, double height, double thickness)
 Insert a single wall under an existing level.
 
eve::Result< void > createOpening (const std::string &wallId, const std::string &openingId, std::string openingName, OpeningKind kind, double t, double width, double height, double sill=0.0)
 Insert a door/window opening on an existing wall.
 
eve::Result< void > placeItem (const std::string &levelId, const std::string &itemId, std::string itemName, std::string catalogId, Vec3 position, double yawDegrees=0.0)
 Place a catalog item on an existing level.
 
std::vector< std::string > diagnostics () const
 Collect structural and geometric diagnostics as human-readable lines.
 
MeshBake bakeMesh () const
 Build wall boxes (with opening cutouts), slabs and item markers for viewport upload.
 
MeshArrays bakeMeshArrays () const
 Bake and pack into GPU-upload float arrays with per-triangle normals.
 

详细描述

Authoritative architectural space document (Pascal-like node graph).

@ownership The document exclusively owns its nodes. Borrowed pointers returned by find() are invalidated by any mutating call. @thread Owner thread only. @failure Mutators return a checked Result and leave the previous document state unchanged.

在文件 ArchSpaceDocument.h 第 22 行定义.

构造及析构函数说明

◆ Document()

eve::archspace::Document::Document ( )
default

成员函数说明

◆ bakeMesh()

MeshBake eve::archspace::Document::bakeMesh ( ) const

Build wall boxes (with opening cutouts), slabs and item markers for viewport upload.

在文件 ArchSpaceDocument.cpp 第 399 行定义.

引用了 eve::archspace::appendCatalogItem(), eve::archspace::appendWallWithOpenings(), find(), eve::archspace::Item, level, node, eve::archspace::Opening, eve::archspace::Slab, eve::archspace::Wall , 以及 y.

◆ bakeMeshArrays()

MeshArrays eve::archspace::Document::bakeMeshArrays ( ) const
inline

Bake and pack into GPU-upload float arrays with per-triangle normals.

在文件 ArchSpaceDocument.h 第 113 行定义.

引用了 eve::archspace::toMeshArrays().

◆ bootstrap()

eve::Result< void > eve::archspace::Document::bootstrap ( const std::string &  siteId,
const std::string &  buildingId,
const std::string &  levelId,
double  levelHeight = 3.0 
)

Create site → building → level skeleton when the document is empty.

返回
Applied on success; Rejected when the document already has a root or ids collide.

在文件 ArchSpaceDocument.cpp 第 225 行定义.

引用了 eve::archspace::Building, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::archspace::Node::id, insert(), eve::InvalidArgument, eve::archspace::Node::kind, eve::archspace::Level, level, eve::archspace::Node::name, ok, eve::archspace::Node::parentId, eve::PreconditionViolation , 以及 eve::archspace::Site.

被这些函数引用 eve::archspace_editing::ArchSpaceDocumentTarget::makeBootstrap().

◆ clear()

void eve::archspace::Document::clear ( )

Remove every node.

在文件 ArchSpaceDocument.cpp 第 220 行定义.

◆ createOpening()

eve::Result< void > eve::archspace::Document::createOpening ( const std::string &  wallId,
const std::string &  openingId,
std::string  openingName,
OpeningKind  kind,
double  t,
double  width,
double  height,
double  sill = 0.0 
)

◆ createRoom()

eve::Result< void > eve::archspace::Document::createRoom ( const std::string &  levelId,
const std::string &  roomId,
std::string  roomName,
std::vector< Vec2 >  polygon,
double  wallHeight,
double  wallThickness,
double  slabThickness 
)

◆ createWall()

eve::Result< void > eve::archspace::Document::createWall ( const std::string &  levelId,
const std::string &  wallId,
std::string  wallName,
Vec2  start,
Vec2  end,
double  height,
double  thickness 
)

◆ diagnostics()

std::vector< std::string > eve::archspace::Document::diagnostics ( ) const

Collect structural and geometric diagnostics as human-readable lines.

在文件 ArchSpaceDocument.cpp 第 369 行定义.

引用了 find(), node, parent, eve::archspace::Node::parentId , 以及 eve::archspace::Site.

被这些函数引用 eve::archspace_editing::ArchSpaceDocumentTarget::validate().

◆ eraseCascade()

eve::Result< void > eve::archspace::Document::eraseCascade ( const std::string &  id)

Delete a node and every descendant. Root deletion clears the document.

返回
Applied on success; NotFound when the id is unknown.

在文件 ArchSpaceDocument.cpp 第 204 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), find(), eve::NotFound, ok , 以及 order.

被这些函数引用 eve::archspace_editing::ArchSpaceDocumentTarget::makeDeleteNode().

◆ find()

const Node * eve::archspace::Document::find ( const std::string &  id) const

Borrow a node by id. @ownership Non-owning pointer into this document's node map; do not free. @lifetime Until the next mutating call.

在文件 ArchSpaceDocument.cpp 第 91 行定义.

被这些函数引用 bakeMesh(), createOpening(), createRoom(), createWall(), diagnostics(), eraseCascade(), eve::archspace_editing::ArchSpaceDocumentTarget::gizmo() , 以及 placeItem().

◆ findMutable()

Node * eve::archspace::Document::findMutable ( const std::string &  id)

Borrow a mutable node by id. @ownership Non-owning pointer into this document's node map; do not free. @lifetime Until the next structural mutation.

在文件 ArchSpaceDocument.cpp 第 96 行定义.

被这些函数引用 insert(), eve::archspace_editing::ArchSpaceDocumentTarget::makeSet() , 以及 replace().

◆ insert()

eve::Result< void > eve::archspace::Document::insert ( Node  node)

Insert a validated node and link it into the parent child list.

返回
Applied on success; Rejected when id/kind/parent/geometry rules fail.

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

引用了 eve::Conflict, eve::Diagnostic::error(), eve::Result< T >::failure(), findMutable(), eve::InvalidArgument, node, eve::NotFound, ok, parent , 以及 eve::archspace::Site.

被这些函数引用 bootstrap(), createOpening(), createRoom(), createWall() , 以及 placeItem().

◆ nodeCount()

std::size_t eve::archspace::Document::nodeCount ( ) const
inlinenoexcept

Node count.

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

被这些函数引用 eve::archspace_editing::ArchSpaceDocumentTarget::validate().

◆ nodes()

const std::unordered_map< std::string, Node > & eve::archspace::Document::nodes ( ) const
inlinenoexcept

在文件 ArchSpaceDocument.h 第 29 行定义.

被这些函数引用 eve::archspace_editing::ArchSpaceDocumentTarget::gizmo().

◆ placeItem()

eve::Result< void > eve::archspace::Document::placeItem ( const std::string &  levelId,
const std::string &  itemId,
std::string  itemName,
std::string  catalogId,
Vec3  position,
double  yawDegrees = 0.0 
)

◆ replace()

eve::Result< void > eve::archspace::Document::replace ( Node  node)

Replace authored fields while preserving id, kind, parent and children.

返回
Applied on success; NotFound/Rejected when missing or invalid.

在文件 ArchSpaceDocument.cpp 第 188 行定义.

引用了 eve::archspace::Node::children, eve::Diagnostic::error(), eve::Result< T >::failure(), findMutable(), eve::InvalidArgument, eve::archspace::Node::kind, node, eve::NotFound, ok , 以及 eve::archspace::Node::parentId.

被这些函数引用 eve::archspace_editing::ArchSpaceDocumentTarget::makeSet().

◆ rootId()

const std::string & eve::archspace::Document::rootId ( ) const
inlinenoexcept

Root id.

在文件 ArchSpaceDocument.h 第 28 行定义.


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