5 #ifndef __I_MESH_MANIPULATOR_H_INCLUDED__ 6 #define __I_MESH_MANIPULATOR_H_INCLUDED__ 76 bool angleWeighted =
false)
const=0;
83 bool smooth =
false,
bool angleWeighted =
false)
const=0;
93 bool angleWeighted=
false)
const=0;
103 bool angleWeighted=
false)
const=0;
190 f32 resolutionS,
f32 resolutionT,
202 f32 resolutionS,
f32 resolutionT,
303 template <
typename Functor>
306 return apply_(func, buffer, boundingBoxUpdate, func);
315 template <
typename Functor>
316 bool apply(
const Functor& func,
IMesh* mesh,
bool boundingBoxUpdate=
false)
const 325 if (boundingBoxUpdate)
333 if (boundingBoxUpdate)
345 template <
typename Functor>
375 if (boundingBoxUpdate)
383 if (boundingBoxUpdate)
virtual IMesh * createMeshWith2TCoords(IMesh *mesh) const =0
Creates a copy of the mesh, which will only consist of S3DVertex2TCoord vertices. ...
#define _IRR_DEPRECATED_
Defines a deprecated macro which generates a warning at compile time.
virtual void flipSurfaces(IMesh *mesh) const =0
Flips the direction of surfaces.
virtual const core::aabbox3df & getBoundingBox() const =0
Get the axis aligned bounding box of this meshbuffer.
float f32
32 bit floating point variable.
virtual void setBoundingBox(const core::aabbox3df &box)=0
Set axis aligned bounding box.
E_ANIMATED_MESH_TYPE
Possible types of (animated) meshes.
Unknown animated mesh type.
virtual s32 getPolyCount(IMesh *mesh) const =0
Get amount of polygons in mesh.
virtual const core::vector3df & getPosition(u32 i) const =0
returns position of vertex i
Everything in the Irrlicht Engine can be found in this namespace.
Simple implementation of the IMesh interface.
virtual void recalculateTangents(IMesh *mesh, bool recalculateNormals=false, bool smooth=false, bool angleWeighted=false) const =0
Recalculates tangents, requires a tangent mesh.
Vertex manipulator which scales the position of the vertex.
Vertex with two texture coordinates, video::S3DVertex2TCoords.
void reset(T x, T y, T z)
Resets the bounding box to a one-point box.
void scale(IMeshBuffer *buffer, const core::vector3df &factor) const
Scales the actual meshbuffer, not a scene node.
virtual IMeshBuffer * getMeshBuffer(u32 nr) const =0
Get pointer to a mesh buffer.
Class which holds the geometry of an object.
unsigned char u8
8 bit unsigned variable.
virtual void makePlanarTextureMapping(IMesh *mesh, f32 resolution=0.001f) const =0
Creates a planar texture mapping on the mesh.
const f32 ROUNDING_ERROR_f32
void transform(IMeshBuffer *buffer, const core::matrix4 &m) const
Applies a transformation to a meshbuffer.
Vertex with two texture coordinates.
virtual u32 getMeshBufferCount() const =0
Get the amount of mesh buffers.
signed int s32
32 bit signed variable.
Struct for holding a mesh with a single material.
void addInternalBox(const aabbox3d< T > &b)
Adds another bounding box.
Vertex with a tangent and binormal vector, video::S3DVertexTangents.
bool apply(const Functor &func, IMeshBuffer *buffer, bool boundingBoxUpdate=false) const
Apply a manipulator on the Meshbuffer.
void setVertexColorAlpha(IMeshBuffer *buffer, s32 alpha) const
Sets the alpha vertex color value of the whole mesh to a new value.
virtual IMesh * createMeshWith1TCoords(IMesh *mesh) const =0
Creates a copy of the mesh, which will only consist of S3DVertex vertices.
unsigned int u32
32 bit unsigned variable.
Standard vertex type used by the Irrlicht engine, video::S3DVertex.
Interface for vertex manipulators.
virtual _IRR_DEPRECATED_ void transformMesh(IMesh *mesh, const core::matrix4 &m) const
Applies a transformation to a mesh.
bool apply_(const Functor &func, IMeshBuffer *buffer, bool boundingBoxUpdate, const IVertexManipulator &typeTest) const
Apply a manipulator based on the type of the functor.
Vertex manipulator to set the alpha value of the vertex color to a fixed value.
virtual void recalculateNormals(IMesh *mesh, bool smooth=false, bool angleWeighted=false) const =0
Recalculates all normals of the mesh.
virtual IMesh * createMeshWelded(IMesh *mesh, f32 tolerance=core::ROUNDING_ERROR_f32) const =0
Creates a copy of a mesh with vertices welded.
virtual u32 getVertexCount() const =0
Get amount of vertices in meshbuffer.
standard vertex used by the Irrlicht engine.
virtual void setBoundingBox(const core::aabbox3df &box)=0
Set user-defined axis aligned bounding box.
bool apply(const Functor &func, IMesh *mesh, bool boundingBoxUpdate=false) const
Apply a manipulator on the Mesh.
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.
void setVertexColorAlpha(IMesh *mesh, s32 alpha) const
Sets the alpha vertex color value of the whole mesh to a new value.
virtual IMesh * createMeshUniquePrimitives(IMesh *mesh) const =0
Creates a copy of a mesh with all vertices unwelded.
Vertex manipulator which scales the TCoords of the vertex.
Class representing a 32 bit ARGB color.
4x4 matrix. Mostly used as transformation matrix for 3d calculations.
void setVertexColors(IMeshBuffer *buffer, video::SColor color) const
Sets the colors of all vertices to one color.
void addInternalPoint(const vector3d< T > &p)
Adds a point to the bounding box.
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.
void scaleTCoords(scene::IMeshBuffer *buffer, const core::vector2df &factor, u32 level=1) const
Scale the texture coords of a meshbuffer.
void setVertexColors(IMesh *mesh, video::SColor color) const
Sets the colors of all vertices to one color.
Base class of most objects of the Irrlicht Engine.
virtual const void * getVertices() const =0
Get access to vertex data. The data is an array of vertices.
Vertex manipulator to set color to a fixed color for all vertices.
Interface for an animated mesh.
virtual IMesh * createMeshWithTangents(IMesh *mesh, bool recalculateNormals=false, bool smooth=false, bool angleWeighted=false, bool recalculateTangents=true) const =0
Creates a copy of the mesh, which will only consist of S3DVertexTangents vertices.
An interface for easy manipulation of meshes.
void transform(IMesh *mesh, const core::matrix4 &m) const
Applies a transformation to a mesh.
void scaleTCoords(scene::IMesh *mesh, const core::vector2df &factor, u32 level=1) const
Scale the texture coords of a mesh.
Vertex with a tangent and binormal vector.
virtual SMesh * createMeshCopy(IMesh *mesh) const =0
Clones a static IMesh into a modifiable SMesh.
virtual IMesh * createForsythOptimizedMesh(const IMesh *mesh) const =0
Vertex cache optimization according to the Forsyth paper.
virtual video::E_VERTEX_TYPE getVertexType() const =0
Get type of vertex data which is stored in this meshbuffer.