aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsotech117 <michael_foiani@brown.edu>2023-12-08 12:58:05 -0500
committersotech117 <michael_foiani@brown.edu>2023-12-08 12:58:05 -0500
commit0685421a59c080aca14ee1d95b76bfee89083d88 (patch)
treeeb5cf5dadde6104b62ade744e8135f543d8906ad
parentf52fe6b21ae625fa325af4d78704abc8b2cfa689 (diff)
small change to vector
-rw-r--r--src/4dvecops/vec4operations.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/4dvecops/vec4operations.cpp b/src/4dvecops/vec4operations.cpp
index a54b758..58d87e6 100644
--- a/src/4dvecops/vec4operations.cpp
+++ b/src/4dvecops/vec4operations.cpp
@@ -33,7 +33,7 @@ glm::mat4 getViewMatrix4(
glm::vec4 fromPoint,
glm::vec4 toPoint,
glm::vec4 upVector,
- glm::vec4 overVector) {
+ glm::vec4 lookVector) {
// calculate e3 basis vector, the transformation col of view matrix
if (glm::distance(fromPoint, toPoint) < 0.0001f) {
@@ -42,14 +42,14 @@ glm::mat4 getViewMatrix4(
glm::vec4 e3 = glm::normalize(fromPoint - toPoint);
// calculate e2 basis vector, from the combinatory cross of up and over with e3
- glm::vec4 e2 = cross4(upVector, overVector, e3);
+ glm::vec4 e2 = cross4(upVector, lookVector, e3);
e2 = glm::normalize(e2);
if (glm::distance(e2, glm::vec4{0, 0, 0, 1}) < 0.0001f) {
throw std::runtime_error("invalid up vector");
}
// calculate e1 basis vector, from the cross of only the over vector
- glm::vec4 e1 = cross4(overVector, e3, e2);
+ glm::vec4 e1 = cross4(lookVector, e3, e2);
e1 = glm::normalize(e1);
if (glm::distance(e1, glm::vec4{0, 0, 0, 1}) < 0.0001f) {
throw std::runtime_error("invalid over vector");