Advertisement
AI_UBI

Shape class

Dec 24th, 2015
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.80 KB | None | 0 0
  1. template<template<typename> class Vector, typename Type>
  2. class Shape
  3. {
  4. private:
  5.  
  6.     inline bool check_size(const std::vector<Vector<Type>> &v1, const std::vector<Vector<Type>> &v2) const;
  7.  
  8. protected:
  9.    
  10.     std::vector<Vector<Type>> verticies = {};
  11.     Vector<Type> axis = Vector<Type>(1,1);
  12.  
  13.     Shape(const std::vector<Vector<Type>> &);
  14.     Shape(const std::vector<Vector<Type>> &, const Vector<Type> &);
  15.  
  16. public:
  17.    
  18.     Shape() {}
  19.     ~Shape() {}
  20.  
  21.     inline virtual void setVertex(const size_t &, const Vector<Type> &);
  22.     inline virtual Vector<Type> & getVertex(const size_t &) const;
  23.  
  24.     inline virtual void addVertex(const size_t &, const Vector<Type> &);
  25.     inline virtual void delVertex(const size_t &);
  26.  
  27.     void setAxis(const Vector<Type> &);
  28.     Vector<Type> & getAxis() const;
  29.  
  30.     size_t & getVertexCount() const;
  31. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement