Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
mapnode.cpp File Reference
#include "irrlichttypes_bloated.h"
#include "mapnode.h"
#include "porting.h"
#include "nodedef.h"
#include "map.h"
#include "content_mapnode.h"
#include "serialization.h"
#include "util/serialize.h"
#include "log.h"
#include "util/directiontables.h"
#include "util/numeric.h"
#include <string>
#include <sstream>
+ Include dependency graph for mapnode.cpp:

Macros

#define BOXESPUSHBACK(c)
 

Functions

void transformNodeBox (const MapNode &n, const NodeBox &nodebox, const NodeDefManager *nodemgr, std::vector< aabb3f > *p_boxes, u8 neighbors=0)
 
static void getNeighborConnectingFace (const v3s16 &p, const NodeDefManager *nodedef, Map *map, MapNode n, u8 bitmask, u8 *neighbors)
 

Variables

static const Rotation wallmounted_to_rot []
 
static const u8 rot_to_wallmounted []
 

Macro Definition Documentation

◆ BOXESPUSHBACK

#define BOXESPUSHBACK ( c)
Value:
for (std::vector<aabb3f>::const_iterator \
it = (c).begin(); \
it != (c).end(); ++it) \
(boxes).push_back(*it);

Referenced by transformNodeBox().

Function Documentation

◆ getNeighborConnectingFace()

static void getNeighborConnectingFace ( const v3s16 & p,
const NodeDefManager * nodedef,
Map * map,
MapNode n,
u8 bitmask,
u8 * neighbors )
inlinestatic

References Map::getNode(), NodeDefManager::nodeboxConnects(), and p().

Referenced by MapNode::getNeighbors().

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

◆ transformNodeBox()

void transformNodeBox ( const MapNode & n,
const NodeBox & nodebox,
const NodeDefManager * nodemgr,
std::vector< aabb3f > * p_boxes,
u8 neighbors = 0 )

References BOXESPUSHBACK, BS, NodeBoxConnected::connect_top, dir(), DWM_S1, DWM_S2, NodeBox::fixed, NodeBox::getConnected(), MapNode::getFaceDir(), MapNode::getLevel(), MapNode::getWallMounted(), MapNode::getWallMountedDir(), NODEBOX_CONNECTED, NODEBOX_FIXED, NODEBOX_LEVELED, NODEBOX_WALLMOUNTED, NodeBox::type, NodeBox::wall_bottom, NodeBox::wall_side, and NodeBox::wall_top.

Referenced by MapNode::getCollisionBoxes(), MapNode::getNodeBoxes(), and MapNode::getSelectionBoxes().

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

Variable Documentation

◆ rot_to_wallmounted

const u8 rot_to_wallmounted[]
static
Initial value:
= {
2, 4, 3, 5
}

Referenced by MapNode::rotateAlongYAxis().

◆ wallmounted_to_rot

const Rotation wallmounted_to_rot[]
static
Initial value:
= {
}
@ ROTATE_180
Definition mapnode.h:91
@ ROTATE_270
Definition mapnode.h:92
@ ROTATE_90
Definition mapnode.h:90
@ ROTATE_0
Definition mapnode.h:89

Referenced by MapNode::rotateAlongYAxis().