#include "mesh.h"#include "IMeshBuffer.h"#include "SSkinMeshBuffer.h"#include "constants.h"#include "debug.h"#include <cmath>#include <IAnimatedMesh.h>#include "S3DVertex.h"#include <SMesh.h>#include "CMeshBuffer.h"Functions | |
| static void | applyShadeFactor (video::SColor &color, f32 factor) |
| void | applyFacesShading (video::SColor &color, v3f normal) |
| scene::IAnimatedMesh * | createCubeMesh (v3f scale) |
| template<typename F> | |
| static void | applyToMeshBuffer (scene::IMeshBuffer *buf, const F &fn) |
| void | scaleMesh (scene::IMesh *mesh, v3f scale) |
| void | translateMesh (scene::IMesh *mesh, v3f vec) |
| void | setMeshBufferColor (scene::IMeshBuffer *buf, video::SColor color) |
| void | setMeshColor (scene::IMesh *mesh, video::SColor color) |
| template<typename F> | |
| static void | applyToMesh (scene::IMesh *mesh, const F &fn) |
| void | colorizeMeshBuffer (scene::IMeshBuffer *buf, video::SColor buf_color, f32 ambient_light, v3f dir_light) |
| void | setMeshColorByNormalXYZ (scene::IMesh *mesh, video::SColor colorX, video::SColor colorY, video::SColor colorZ) |
| void | setMeshColorByNormal (scene::IMesh *mesh, v3f normal, video::SColor color) |
| template<float v3f::* U, float v3f::* V> | |
| static void | rotateMesh (scene::IMesh *mesh, float degrees) |
| void | rotateMeshXYby (scene::IMesh *mesh, f64 degrees) |
| void | rotateMeshXZby (scene::IMesh *mesh, f64 degrees) |
| void | rotateMeshYZby (scene::IMesh *mesh, f64 degrees) |
| void | rotateMeshBy6dFacedir (scene::IMesh *mesh, u8 facedir) |
| void | recalculateBoundingBox (scene::IMesh *src_mesh) |
| bool | checkMeshNormals (scene::IMesh *mesh) |
| template<class VertexType, class SMeshBufferType> | |
| static scene::IMeshBuffer * | cloneMeshBuffer (scene::IMeshBuffer *mesh_buffer) |
| scene::IMeshBuffer * | cloneMeshBuffer (scene::IMeshBuffer *mesh_buffer) |
| scene::SMesh * | cloneStaticMesh (scene::IMesh *src_mesh) |
| Clone a mesh. For an animated mesh, this will clone the static pose. | |
| scene::IMesh * | convertNodeboxesToMesh (const std::vector< aabb3f > &boxes, const f32 *uv_coords, f32 expand) |
| void | setMaterialFilters (video::SMaterialLayer &tex, bool bilinear, bool trilinear, bool anisotropic) |
| void applyFacesShading | ( | video::SColor & | color, |
| v3f | normal ) |
Applies shading to a color based on the surface's normal vector.
References applyShadeFactor().
Referenced by MapblockMeshGenerator::blendLightColor(), MapblockMeshGenerator::drawAutoLightedCuboid(), MapblockMeshGenerator::drawMeshNode(), MapblockMeshGenerator::drawQuad(), and MapblockMeshGenerator::drawSolidNode().
|
inlinestatic |
Referenced by applyFacesShading(), and colorizeMeshBuffer().
|
static |
References applyToMeshBuffer().
Referenced by rotateMesh(), setMeshColorByNormal(), and setMeshColorByNormalXYZ().
|
inlinestatic |
Referenced by applyToMesh(), cloneMeshBuffer(), colorizeMeshBuffer(), scaleMesh(), setMeshBufferColor(), and translateMesh().
| bool checkMeshNormals | ( | scene::IMesh * | mesh | ) |
Referenced by GenericCAO::addToScene(), and NodeVisuals::updateMesh().
| scene::IMeshBuffer * cloneMeshBuffer | ( | scene::IMeshBuffer * | mesh_buffer | ) |
|
static |
References applyToMeshBuffer().
Referenced by cloneMeshBuffer(), cloneStaticMesh(), getExtrudedMesh(), and WieldMeshSceneNode::setExtruded().
| scene::SMesh * cloneStaticMesh | ( | scene::IMesh * | src_mesh | ) |
Clone a mesh. For an animated mesh, this will clone the static pose.
References cloneMeshBuffer().
Referenced by MapblockMeshGenerator::drawMeshNode(), getExtrudedMesh(), WieldMeshSceneNode::setExtruded(), and NodeVisuals::updateMesh().
| void colorizeMeshBuffer | ( | scene::IMeshBuffer * | buf, |
| video::SColor | buf_color, | ||
| f32 | ambient_light, | ||
| v3f | dir_light ) |
Overwrites the color of a mesh buffer. The color is darkened based on the normal vector of the vertices and the given directional light source + ambient light.
References applyShadeFactor(), and applyToMeshBuffer().
Referenced by drawItemStack().
| scene::IMesh * convertNodeboxesToMesh | ( | const std::vector< aabb3f > & | boxes, |
| const f32 * | uv_coords, | ||
| f32 | expand ) |
References BS.
Referenced by Hud::updateSelectionMesh().
| scene::IAnimatedMesh * createCubeMesh | ( | v3f | scale | ) |
References scaleMesh().
Referenced by ExtrusionMeshCache::ExtrusionMeshCache(), and GenericCAO::addToScene().
| void recalculateBoundingBox | ( | scene::IMesh * | src_mesh | ) |
Referenced by MapblockMeshGenerator::drawMeshNode(), and NodeVisuals::updateMesh().
|
static |
References applyToMesh().
Referenced by rotateMeshXYby(), rotateMeshXZby(), and rotateMeshYZby().
| void rotateMeshBy6dFacedir | ( | scene::IMesh * | mesh, |
| u8 | facedir ) |
References rotateMeshXYby(), rotateMeshXZby(), and rotateMeshYZby().
Referenced by MapblockMeshGenerator::drawMeshNode().
| void rotateMeshXYby | ( | scene::IMesh * | mesh, |
| f64 | degrees ) |
References rotateMesh().
Referenced by rotateMeshBy6dFacedir().
| void rotateMeshXZby | ( | scene::IMesh * | mesh, |
| f64 | degrees ) |
References rotateMesh().
Referenced by createItemMesh(), MapblockMeshGenerator::drawMeshNode(), and rotateMeshBy6dFacedir().
| void rotateMeshYZby | ( | scene::IMesh * | mesh, |
| f64 | degrees ) |
References rotateMesh().
Referenced by createItemMesh(), and rotateMeshBy6dFacedir().
| void scaleMesh | ( | scene::IMesh * | mesh, |
| v3f | scale ) |
References applyToMeshBuffer().
Referenced by createCubeMesh(), createExtrusionMesh(), createItemMesh(), getExtrudedMesh(), and NodeVisuals::updateMesh().
| void setMaterialFilters | ( | video::SMaterialLayer & | tex, |
| bool | bilinear, | ||
| bool | trilinear, | ||
| bool | anisotropic ) |
Referenced by ClientMap::renderMap(), WieldMeshSceneNode::setExtruded(), WieldMeshSceneNode::setItem(), and setMaterialTextureAndFilters().
| void setMeshBufferColor | ( | scene::IMeshBuffer * | buf, |
| video::SColor | color ) |
Sets a constant color for all vertices in the mesh buffer.
References applyToMeshBuffer().
Referenced by drawItemStack(), WieldMeshSceneNode::setColor(), and setMeshColor().
| void setMeshColor | ( | scene::IMesh * | mesh, |
| video::SColor | color ) |
References setMeshBufferColor().
Referenced by GenericCAO::addToScene(), Hud::drawSelectionMesh(), and GenericCAO::updateTextures().
| void setMeshColorByNormal | ( | scene::IMesh * | mesh, |
| v3f | normal, | ||
| video::SColor | color ) |
References applyToMesh().
Referenced by Hud::drawSelectionMesh().
| void setMeshColorByNormalXYZ | ( | scene::IMesh * | mesh, |
| video::SColor | colorX, | ||
| video::SColor | colorY, | ||
| video::SColor | colorZ ) |
| void translateMesh | ( | scene::IMesh * | mesh, |
| v3f | vec ) |