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

Added Matrix4::lookAt #88

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@wivlaro
Contributor

wivlaro commented Feb 1, 2015

No description provided.

@mosra

This comment has been minimized.

Show comment
Hide comment
@mosra

mosra Feb 4, 2015

Owner

Thinking about the two normalized() calls, am I assuming right that if up was expected to be already normalized, doing just

Vector3<T> xaxis = Vector3<T>::cross(upNormalized,zaxis); // The "right" vector.

would be enough?

Not sure about the desired use cases, but if the user could ensure that up is normalized (which I assume in most cases is), the function would be one sqrt operation cheaper.

Owner

mosra commented Feb 4, 2015

Thinking about the two normalized() calls, am I assuming right that if up was expected to be already normalized, doing just

Vector3<T> xaxis = Vector3<T>::cross(upNormalized,zaxis); // The "right" vector.

would be enough?

Not sure about the desired use cases, but if the user could ensure that up is normalized (which I assume in most cases is), the function would be one sqrt operation cheaper.

@mosra mosra added the feature label Feb 4, 2015

@mosra mosra self-assigned this Feb 4, 2015

@wivlaro

This comment has been minimized.

Show comment
Hide comment
@wivlaro

wivlaro Feb 4, 2015

Contributor

Sure. I guess we can just assert that up is normalized.

Contributor

wivlaro commented Feb 4, 2015

Sure. I guess we can just assert that up is normalized.

@mosra

This comment has been minimized.

Show comment
Hide comment
@mosra

mosra Feb 4, 2015

Owner

Merged in 80e01ae, thanks.

Sorry about the normalization, brain fart on my side (result of cross product is not always unit vector).

Owner

mosra commented Feb 4, 2015

Merged in 80e01ae, thanks.

Sorry about the normalization, brain fart on my side (result of cross product is not always unit vector).

@mosra mosra closed this Feb 4, 2015

@mosra mosra added this to the 2015.05 milestone Feb 15, 2018

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