载入中...
搜索中...
未找到
PcgTreeManager.cpp
浏览该文件的文档.
15 return Result<void>::failure(Diagnostic::error(DiagnosticCode::InvalidArgument, "finite positive world bounds are required",
24 if (!configured_) return Result<int>::failure(Diagnostic::error(DiagnosticCode::InvalidArgument, "reset must configure bounds before insertion",
27 return Result<int>::failure(Diagnostic::error(DiagnosticCode::InvalidArgument, "finite position and non-negative prototype index are required",
31 return Result<int>::failure(Diagnostic::error(DiagnosticCode::InvalidArgument, "tree position lies outside manager bounds",
38 if (!configured_) return Result<int>::failure(Diagnostic::error(DiagnosticCode::InvalidArgument, "reset must configure bounds before insertion",
40 if (prototypeIndex < 0) return Result<int>::failure(Diagnostic::error(DiagnosticCode::InvalidArgument, "prototype index must be non-negative",
47 return Result<int>::failure(Diagnostic::error(DiagnosticCode::InvalidArgument, "all PointSet trees must lie inside manager bounds",
56 if (!configured_) return Result<int>::failure(Diagnostic::error(DiagnosticCode::InvalidArgument, "reset must configure bounds before queries",
59 return Result<int>::failure(Diagnostic::error(DiagnosticCode::InvalidArgument, "finite position and non-negative range are required",
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={}, DiagnosticDetails details={}, std::string source={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.h:125
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:175
Result< int > addTrees(const PointSet &trees, int prototypeIndex)
Atomically append every world-space XZ position from a PointSet under one prototype index.
Definition PcgTreeManager.cpp:37
Result< void > reset(float minimumX, float minimumZ, float width, float depth)
Atomically reset the index to finite positive world XZ bounds.
Definition PcgTreeManager.cpp:12
Result< int > countInRange(float worldX, float worldZ, float range) const
Count trees in the inclusive axis-aligned square centered at XZ with the supplied range.
Definition PcgTreeManager.cpp:55
Result< int > addTree(float worldX, float worldZ, int prototypeIndex)
Add one tree when its finite position is within the configured half-open world bounds.
Definition PcgTreeManager.cpp:23
Definition EvpackPointGraphLoader.h:12
@ InvalidArgument