Collision: Vector class (java)
- by user8363
When handling collision detection / response and you need a Vector class, do you need to create that class yourself or is there a java class you can use?
A vector class should have methods like: subtract(Vector v), normalize(), dotProduct(Vector v), ...
At the moment it seems logical to use classes like java.awt.Rectangle and java.awt.Polygon to calculate collisions. Would I be right to use these classes for this purpose?
My question is not about how to implement collision detection, I know how that works. However I'm wondering what would be a correct and clean way to implement it in java since I'm fairly new to the language and to application development in general.