00001
00002
00003
00004
00005
00006 #ifndef _SKINNED_MESH_SHAPE_H_
00007 #define _SKINNED_MESH_SHAPE_H_
00008
00009 #include <irrArray.h>
00010
00011 #include <btPolyhedralConvexShape.h>
00012
00013 namespace irr
00014 {
00015 namespace scene
00016 {
00017 struct SSkinMeshBuffer;
00018 }
00019 }
00020
00021 class SkinnedMeshShape : public btPolyhedralConvexShape
00022 {
00023 public:
00024 SkinnedMeshShape(irr::core::array<irr::scene::SSkinMeshBuffer*> *s);
00025 virtual ~SkinnedMeshShape();
00026
00027 virtual btVector3 localGetSupportingVertex(const btVector3& vec)const;
00028 virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const;
00029
00030 virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(
00031 const btVector3* vectors,
00032 btVector3* supportVerticesOut,
00033 int numVectors
00034 ) const;
00035
00036 virtual int getShapeType() const;
00037
00038
00039 virtual const char* getName() const;
00040
00041 virtual int getNumVertices() const;
00042 virtual int getNumEdges() const;
00043 virtual void getEdge(int i,btPoint3& pa,btPoint3& pb) const;
00044 virtual void getVertex(int i,btPoint3& vtx) const;
00045 virtual int getNumPlanes() const;
00046 virtual void getPlane(btVector3& planeNormal,btPoint3& planeSupport,int i ) const;
00047 virtual bool isInside(const btPoint3& pt,btScalar tolerance) const;
00048
00049 virtual void setLocalScaling(const btVector3& scaling);
00050 virtual const btVector3& getLocalScaling() const;
00051
00052 private:
00053 btVector3 m_scaling;
00054 irr::core::array<irr::scene::SSkinMeshBuffer*> *m_skin;
00055 };
00056
00057 #endif // _SKINNED_MESH_SHAPE_H_