#include "wieldmesh.h"
#include "settings.h"
#include "shader.h"
#include "inventory.h"
#include "client.h"
#include "itemdef.h"
#include "nodedef.h"
#include "mesh.h"
#include "content_mapblock.h"
#include "mapblock_mesh.h"
#include "client/meshgen/collector.h"
#include "client/tile.h"
#include "client/texturesource.h"
#include "log.h"
#include "util/numeric.h"
#include <map>
#include <IMeshManipulator.h>
#include "client/renderingengine.h"
Classes | |
class | ExtrusionMeshCache |
Macros | |
#define | WIELD_SCALE_FACTOR 30.0f |
#define | WIELD_SCALE_FACTOR_EXTRUDED 40.0f |
#define | MIN_EXTRUSION_MESH_RESOLUTION 16 |
#define | MAX_EXTRUSION_MESH_RESOLUTION 512 |
Functions | |
static scene::IMesh * | createExtrusionMesh (int resolution_x, int resolution_y) |
static scene::SMesh * | createGenericNodeMesh (Client *client, MapNode n, std::vector< ItemPartColor > *colors, const ContentFeatures &f) |
void | getItemMesh (Client *client, const ItemStack &item, ItemMesh *result) |
scene::SMesh * | getExtrudedMesh (ITextureSource *tsrc, const std::string &imagename, const std::string &overlay_name) |
Variables | |
static ExtrusionMeshCache * | g_extrusion_mesh_cache = nullptr |
#define MAX_EXTRUSION_MESH_RESOLUTION 512 |
Referenced by ExtrusionMeshCache::ExtrusionMeshCache(), and ExtrusionMeshCache::create().
#define MIN_EXTRUSION_MESH_RESOLUTION 16 |
Referenced by ExtrusionMeshCache::ExtrusionMeshCache().
#define WIELD_SCALE_FACTOR 30.0f |
Referenced by WieldMeshSceneNode::setItem().
#define WIELD_SCALE_FACTOR_EXTRUDED 40.0f |
Referenced by WieldMeshSceneNode::setExtruded().
|
static |
References scaleMesh().
Referenced by ExtrusionMeshCache::ExtrusionMeshCache(), and ExtrusionMeshCache::create().
|
static |
References CPT2_COLORED_WALLMOUNTED, CPT2_WALLMOUNTED, ContentFeatures::drawtype, MeshMakeData::fillSingleNode(), MapblockMeshGenerator::generate(), MapNode::getParam2(), MATERIAL_FLAG_ANIMATION, MAX_TILE_LAYERS, NDT_MESH, NDT_NODEBOX, NDT_SIGNLIKE, NDT_TORCHLIKE, p(), ContentFeatures::param_type_2, MeshCollector::prebuffers, MapNode::setParam1(), MapNode::setParam2(), and FrameSpec::texture.
Referenced by getItemMesh(), and WieldMeshSceneNode::setItem().
scene::SMesh * getExtrudedMesh | ( | ITextureSource * | tsrc, |
const std::string & | imagename, | ||
const std::string & | overlay_name ) |
References cloneMesh(), cloneMeshBuffer(), ExtrusionMeshCache::create(), g_extrusion_mesh_cache, ITextureSource::getTexture(), and scaleMesh().
Referenced by getItemMesh().
References ItemMesh::buffer_colors, TileLayer::color, createGenericNodeMesh(), ContentFeatures::drawtype, FATAL_ERROR_IF, g_extrusion_mesh_cache, NodeDefManager::get(), ItemStack::getDefinition(), getExtrudedMesh(), NodeDefManager::getId(), ItemStack::getInventoryImage(), ItemStack::getInventoryOverlay(), ITextureSource::getTextureName(), TileLayer::has_color, ITEM_NODE, ItemMesh::mesh, ItemDefinition::name, NDT_AIRLIKE, NDT_PLANTLIKE, NDT_PLANTLIKE_ROOTED, ItemMesh::needs_shading, ItemDefinition::place_param2, rotateMeshXZby(), rotateMeshYZby(), scaleMesh(), MapNode::setParam2(), TileLayer::texture_id, and ItemDefinition::type.
|
static |