载入中...
搜索中...
未找到
HouseGenerationState.h 文件参考
#include "procgen/house/HouseGenerator.h"
#include "procgen/house/HouseLayout.h"
#include <algorithm>
#include <cmath>
#include <functional>
#include <optional>
#include <random>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <utility>

浏览源代码.

类

struct  eve::housegen::house_detail::State
 

命名空间

namespace  eve
 Build metadata (engine git commit, build time, third-party version).
 
namespace  eve::housegen
 
namespace  eve::housegen::house_detail
 

函数

const HouseComponent * eve::housegen::house_detail::pick (const std::vector< std::reference_wrapper< const HouseComponent > > &choices, std::mt19937 &rng)
 Borrow a weighted component from library-backed choices. @ownership Borrowed; the session's library owns the component. @nullable Yes when no compatible component exists. @lifetime Until the owning session library is replaced or destroyed; used only within one stage. @thread Session owner thread only; no callbacks.
 
bool eve::housegen::house_detail::has (const std::vector< std::reference_wrapper< const HouseComponent > > &values)
 
bool eve::housegen::house_detail::isRotationAllowed (const HouseComponent &component, int rotation)
 
std::vector< std::reference_wrapper< const HouseComponent > > eve::housegen::house_detail::facadeVariant (const std::vector< std::reference_wrapper< const HouseComponent > > &choices, bool wantWindow)
 Internal facadeVariant stage helper. @cost Linear in component choices; amortized across one facade placement.
 
bool eve::housegen::house_detail::isOneOf (const std::string &value, std::initializer_list< const char * > options)
 
SocketDirection eve::housegen::house_detail::directionFromName (const std::string &name)
 
std::string eve::housegen::house_detail::directionName (SocketDirection direction)
 
int eve::housegen::house_detail::directionRotation (SocketDirection direction)
 
std::vector< uint8_t > eve::housegen::house_detail::footprintMask (const std::string &shape, int width, int depth, int inset)
 Internal footprintMask stage helper. @cost Linear in plot cells; reuse for one floor emission.
 
bool eve::housegen::house_detail::active (const std::vector< uint8_t > &mask, int width, int depth, int x, int y)
 
std::vector< uint8_t > eve::housegen::house_detail::polygonMask (const std::vector< HousePolygonPoint > &poly, int width, int depth, int inset)
 Rasterize an arbitrary closed polygon onto the cell grid (cell centers inside).
 
std::vector< std::reference_wrapper< const HouseComponent > > eve::housegen::house_detail::compatibleOnFace (const std::vector< std::reference_wrapper< const HouseComponent > > &choices, SocketDirection face, int rotation)
 Internal compatibleOnFace stage helper. @cost Component choices times sockets; used for one facade placement.
 
std::optional< std::pair< int, int > > eve::housegen::house_detail::findInteriorCell (const std::vector< uint8_t > &mask, int width, int depth)
 First active cell that is interior (all four orthogonal neighbours active).
 
void eve::housegen::house_detail::appendRoomRegions (int width, int depth, const std::vector< uint8_t > &mask, const std::string &roomType, int floorZ, std::vector< HouseRoom > &rooms)
 
eve::Result< void > eve::housegen::house_detail::partitionFloor (int width, int depth, const std::vector< uint8_t > &mask, const std::vector< std::string > &roomTypes, std::mt19937 &rng, const std::vector< std::reference_wrapper< const HouseComponent > > &innerWall, const std::vector< std::reference_wrapper< const HouseComponent > > &innerDoor, std::vector< HouseInstance > &instances, std::vector< HouseRoom > &rooms, int floorZ)
 Partition active cells into exact, rectangular rooms and emit mask-safe boundaries.