//
//    File: shape.h
//
//    (C) 2000-2008 Helmut Cantzler
//
//    Licensed under the terms of the Lesser General Public License.
//

#ifndef _SHAPE_H
#define _SHAPE_H

#include <list>

#include "triangle.h"
#include "edge.h"
#include "vertex.h"

using namespace std;

class Shape
{
 public:
  Shape(list<Triangle*> *tri, list<Vertex*> *ver, const char *textName = "");
  Shape(list<Triangle*> *tri, const char *textName = "");
  Shape(list<Edge*> *edg, list<Vertex*> *ver);
  Shape(list<Vertex*> *ver);
  ~Shape();

  int getTextureId() const { return textureId; }
  void setTextureId(int id) { textureId = id; }
  const char* getTextureName() const { return textureName; }

  int numberOfVertices(void) const;
  int numberOfEdges(void) const;
  int numberOfTriangles(void) const;

  int contains(list<Vertex*> *vertices) const;
  void removeVertex(Vertex *ver);
  void changeVertex(const Vertex *oldVer, Vertex *newVer);
  void setTextureName(const char *textName);

  list<Triangle*> *triangles;
  list<Edge*> *edges;
  list<Vertex*> *vertices;

 private:
  int textureId;
  char *textureName;
};

#endif
