Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members | Tutorials |
#include <IMeshManipulator.h>
Public Member Functions | |
virtual IAnimatedMesh * | createAnimatedMesh (IMesh *mesh, scene::E_ANIMATED_MESH_TYPE type=scene::EAMT_UNKNOWN) const =0 |
Create a new AnimatedMesh and adds the mesh to it. | |
virtual SMesh * | createMeshCopy (IMesh *mesh) const =0 |
Clones a static IMesh into a modifiable SMesh. | |
virtual IMesh * | createMeshUniquePrimitives (IMesh *mesh) const =0 |
Creates a copy of a mesh with all vertices unwelded. | |
virtual IMesh * | createMeshWelded (IMesh *mesh, f32 tolerance=core::ROUNDING_ERROR_f32) const =0 |
Creates a copy of a mesh with vertices welded. | |
virtual IMesh * | createMeshWith1TCoords (IMesh *mesh) const =0 |
Creates a copy of the mesh, which will only consist of S3DVertex vertices. | |
virtual IMesh * | createMeshWith2TCoords (IMesh *mesh) const =0 |
Creates a copy of the mesh, which will only consist of S3DVertex2TCoord vertices. | |
virtual IMesh * | createMeshWithTangents (IMesh *mesh, bool recalculateNormals=false, bool smooth=false, bool angleWeighted=false) const =0 |
Creates a copy of the mesh, which will only consist of S3DVertexTangents vertices. | |
virtual void | flipSurfaces (IMesh *mesh) const =0 |
Flips the direction of surfaces. | |
virtual s32 | getPolyCount (IAnimatedMesh *mesh) const =0 |
Get amount of polygons in mesh. | |
virtual s32 | getPolyCount (IMesh *mesh) const =0 |
Get amount of polygons in mesh. | |
virtual void | makePlanarTextureMapping (scene::IMeshBuffer *buffer, f32 resolutionS, f32 resolutionT, u8 axis, const core::vector3df &offset) const =0 |
Creates a planar texture mapping on the meshbuffer. | |
virtual void | makePlanarTextureMapping (scene::IMeshBuffer *meshbuffer, f32 resolution=0.001f) const =0 |
Creates a planar texture mapping on the meshbuffer. | |
virtual void | makePlanarTextureMapping (IMesh *mesh, f32 resolution=0.001f) const =0 |
Creates a planar texture mapping on the mesh. | |
virtual void | recalculateNormals (IMeshBuffer *buffer, bool smooth=false, bool angleWeighted=false) const =0 |
Recalculates all normals of the mesh buffer. | |
virtual void | recalculateNormals (IMesh *mesh, bool smooth=false, bool angleWeighted=false) const =0 |
Recalculates all normals of the mesh. | |
virtual void | scale (IMeshBuffer *buffer, const core::vector3df &factor) const =0 |
Scales the actual meshbuffer, not a scene node. | |
virtual void | scale (IMesh *mesh, const core::vector3df &factor) const =0 |
Scales the actual mesh, not a scene node. | |
virtual void | scaleMesh (IMesh *mesh, const core::vector3df &factor) const |
Scales the actual mesh, not a scene node. | |
virtual void | scaleTCoords (scene::IMeshBuffer *buffer, const core::vector2df &factor, u32 level=1) const =0 |
Scale the texture coords of a meshbuffer. | |
virtual void | scaleTCoords (scene::IMesh *mesh, const core::vector2df &factor, u32 level=1) const =0 |
Scale the texture coords of a mesh. | |
virtual void | setVertexColorAlpha (IMesh *mesh, s32 alpha) const =0 |
Sets the alpha vertex color value of the whole mesh to a new value. | |
virtual void | setVertexColors (IMesh *mesh, video::SColor color) const =0 |
Sets the colors of all vertices to one color. | |
virtual void | transform (IMeshBuffer *buffer, const core::matrix4 &m) const =0 |
Applies a transformation to a meshbuffer. | |
virtual void | transform (IMesh *mesh, const core::matrix4 &m) const =0 |
Applies a transformation to a mesh. | |
virtual void | transformMesh (IMesh *mesh, const core::matrix4 &m) const |
Applies a transformation to a mesh. |
Scale, set alpha value, flip surfaces, and so on. This exists for fixing problems with wrong imported or exported meshes quickly after loading. It is not intended for doing mesh modifications and/or animations during runtime.
Definition at line 30 of file IMeshManipulator.h.
virtual IAnimatedMesh* irr::scene::IMeshManipulator::createAnimatedMesh | ( | IMesh * | mesh, | |
scene::E_ANIMATED_MESH_TYPE | type = scene::EAMT_UNKNOWN | |||
) | const [pure virtual] |
Create a new AnimatedMesh and adds the mesh to it.
mesh | Input mesh | |
type | The type of the animated mesh to create. |
Clones a static IMesh into a modifiable SMesh.
All meshbuffers in the returned SMesh are of type SMeshBuffer or SMeshBufferLightMap.
mesh | Mesh to copy. |
virtual IMesh* irr::scene::IMeshManipulator::createMeshUniquePrimitives | ( | IMesh * | mesh | ) | const [pure virtual] |
Creates a copy of a mesh with all vertices unwelded.
mesh | Input mesh |
virtual IMesh* irr::scene::IMeshManipulator::createMeshWelded | ( | IMesh * | mesh, | |
f32 | tolerance = core::ROUNDING_ERROR_f32 | |||
) | const [pure virtual] |
Creates a copy of a mesh with vertices welded.
mesh | Input mesh | |
tolerance | The threshold for vertex comparisons. |
virtual IMesh* irr::scene::IMeshManipulator::createMeshWith1TCoords | ( | IMesh * | mesh | ) | const [pure virtual] |
Creates a copy of the mesh, which will only consist of S3DVertex vertices.
mesh | Input mesh |
virtual IMesh* irr::scene::IMeshManipulator::createMeshWith2TCoords | ( | IMesh * | mesh | ) | const [pure virtual] |
Creates a copy of the mesh, which will only consist of S3DVertex2TCoord vertices.
mesh | Input mesh |
virtual IMesh* irr::scene::IMeshManipulator::createMeshWithTangents | ( | IMesh * | mesh, | |
bool | recalculateNormals = false , |
|||
bool | smooth = false , |
|||
bool | angleWeighted = false | |||
) | const [pure virtual] |
Creates a copy of the mesh, which will only consist of S3DVertexTangents vertices.
This is useful if you want to draw tangent space normal mapped geometry because it calculates the tangent and binormal data which is needed there.
mesh | Input mesh | |
recalculateNormals | The normals are recalculated if set, otherwise the original ones are kept. Note that keeping the normals may introduce inaccurate tangents if the normals are very different to those calculated from the faces. | |
smooth | The normals/tangents are smoothed across the meshbuffer's faces if this flag is set. | |
angleWeighted | Improved smoothing calculation used |
virtual void irr::scene::IMeshManipulator::flipSurfaces | ( | IMesh * | mesh | ) | const [pure virtual] |
Flips the direction of surfaces.
Changes backfacing triangles to frontfacing triangles and vice versa.
mesh | Mesh on which the operation is performed. |
virtual s32 irr::scene::IMeshManipulator::getPolyCount | ( | IAnimatedMesh * | mesh | ) | const [pure virtual] |
Get amount of polygons in mesh.
mesh | Input mesh |
Get amount of polygons in mesh.
mesh | Input mesh |
virtual void irr::scene::IMeshManipulator::makePlanarTextureMapping | ( | scene::IMeshBuffer * | buffer, | |
f32 | resolutionS, | |||
f32 | resolutionT, | |||
u8 | axis, | |||
const core::vector3df & | offset | |||
) | const [pure virtual] |
Creates a planar texture mapping on the meshbuffer.
This method is currently implemented towards the LWO planar mapping. A more general biasing might be required.
buffer | Buffer on which the operation is performed. | |
resolutionS | Resolution of the planar mapping in horizontal direction. This is the ratio between object space and texture space. | |
resolutionT | Resolution of the planar mapping in vertical direction. This is the ratio between object space and texture space. | |
axis | The axis along which the texture is projected. The allowed values are 0 (X), 1(Y), and 2(Z). | |
offset | Vector added to the vertex positions (in object coordinates). |
virtual void irr::scene::IMeshManipulator::makePlanarTextureMapping | ( | scene::IMeshBuffer * | meshbuffer, | |
f32 | resolution = 0.001f | |||
) | const [pure virtual] |
Creates a planar texture mapping on the meshbuffer.
meshbuffer,: | Buffer on which the operation is performed. | |
resolution,: | resolution of the planar mapping. This is the value specifying which is the relation between world space and texture coordinate space. |
virtual void irr::scene::IMeshManipulator::makePlanarTextureMapping | ( | IMesh * | mesh, | |
f32 | resolution = 0.001f | |||
) | const [pure virtual] |
Creates a planar texture mapping on the mesh.
mesh,: | Mesh on which the operation is performed. | |
resolution,: | resolution of the planar mapping. This is the value specifying which is the relation between world space and texture coordinate space. |
virtual void irr::scene::IMeshManipulator::recalculateNormals | ( | IMeshBuffer * | buffer, | |
bool | smooth = false , |
|||
bool | angleWeighted = false | |||
) | const [pure virtual] |
Recalculates all normals of the mesh buffer.
buffer,: | Mesh buffer on which the operation is performed. | |
smooth,: | If the normals shall be smoothed. | |
angleWeighted,: | If the normals shall be smoothed in relation to their angles. More expensive, but also higher precision. |
virtual void irr::scene::IMeshManipulator::recalculateNormals | ( | IMesh * | mesh, | |
bool | smooth = false , |
|||
bool | angleWeighted = false | |||
) | const [pure virtual] |
Recalculates all normals of the mesh.
mesh,: | Mesh on which the operation is performed. | |
smooth,: | If the normals shall be smoothed. | |
angleWeighted,: | If the normals shall be smoothed in relation to their angles. More expensive, but also higher precision. |
virtual void irr::scene::IMeshManipulator::scale | ( | IMeshBuffer * | buffer, | |
const core::vector3df & | factor | |||
) | const [pure virtual] |
Scales the actual meshbuffer, not a scene node.
buffer | Meshbuffer on which the operation is performed. | |
factor | Scale factor for each axis. |
virtual void irr::scene::IMeshManipulator::scale | ( | IMesh * | mesh, | |
const core::vector3df & | factor | |||
) | const [pure virtual] |
Scales the actual mesh, not a scene node.
mesh | Mesh on which the operation is performed. | |
factor | Scale factor for each axis. |
Referenced by scaleMesh().
virtual void irr::scene::IMeshManipulator::scaleMesh | ( | IMesh * | mesh, | |
const core::vector3df & | factor | |||
) | const [inline, virtual] |
Scales the actual mesh, not a scene node.
mesh | Mesh on which the operation is performed. | |
factor | Scale factor for each axis. |
Definition at line 76 of file IMeshManipulator.h.
References scale().
virtual void irr::scene::IMeshManipulator::scaleTCoords | ( | scene::IMeshBuffer * | buffer, | |
const core::vector2df & | factor, | |||
u32 | level = 1 | |||
) | const [pure virtual] |
Scale the texture coords of a meshbuffer.
buffer | Meshbuffer on which the operation is performed. | |
factor | Vector which defines the scale for each axis. | |
level | Number of texture coord, starting from 1. Support for level 2 exists for LightMap buffers. |
virtual void irr::scene::IMeshManipulator::scaleTCoords | ( | scene::IMesh * | mesh, | |
const core::vector2df & | factor, | |||
u32 | level = 1 | |||
) | const [pure virtual] |
Scale the texture coords of a mesh.
mesh | Mesh on which the operation is performed. | |
factor | Vector which defines the scale for each axis. | |
level | Number of texture coord, starting from 1. Support for level 2 exists for LightMap buffers. |
virtual void irr::scene::IMeshManipulator::setVertexColorAlpha | ( | IMesh * | mesh, | |
s32 | alpha | |||
) | const [pure virtual] |
Sets the alpha vertex color value of the whole mesh to a new value.
mesh | Mesh on which the operation is performed. | |
alpha | New alpha value. Must be a value between 0 and 255. |
virtual void irr::scene::IMeshManipulator::setVertexColors | ( | IMesh * | mesh, | |
video::SColor | color | |||
) | const [pure virtual] |
Sets the colors of all vertices to one color.
mesh | Mesh on which the operation is performed. | |
color | New color. |
virtual void irr::scene::IMeshManipulator::transform | ( | IMeshBuffer * | buffer, | |
const core::matrix4 & | m | |||
) | const [pure virtual] |
Applies a transformation to a meshbuffer.
buffer | Meshbuffer on which the operation is performed. | |
m | transformation matrix. |
virtual void irr::scene::IMeshManipulator::transform | ( | IMesh * | mesh, | |
const core::matrix4 & | m | |||
) | const [pure virtual] |
Applies a transformation to a mesh.
mesh | Mesh on which the operation is performed. | |
m | transformation matrix. |
Referenced by transformMesh().
virtual void irr::scene::IMeshManipulator::transformMesh | ( | IMesh * | mesh, | |
const core::matrix4 & | m | |||
) | const [inline, virtual] |
Applies a transformation to a mesh.
mesh | Mesh on which the operation is performed. | |
m | transformation matrix. |
Definition at line 104 of file IMeshManipulator.h.
References transform().
The Irrlicht
Engine Documentation © 2003-2009 by Nikolaus Gebhardt. Generated
on Sun Jan 10 09:24:13 2010 by Doxygen
(1.5.6) |