My Project
unordered_array.hpp
1 #pragma once
2 
3 #include <vector>
4 namespace ParaEngine
5 {
6  using std::vector;
7 
8  template <typename T>
9  class unordered_array : public vector<T>
10  {
11  public:
12  typedef vector<T> base_class_type;
13  typedef typename base_class_type::iterator iterator;
14  typedef typename base_class_type::const_iterator const_iterator;
15 
16  void erase(int nIndex)
17  {
18  if (nIndex < (int)base_class_type::size()){
19  base_class_type::operator[](nIndex) = base_class_type::back();
20  }
21  base_class_type::pop_back();
22  };
23 
24  iterator erase(iterator _Where)
25  {
26  *_Where = base_class_type::back();
27  size_t nIndex = (_Where - base_class_type::begin());
28  base_class_type::pop_back();
29  return !base_class_type::empty() ? (base_class_type::begin()+nIndex) : base_class_type::end();
30  }
31  };
32 
33 
34 }
35 
36 
different physics engine has different winding order.
Definition: EventBinding.h:32
Definition: unordered_array.hpp:9