- std::vector<geometry::Vector<Uint8> >::size_type NumPositions() const { return positions.size(); }
- template<class U>
- void CalculatePositions(U width, U height, std::vector<geometry::Vector<U> > &dest) const {
- dest.clear();
- dest.reserve(positions.size());
- for (std::vector<geometry::Vector<Uint8> >::const_iterator i(positions.begin()), end(positions.end()); i != end; ++i) {
- dest.push_back(geometry::Vector<U>(
- i->X() * width / 255,
- i->Y() * height / 223
- ));
- }
- }
- template<class U>
- geometry::Vector<U> CalculatePosition(std::vector<geometry::Vector<Uint8> >::size_type index, U width, U height) const {
- assert(index >= 0 && index < positions.size());
- return geometry::Vector<U>(
- positions[index].X() * width / 255,
- positions[index].Y() * height / 223
- );
- }
+ std::vector<geometry::Vector<int> >::size_type NumPositions() const { return numPositions; }
+ void CalculatePositions(int width, int height, std::vector<geometry::Vector<int> > &dest) const;
+ geometry::Vector<int> CalculatePosition(int index, int width, int height) const;