Vector.pkg 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. $#include "Vector.h"
  2. $#include "Vector3.h"
  3. $#include "OctreeQuery.h"
  4. class PODVector
  5. {
  6. TOLUA_TEMPLATE_BIND(T, Vector3, RayQueryResult)
  7. PODVector();
  8. PODVector(const PODVector<T>& vector);
  9. ~PODVector();
  10. PODVector<T> operator + (const T& rhs) const;
  11. PODVector<T> operator + (const PODVector<T>& rhs) const;
  12. bool operator == (const PODVector<T>& rhs) const;
  13. T& operator [] (unsigned index);
  14. const T& operator [] (unsigned index) const;
  15. T& At(unsigned index);
  16. const T& At(unsigned index) const;
  17. void Push(const T& value);
  18. void Push(const PODVector<T>& vector);
  19. void Pop();
  20. void Insert(unsigned pos, const T& value);
  21. void Insert(unsigned pos, const PODVector<T>& vector);
  22. void Erase(unsigned pos, unsigned length = 1);
  23. bool Remove(const T& value);
  24. void Clear();
  25. void Resize(unsigned newSize);
  26. void Reserve(unsigned newCapacity);
  27. void Compact();
  28. bool Contains(const T& value) const;
  29. T& Front();
  30. const T& Front() const;
  31. T& Back();
  32. const T& Back() const;
  33. unsigned Size() const;
  34. unsigned Capacity() const;
  35. bool Empty() const;
  36. tolua_readonly tolua_property__no_prefix unsigned size;
  37. tolua_readonly tolua_property__no_prefix unsigned capacity;
  38. tolua_readonly tolua_property__no_prefix bool empty;
  39. };
  40. $renaming PODVector<RayQueryResult> @ RayQueryResultVector