![]() |
Skylicht Engine
|
An interface for easy manipulation of meshes. More...
#include <C:/Projects/skylicht-engine/Projects/Irrlicht/Include/IMeshManipulator.h>
Public Member Functions | |
| virtual void | flipSurfaces (IMesh *mesh) const =0 |
| Flips the direction of surfaces. | |
| virtual void | setVertexColorAlpha (IMeshBuffer *meshBuffer, s32 alpha) const =0 |
| Sets the alpha vertex color value of the whole mesh to a new value. | |
| void | setVertexColorAlpha (IMesh *mesh, s32 alpha) const |
| Sets the alpha vertex color value of the whole mesh to a new value. | |
| virtual void | setVertexColors (IMeshBuffer *meshBuffer, video::SColor color) const =0 |
| Sets the colors of all vertices to one color. | |
| void | setVertexColors (IMesh *mesh, video::SColor color) const |
| Sets the colors of all vertices to one color. | |
| virtual void | scale (IMeshBuffer *meshBuffer, const core::vector3df &factor) const =0 |
| Scales the actual meshbuffer, not a scene node. | |
| void | scale (IMesh *mesh, const core::vector3df &factor) const |
| Scales the actual mesh, not a scene node. | |
| _IRR_DEPRECATED_ void | scaleMesh (IMesh *mesh, const core::vector3df &factor) const |
| Scales the actual mesh, not a scene node. | |
| virtual void | scaleTCoords (IMeshBuffer *meshBuffer, const core::vector2df &factor, u32 level=0) const =0 |
| Scale the texture coords of a meshbuffer. | |
| void | scaleTCoords (scene::IMesh *mesh, const core::vector2df &factor, u32 level=0) const |
| Scale the texture coords of a mesh. | |
| virtual void | transform (IMeshBuffer *meshBuffer, const core::matrix4 &mat) const =0 |
| Applies a transformation to a meshbuffer. | |
| void | transform (IMesh *mesh, const core::matrix4 &m) const |
| Applies a transformation to a mesh. | |
| virtual _IRR_DEPRECATED_ void | transformMesh (IMesh *mesh, const core::matrix4 &m) const |
| Applies a transformation to a mesh. | |
| virtual void | recalculateNormals (IMeshBuffer *meshBuffer, bool smooth=false, bool angleWeighted=false) const =0 |
| Recalculates all normals of the mesh buffer. | |
| void | recalculateNormals (IMesh *mesh, bool smooth=false, bool angleWeighted=false) const |
| Recalculates all normals of the mesh. | |
| virtual void | recalculateTangents (IMeshBuffer *meshBuffer, bool recalculateNormals=false, bool smooth=false, bool angleWeighted=false) const =0 |
| void | recalculateTangents (IMesh *mesh, bool recNormals=false, bool smooth=false, bool angleWeighted=false) const |
| virtual void | makePlanarTextureMapping (IMeshBuffer *meshBuffer, f32 resolution=0.001f) const =0 |
| Creates a planar texture mapping on the meshbuffer. | |
| void | makePlanarTextureMapping (IMesh *mesh, f32 resolution=0.001f) const |
| Creates a planar texture mapping on the mesh. | |
| virtual void | makePlanarTextureMapping (IMeshBuffer *meshBuffer, f32 resolutionS, f32 resolutionT, u8 axis, const core::vector3df &offset) const =0 |
| Creates a planar texture mapping on the meshbuffer. | |
| void | makePlanarTextureMapping (scene::IMesh *mesh, f32 resolutionS, f32 resolutionT, u8 axis, const core::vector3df &offset) const |
| Creates a planar texture mapping on the buffer. | |
| virtual bool | copyIndices (IIndexBuffer *srcBuffer, IIndexBuffer *dstBuffer) const =0 |
| virtual bool | copyVertices (IVertexBuffer *srcBuffer, u32 srcDescriptionBufferID, video::IVertexDescriptor *srcDescriptor, IVertexBuffer *dstBuffer, u32 dstDescriptionBufferID, video::IVertexDescriptor *dstDescriptor, bool copyCustomAttribute) const =0 |
| virtual bool | createTangents (IMeshBuffer *srcBuffer, IMeshBuffer *dstBuffer, bool copyCustomAttribute, bool recalculateNormals=false, bool smooth=false, bool angleWeighted=false)=0 |
| virtual bool | createUniquePrimitives (IMeshBuffer *srcBuffer, IMeshBuffer *dstBuffer) const =0 |
| virtual bool | createWelded (IMeshBuffer *srcBuffer, IMeshBuffer *dstBuffer, f32 tolerance=core::ROUNDING_ERROR_f32, bool check4Component=true, bool check3Component=true, bool check2Component=true, bool check1Component=true) const =0 |
| template<class T> | |
| bool | convertVertices (IMeshBuffer *buffer, video::IVertexDescriptor *descriptor, bool copyCustomAttribute=false) |
| template<class T> | |
| bool | createTangents (IMeshBuffer *buffer, video::IVertexDescriptor *descriptor, bool copyCustomAttribute=false) |
| template<class T> | |
| SMesh * | createMeshCopy (IMesh *mesh, video::IVertexDescriptor *descriptor, bool copyCustomAttribute=false) |
| virtual s32 | getPolyCount (IMesh *mesh) const =0 |
| Get amount of polygons in mesh. | |
| virtual IMesh * | createForsythOptimizedMesh (const IMesh *mesh) const =0 |
| Vertex cache optimization according to the Forsyth paper. | |
| Public Member Functions inherited from irr::IReferenceCounted | |
| IReferenceCounted () | |
| Constructor. | |
| virtual | ~IReferenceCounted () |
| Destructor. | |
| void | grab () const |
| Grabs the object. Increments the reference counter by one. | |
| bool | drop () const |
| Drops the object. Decrements the reference counter by one. | |
| s32 | getReferenceCount () const |
| Get the reference count. | |
| const c8 * | getDebugName () const |
| Returns the debug name of the object. | |
Additional Inherited Members | |
| Protected Member Functions inherited from irr::IReferenceCounted | |
| void | setDebugName (const c8 *newName) |
| Sets the debug name of the object. | |
An interface for easy manipulation of meshes.
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.
|
pure virtual |
Vertex cache optimization according to the Forsyth paper.
More information can be found at http://home.comcast.net/~tom_forsyth/papers/fast_vert_cache_opt.html
The function is thread-safe (read: you can optimize several meshes in different threads).
| mesh | Source mesh for the operation. |
|
pure virtual |
Flips the direction of surfaces.
Changes backfacing triangles to frontfacing triangles and vice versa.
| mesh | Mesh on which the operation is performed. |
|
pure virtual |
Get amount of polygons in mesh.
| mesh | Input mesh |
|
inline |
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. |
|
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. |
|
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). |
|
inline |
Creates a planar texture mapping on the buffer.
This method is currently implemented towards the LWO planar mapping. A more general biasing might be required.
| mesh | Mesh 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). |
|
inline |
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. |
|
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. |
|
inline |
Scales the actual mesh, not a scene node.
| mesh | Mesh on which the operation is performed. |
| factor | Scale factor for each axis. |
|
pure virtual |
Scales the actual meshbuffer, not a scene node.
| buffer | Meshbuffer on which the operation is performed. |
| factor | Scale factor for each axis. |
|
inline |
Scales the actual mesh, not a scene node.
| mesh | Mesh on which the operation is performed. |
| factor | Scale factor for each axis. |
|
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. |
|
inline |
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. |
|
inline |
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. |
|
pure virtual |
Sets the alpha vertex color value of the whole mesh to a new value.
| buffer | Meshbuffer on which the operation is performed. |
| alpha | New alpha value. Must be a value between 0 and 255. |
|
inline |
Sets the colors of all vertices to one color.
| mesh | Mesh on which the operation is performed. |
| color | New color. |
|
pure virtual |
Sets the colors of all vertices to one color.
| buffer | Meshbuffer on which the operation is performed. |
| color | New color. |
|
inline |
Applies a transformation to a mesh.
| mesh | Mesh on which the operation is performed. |
| m | transformation matrix. |
|
pure virtual |
Applies a transformation to a meshbuffer.
| buffer | Meshbuffer on which the operation is performed. |
| m | transformation matrix. |
|
inlinevirtual |
Applies a transformation to a mesh.
| mesh | Mesh on which the operation is performed. |
| m | transformation matrix. |