Bit of code clean up in LookAt
This commit is contained in:
parent
7297bc5c17
commit
0df6244b8b
1 changed files with 2 additions and 6 deletions
|
@ -108,13 +108,9 @@ Camera::LookAt(const Vector3& pt)
|
||||||
|
|
||||||
mRight = Vector3::Y.cross(mDirection).normalize();
|
mRight = Vector3::Y.cross(mDirection).normalize();
|
||||||
mUp = mDirection.cross(mRight);
|
mUp = mDirection.cross(mRight);
|
||||||
mDirection *= directionLength;
|
|
||||||
|
|
||||||
if (handedness > 0.0) {
|
mDirection *= directionLength;
|
||||||
mRight *= rightLength;
|
mRight *= (handedness > 0.0) ? rightLength : -rightLength;
|
||||||
} else {
|
|
||||||
mRight *= -rightLength;
|
|
||||||
}
|
|
||||||
mUp *= upLength;
|
mUp *= upLength;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue