Skip to content
New issue

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

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

Already on GitHub? # to your account

Left handed perspective and lookAt functions #314

Merged
merged 2 commits into from
Feb 22, 2015
Merged

Left handed perspective and lookAt functions #314

merged 2 commits into from
Feb 22, 2015

Conversation

amc522
Copy link

@amc522 amc522 commented Feb 21, 2015

I split perspective, perspectiveFov, and lookAt into left handed and right handed functions. Each function is suffixed with LH and RH appropriately. The originally named functions default to calling the right handed function as to not change existing functionality. The default handedness of glm can be changed to left handed by defining GLM_LEFT_HAND.

@regnirpsj
Copy link

how about adding an enum or struct to express left-handedness or right-handed-ness (similar to std::nothrow_t and std::nothrow); this way overloading can be used to provide different versions.

@amc522
Copy link
Author

amc522 commented Feb 22, 2015

Yeah, I could put in an overloaded function with an enum designating left or right handedness. As long as Christophe doesnt have anything against it.

@Groovounet Groovounet added this to the GLM 0.9.7 milestone Feb 22, 2015
@Groovounet Groovounet self-assigned this Feb 22, 2015
Groovounet added a commit that referenced this pull request Feb 22, 2015
Left handed perspective and lookAt functions #314
@Groovounet Groovounet merged commit 88f4a5e into g-truc:master Feb 22, 2015
@Groovounet
Copy link
Member

The pull request looks great!
There isn't a precedent in GLM for overloading using an enum so I think this way is best.

Thanks for contributing!
Christophe

Groovounet added a commit that referenced this pull request Feb 22, 2015
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants