Skip to content

Conversation

@alusch
Copy link

@alusch alusch commented Mar 21, 2025

In our projects we use aligned types by default, but in some data structures have a need for a tightly-packed quaternion to avoid padding. We're defining our own typedef at the moment, but seems like a nice thing to have in the library itself.

Not sure if there are any concerns about pulling in gtc/quaternion.hpp to gtc/type_aligned.hpp; I see it's not the first additional GTC header anyway. Happy to consider alternatives if it isn't desired, though.

Add aligned*_quat and packed*_quat typdefs mirroring vectors, and a new test to gtc_type_aligned.cpp.

return Error;
}

static int test_copy_quat()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this could be made into a templated function

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For sure! I was trying to follow what seemed to be the prevailing style in the tests, but happy to remove some duplication if that's desired.

@christophe-lunarg
Copy link

Thanks for contributing!

@christophe-lunarg christophe-lunarg merged commit be1fb4d into g-truc:master Oct 7, 2025
68 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants