Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008 #ifndef __SP_SCENE_MESH_MODIFIER_H__
00009 #define __SP_SCENE_MESH_MODIFIER_H__
00010
00011
00012 #include "Base/spStandard.hpp"
00013 #include "Base/spDimensionVector3D.hpp"
00014 #include "Base/spDimensionMatrix4.hpp"
00015
00016
00017 namespace sp
00018 {
00019 namespace video
00020 {
00021 class MeshBuffer;
00022 }
00023 namespace scene
00024 {
00025
00026
00027 class Mesh;
00028
00029
00034 class ClipVertex
00035 {
00036
00037 public:
00038
00039 ClipVertex()
00040 {
00041 }
00042 virtual ~ClipVertex()
00043 {
00044 }
00045
00046
00047
00048 virtual ClipVertex& operator = (const ClipVertex &Other) = 0;
00049 virtual ClipVertex& operator += (const ClipVertex &Other) = 0;
00050 virtual ClipVertex& operator -= (const ClipVertex &Other) = 0;
00051 virtual ClipVertex& operator *= (f32 Factor) = 0;
00052 virtual ClipVertex& operator /= (f32 Factor) = 0;
00053
00054
00055
00056 virtual dim::vector3df getCoord() const = 0;
00057
00058 };
00059
00060
00062 namespace MeshModifier
00063 {
00064
00066 SP_EXPORT void meshTranslate(video::MeshBuffer &Surface, const dim::vector3df &Direction);
00068 SP_EXPORT void meshTransform(video::MeshBuffer &Surface, const dim::vector3df &Size);
00070 SP_EXPORT void meshTransform(video::MeshBuffer &Surface, const dim::matrix4f &Matrix);
00072 SP_EXPORT void meshTurn(video::MeshBuffer &Surface, const dim::vector3df &Rotation);
00073
00075 SP_EXPORT void meshFlip(video::MeshBuffer &Surface);
00077 SP_EXPORT void meshFlip(video::MeshBuffer &Surface, bool isXAxis, bool isYAxis, bool isZAxis);
00078
00083 SP_EXPORT void meshClip(video::MeshBuffer &Surface, const dim::plane3df &Plane);
00084
00091 SP_EXPORT void meshFit(Mesh &Obj, const dim::vector3df &Position, const dim::vector3df &Size);
00092
00098 SP_EXPORT void meshSpherify(Mesh &Obj, f32 Factor);
00099
00106 SP_EXPORT void meshTwist(Mesh &Obj, f32 Rotation);
00107
00108 }
00109
00110
00111 }
00112
00113 }
00114
00115
00116 #endif
00117
00118
00119
00120