载入中...
搜索中...
未找到
PcgTreeManager.h
浏览该文件的文档.
1#pragma once
2
3#include "common/Result.h"
4
5#include <vector>
6
7namespace eve::procgen {
8class PointSet;
9
16public:
18 [[nodiscard]] Result<void> reset(float minimumX, float minimumZ, float width, float depth);
20 [[nodiscard]] Result<int> addTree(float worldX, float worldZ, int prototypeIndex);
22 [[nodiscard]] Result<int> addTrees(const PointSet& trees, int prototypeIndex);
24 [[nodiscard]] Result<int> countInRange(float worldX, float worldZ, float range) const;
25 int getCount() const noexcept;
26
27private:
28 struct Tree { float x, z; int prototype; };
29 bool configured_ = false;
30 float minimumX_ = 0, minimumZ_ = 0, width_ = 0, depth_ = 0;
31 std::vector<Tree> trees_;
32};
33} // namespace eve::procgen
float x
Definition AnimClip.cpp:738
float z
Definition AnimClip.cpp:738
#define EVENGINE_API_DOMAINS
Definition Export.h:110
std::uint32_t width
Range range
Move-only, checked operation results for the common layer.
std::uint32_t depth
Move-only operation result carrying either a value or Status.
Definition Result.h:155
Caller-owned world-space tree index matching Pcg TreeManager's rectangular queries....
Script-friendly collection of attributed 3D samples.
Definition PointSet.h:59