Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General implementation of vec<T,M> and mat<T,M,N> #2

Open
sgorsten opened this issue Feb 28, 2016 · 4 comments
Open

General implementation of vec<T,M> and mat<T,M,N> #2

sgorsten opened this issue Feb 28, 2016 · 4 comments

Comments

@sgorsten
Copy link
Owner

Presently, vec<T,M> is only defined for M equal to 2, 3, or 4, and mat<T,M,N> is only defined for M and N equal to 2, 3, or 4. This is mainly to allow for the presence of member variables x, y, z, and w when appropriate, and to allow for construction using the {x,y,z} syntax.

Should we also provide a general implementation of vec and mat which would handle sizes greater than four? These could simply use a backing array (or perhaps std::array). They would not support element access with .x, .y, etc., but would support access by array index, as well as all other functions and operators.

@xelatihy
Copy link

Quick comment on this. Eigen allows access via .x() -like methods to support any length. It might work for you that way.

@xelatihy
Copy link

Any update on this? I have tried myself, but it is very hard to implement properly the constructor {elms} syntax. I would love to see how this could be done for both vectors and matrices.

@LudwikJaniuk
Copy link

Yes, please add this!

@woolgathering
Copy link

woolgathering commented Jul 16, 2021

This is critical functionality that I would love to have, even if the general case drops the presence of member variables x, y, z, and w or the curly brace constructor syntax.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants