13 #include "../Noise/Noise.h"
90 int a_NumCCWRotations,
std::unique_ptr< cPlacedPiece > cPlacedPiecePtr
std::vector< cPlacedPiecePtr > cPlacedPieces
bool CheckConnection(const cPiece::cConnector &a_ExistingConnector, const Vector3i &a_ToPos, const cPiece &a_Piece, const cPiece::cConnector &a_NewConnector, int a_NumCCWRotations, const cPlacedPieces &a_OutPieces)
Checks if the specified piece would fit with the already-placed pieces, using the specified connector...
bool TryPlacePieceAtConnector(const cPlacedPiece &a_ParentPiece, const cPiece::cConnector &a_Connector, cPlacedPieces &a_OutPieces, cFreeConnectors &a_OutConnectors)
Tries to place a new piece at the specified (placed) connector.
cPlacedPiecePtr PlaceStartingPiece(int a_BlockX, int a_BlockZ, cFreeConnectors &a_OutConnectors)
Selects a starting piece and places it, including its height and rotation.
void DebugConnectorPool(const cFreeConnectors &a_ConnectorPool, size_t a_NumProcessed)
DEBUG: Outputs all the connectors in the pool into stdout.
std::vector< cConnection > cConnections
cPieceGeneratorBFSTree(cPiecePool &a_PiecePool, int a_Seed)
Creates a new object tied to the specified PiecePool, using the specified seed.
int m_Seed
The seed used by this generator.
cPiecePool & m_PiecePool
The pool from which pieces are taken.
void PlacePieces(int a_BlockX, int a_BlockZ, int a_MaxDepth, cPlacedPieces &a_OutPieces)
Generates a placement for pieces at the specified coords.
std::vector< cFreeConnector > cFreeConnectors
cNoise m_Noise
The noise used for random number generation.
The type used for storing a connection from one piece to another, while building the piece tree.
cPiece::cConnector m_Connector
cConnection(cPiece &a_Piece, cPiece::cConnector &a_Connector, int a_NumCCWRotations, int a_Weight)
The type used for storing a pool of connectors that will be attempted to expand by another piece.
cPiece::cConnector m_Connector
cFreeConnector(cPlacedPiece *a_Piece, const cPiece::cConnector &a_Connector)
Represents a single piece.
This class is an interface that stores pieces for a generator.
Represents a single piece that has been placed to specific coords in the world.