Registered Member
|
What is the eigen way of converting vector3d to vector3i or vector2i.
Eg. how do i convert vector3d vec(3.555,0.4444,3.333) to vector3i and vector2i? |
Registered Member
|
This code casted your example double vector to an integer vector for me:
Source: https://stackoverflow.com/a/53497636/13784831 This code "selects" the first 2 elements in the vector:
Reference: https://eigen.tuxfamily.org/dox/group__ ... tions.html Combine these to convert the first two elements of a double vector to a 2-element integer vector:
|
Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]