boostorg / qvm

Boost Quaternions, Vectors, Matrices library
Boost Software License 1.0
81 stars 45 forks source link

Request macro's for vec adaption like Boost.Geometry #11

Closed agate-pris closed 5 years ago

agate-pris commented 6 years ago

boost::qvm::vec_traits_defaults provides easy way to adapt user defined class but it is not easy to adapt old style struct such as having data member x, y, and z. Boost.Geometry has it by following macros.

I'v made macro to according to above so please confirm and incorporate it.

Here is my forked repository's branch.

Implementation commit is here and test is here. I did not make the document because I did not know how to make it, sorry. Indentation too.

zajo commented 6 years ago

I apologize for the late reply. I notice that you've added the macros in files under gen, which is a directory that contains only source files that are generated by a program. Were the sources generated by a program?

agate-pris commented 6 years ago

No, it is not automatically generated programs.

I'm sorry that I misunderstood that directory gen is for similar contents for each dimension.

I should actually generate these macros automatically, but first fix it by moving them from the file under gen to include/boost/qvm/vec_registerx.hpp.

Thank you.

agate-pris commented 6 years ago

I moved conent in include/boost/qvm/gen/vec_register(*).hpp to include/boost/qvm/vec_register$1.hpp.

Commit URLs are changed because I used rebase.

zajo commented 5 years ago

Thank you, I incorporated your changes into develop, will move into master after testing. I have not updated the documentation though, hopefully I get to it soon.

agate-pris commented 5 years ago

Thank you!