Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members | Tutorials

IMeshManipulator.h

Go to the documentation of this file.
00001 // Copyright (C) 2002-2009 Nikolaus Gebhardt
00002 // This file is part of the "Irrlicht Engine".
00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
00004 
00005 #ifndef __I_MESH_MANIPULATOR_H_INCLUDED__
00006 #define __I_MESH_MANIPULATOR_H_INCLUDED__
00007 
00008 #include "IReferenceCounted.h"
00009 #include "vector3d.h"
00010 #include "aabbox3d.h"
00011 #include "matrix4.h"
00012 #include "IAnimatedMesh.h"
00013 #include "SColor.h"
00014 
00015 namespace irr
00016 {
00017 namespace scene
00018 {
00019 
00020         class IMesh;
00021         class IMeshBuffer;
00022         struct SMesh;
00023 
00025 
00030         class IMeshManipulator : public virtual IReferenceCounted
00031         {
00032         public:
00033 
00035 
00038                 virtual void flipSurfaces(IMesh* mesh) const = 0;
00039 
00041 
00043                 virtual void setVertexColorAlpha(IMesh* mesh, s32 alpha) const = 0;
00044 
00046 
00048                 virtual void setVertexColors(IMesh* mesh, video::SColor color) const = 0;
00049 
00051 
00054                 virtual void recalculateNormals(IMesh* mesh, bool smooth = false, bool angleWeighted = false) const = 0;
00055 
00057 
00060                 virtual void recalculateNormals(IMeshBuffer* buffer, bool smooth = false, bool angleWeighted = false) const = 0;
00061 
00063 
00065                 virtual void scale(IMesh* mesh, const core::vector3df& factor) const = 0;
00066 
00068 
00070                 virtual void scale(IMeshBuffer* buffer, const core::vector3df& factor) const = 0;
00071 
00073 
00076                 virtual void scaleMesh(IMesh* mesh, const core::vector3df& factor) const {return scale(mesh,factor);}
00077 
00079 
00082                 virtual void scaleTCoords(scene::IMesh* mesh, const core::vector2df& factor, u32 level=1) const =0;
00083 
00085 
00088                 virtual void scaleTCoords(scene::IMeshBuffer* buffer, const core::vector2df& factor, u32 level=1) const =0;
00089 
00091 
00093                 virtual void transform(IMesh* mesh, const core::matrix4& m) const = 0;
00094 
00096 
00098                 virtual void transform(IMeshBuffer* buffer, const core::matrix4& m) const = 0;
00099 
00101 
00104                 virtual void transformMesh(IMesh* mesh, const core::matrix4& m) const {return transform(mesh,m);}
00105 
00107 
00113                 virtual SMesh* createMeshCopy(IMesh* mesh) const = 0;
00114 
00116 
00120                 virtual void makePlanarTextureMapping(IMesh* mesh, f32 resolution=0.001f) const =0;
00121 
00123 
00127                 virtual void makePlanarTextureMapping(scene::IMeshBuffer* meshbuffer, f32 resolution=0.001f) const =0;
00128 
00130 
00137                 virtual void makePlanarTextureMapping(scene::IMeshBuffer* buffer, f32 resolutionS, f32 resolutionT, u8 axis, const core::vector3df& offset) const =0;
00138 
00140 
00155                 virtual IMesh* createMeshWithTangents(IMesh* mesh, bool recalculateNormals=false, bool smooth=false, bool angleWeighted=false) const = 0;
00156 
00158 
00163                 virtual IMesh* createMeshWith2TCoords(IMesh* mesh) const = 0;
00164 
00166 
00171                 virtual IMesh* createMeshWith1TCoords(IMesh* mesh) const = 0;
00172 
00174 
00179                 virtual IMesh* createMeshUniquePrimitives(IMesh* mesh) const = 0;
00180 
00182 
00187                 virtual IMesh* createMeshWelded(IMesh* mesh, f32 tolerance=core::ROUNDING_ERROR_f32) const = 0;
00188 
00190 
00192                 virtual s32 getPolyCount(IMesh* mesh) const = 0;
00193 
00195 
00197                 virtual s32 getPolyCount(IAnimatedMesh* mesh) const = 0;
00198 
00200 
00206                 virtual IAnimatedMesh * createAnimatedMesh(IMesh* mesh,
00207                         scene::E_ANIMATED_MESH_TYPE type = scene::EAMT_UNKNOWN) const = 0;
00208         };
00209 
00210 } // end namespace scene
00211 } // end namespace irr
00212 
00213 
00214 #endif
00215 

The Irrlicht Engine
The Irrlicht Engine Documentation © 2003-2009 by Nikolaus Gebhardt. Generated on Sun Jan 10 09:24:03 2010 by Doxygen (1.5.6)