basic/geometry/Mesh.h

Go to the documentation of this file.
00001 #ifndef Mesh_h
00002 #define Mesh_h 1
00003 
00004 #include <istream>
00005 #ifdef BADSTL
00006     #include <stdstring.h>
00007     #include <stdvector.h>
00008 #else
00009     #include <string>
00010     #include <vector>
00011 #endif
00012 #include "vcollide\src\vcollide.h"
00013 
00014 #include "geometry\Facet.h"
00015 #include "geometry\MPK_Sphere.h"
00016 #include "geometry\ObjectBase.h"
00017 
00018 class IGS_MeshTri;
00019 class Segment;
00020 class Vector4;
00021 
00022 typedef std::vector< Vector4 > VECTOR4VECTOR;
00023 typedef std::vector< Facet >   FACETVECTOR;
00024 
00025 class Mesh : public ObjectBase  //## Inherits: <unnamed>%37431D180009
00026 {
00027   public:
00028       Mesh (FrameManager* frameManager);
00029       Mesh (const Mesh& right);
00030           Mesh( const IGS_MeshTri& right );
00031       virtual ~Mesh();
00032 
00033 
00034       virtual bool    CanCheckInterference (const Entity* entity) const;
00035       virtual Entity* Clone () const;
00036       virtual bool    IsInterfering (const Entity* entity) const;
00037       void            AddFacet (const Facet& facet);
00038       void            AddVertex (const Vector4& vertex);
00039       const FACETVECTOR&   GetFacets() const;
00040       FACETVECTOR&         GetFacets();
00041       const VECTOR4VECTOR& GetVertexes() const;
00042       VECTOR4VECTOR&       GetVertexes();
00043       bool            ReadFromIcollideFile (std::string fileName);
00044       void SetCoordinates (const std::vector<Vector4>& vertexes);
00045       void TransformVerticies (const Matrix4x4& transform);
00046       void SetCoordinateEnumerations (const std::vector< std::vector < unsigned int > >& vertexes);
00047       void AddToVcollide (VCollide& vcollide) const;
00048       virtual bool IsInterfering (const Mesh* entity) const;
00049       static void ResetVcollide ();
00050       void Splice (const Mesh& mesh);
00051       virtual void SetFrame (const Matrix4x4& frame);
00052       virtual bool IsInterfering (const MPK_Sphere* entity) const;
00053       virtual void Serialize (ostream& os) const;
00054       virtual void Deserialize (IfstreamWithComments& is);
00055       bool Validate () const;
00056           virtual bool Verify() const;
00057           virtual int TotalPolys() const;
00058       VECTOR4VECTOR vertexes;
00059       FACETVECTOR   facets;
00060 
00061   protected:
00062 
00063   private:
00064       mutable int vcollideIndex;
00065       static int maxVcollideIndex;
00066       static VCollide* vcollide;
00067       static int countInstances;
00068 };
00069 
00070 #endif

Generated on Sat Apr 1 21:30:33 2006 for Motion Planning Kernel by  doxygen 1.4.6-NO