Open makingthematrix opened 6 years ago
So far, I decided to use a thin wrapper over cgmath::Vector3d<f64>
. Both the underlying implementation might change (cgmath
-> nalgebra
?), and the way I use it too (from the so-called Newtype
idiom - this wrapper pattern - to traits, for example). Also, the user might have even different ideas, so yeah. Any change has to be carefully planned, but on the other hand I don't wish to get stuck here and never develop anything, because omg what if.
A 3D normalized mathematical vector. It should be possible to create them by operations on other vectors (especially multiplication) and from two
Position
s. I imagine the basic way to useDirection
s will be to compute the difference angle (in degrees) between what the agent is turned to and what it should be pointing at. So, simple mathematical operations involvingDirection
s andPosition
s are necessary. In the same time keep it simple so it might be eventually replaced by something from an external crate.Also, utility methods for when we don't care about the
z
component.