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

Test quaternions vs. basis directions for Frame3d implementation #109

Open
ianmackenzie opened this issue Oct 10, 2019 · 2 comments
Open

Comments

@ianmackenzie
Copy link
Owner

Using quaternions internally would be more compact (fewer allocations!) and would avoid the potential issue of basis directions becoming denormalized/non-orthogonal after repeated rotations. On the other hand, using quaternions could mean that placeIn/relativeTo would be slower (a bit more math to do) and would mean that anything that called Frame3d.xDirection (directly, or indirectly via Frame3d.xAxis etc.) would require allocating a new Direction3d value instead of simply returning the internal Direction3d. To be benchmarked!

@ianmackenzie
Copy link
Owner Author

Along the same lines, Frame2d could be internally represented using something like an Angle instead of a pair of basis directions.

@ianmackenzie
Copy link
Owner Author

One issue to keep in mind: it's also necessary to be able to represent left-handed frames. Is it sufficient to just have an internal Bool flag? Is there a better way?

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

No branches or pull requests

1 participant