Luanti 5.16.0-dev
Loading...
Searching...
No Matches
DecoSchematic Class Reference

#include <mg_decoration.h>

Inheritance diagram for DecoSchematic:
Collaboration diagram for DecoSchematic:

Public Member Functions

ObjDefclone () const
 DecoSchematic ()=default
virtual ~DecoSchematic ()
virtual size_t generate (MMVManip *vm, PcgRandom *pr, v3s16 p, bool ceiling)
Public Member Functions inherited from Decoration
 Decoration ()=default
virtual ~Decoration ()=default
virtual void resolveNodeNames ()
bool canPlaceDecoration (MMVManip *vm, v3s16 p)
void placeDeco (Mapgen *mg, u32 blockseed, v3s16 nmin, v3s16 nmax)
Public Member Functions inherited from ObjDef
virtual ~ObjDef ()=default
Public Member Functions inherited from NodeResolver
 NodeResolver ()
virtual ~NodeResolver ()
void cloneTo (NodeResolver *res) const
bool getIdFromNrBacklog (content_t *result_out, const std::string &node_alt, content_t c_fallback, bool error_on_fallback=true)
bool getIdsFromNrBacklog (std::vector< content_t > *result_out, bool all_required=false, content_t c_fallback=CONTENT_IGNORE)
bool isResolveDone () const
void reset (bool resolve_done=false)

Public Attributes

Rotation rotation
Schematicschematic = nullptr
bool was_cloned = false
Public Attributes inherited from Decoration
u32 flags = 0
int mapseed = 0
std::vector< content_tc_place_on
s16 sidelen = 1
s16 y_min
s16 y_max
float fill_ratio = 0.0f
NoiseParams np
std::vector< content_tc_spawnby
s16 nspawnby
s16 place_offset_y = 0
s16 check_offset = -1
std::unordered_set< biome_tbiomes
Public Attributes inherited from ObjDef
u32 index
u32 uid
ObjDefHandle handle
std::string name
Public Attributes inherited from NodeResolver
std::vector< std::string > m_nodenames
std::vector< size_t > m_nnlistsizes

Additional Inherited Members

Protected Member Functions inherited from Decoration
void cloneTo (Decoration *def) const
Protected Member Functions inherited from ObjDef
void cloneTo (ObjDef *def) const
Protected Attributes inherited from NodeResolver
const NodeDefManagerm_ndef = nullptr
u32 m_nodenames_idx = 0

Constructor & Destructor Documentation

◆ DecoSchematic()

DecoSchematic::DecoSchematic ( )
default

References p().

Referenced by clone().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~DecoSchematic()

DecoSchematic::~DecoSchematic ( )
virtual

References schematic, and was_cloned.

Member Function Documentation

◆ clone()

ObjDef * DecoSchematic::clone ( ) const
virtual

Implements ObjDef.

References DecoSchematic(), Decoration::cloneTo(), NodeResolver::cloneTo(), rotation, and schematic.

Here is the call graph for this function:

◆ generate()

size_t DecoSchematic::generate ( MMVManip * vm,
PcgRandom * pr,
v3s16 p,
bool ceiling )
virtual

Implements Decoration.

References Decoration::canPlaceDecoration(), DECO_FORCE_PLACEMENT, DECO_PLACE_CENTER_X, DECO_PLACE_CENTER_Y, DECO_PLACE_CENTER_Z, Decoration::flags, VoxelManipulator::m_area, VoxelArea::MaxEdge, VoxelArea::MinEdge, p(), Decoration::place_offset_y, PcgRandom::range(), ROTATE_0, ROTATE_180, ROTATE_270, ROTATE_RAND, rotation, and schematic.

Here is the call graph for this function:

Member Data Documentation

◆ rotation

Rotation DecoSchematic::rotation

◆ schematic

Schematic* DecoSchematic::schematic = nullptr

◆ was_cloned

bool DecoSchematic::was_cloned = false

Referenced by ~DecoSchematic().


The documentation for this class was generated from the following files: