Changed keyPoints

This commit is contained in:
Mateusz Walas 2021-12-31 13:28:10 +01:00
parent 3ee0d0d64e
commit e041b6fceb

View File

@ -38,11 +38,22 @@ Core::RenderContext submarineContext;
Core::RenderContext fishContext;
std::vector<glm::vec3> keyPoints({
glm::vec3(15.0f, 5.0f, 15.0f),
glm::vec3(15.0f, 5.0f, -15.0f),
glm::vec3(-15.0f, 5.0f, -15.0f),
glm::vec3(-15.0f, 5.0f, 15.0f),
glm::vec3(15.0f, 5.0f, 15.0f),
glm::vec3(-18.0f, -10.0f, -10.0f),
glm::vec3(-10.0f, -5.0f, -12.0f),
glm::vec3(8.0f, -3.0f, -3.0f),
glm::vec3(5.0f, 0.0f, 3.0f),
glm::vec3(3.0f, 2.0f, 4.0f),
glm::vec3(8.0f, 5.0f, 9.0f),
glm::vec3(14.0f, 6.0f, 15.0f),
glm::vec3(15.0f, 12.0f, 12.0f),
glm::vec3(10.0f, 17.0f, 15.0f),
glm::vec3(5.0f, 10.0f, 7.0f),
glm::vec3(-1.0f, 4.0f, 8.0f),
glm::vec3(-8.0f, 0.0f, 3.0f),
glm::vec3(-12.0f, -6.0f, -3.0f),
glm::vec3(-15.0f, -8.0f, -6.0f),
glm::vec3(-18.0f, -10.0f, -10.0f),
});
std::vector<glm::quat> keyRotation;
@ -177,7 +188,6 @@ glm::mat4 createCameraMatrix()
}
std::vector<glm::vec3> changeKeyPoints(std::vector<glm::vec3> keyPoints, glm::vec3 toChange) {
//void test(){
std::vector<glm::vec3> result;
int size = keyPoints.size();
glm::vec3 change;
@ -298,7 +308,7 @@ void renderScene()
drawObjectTexture(fishContext, animationMatrix(time + 15, change2), textureFish);
drawObjectTexture(fishContext, animationMatrix(time + 15, change3), textureFish);
drawObjectTexture(fishContext, animationMatrix(time + 15, change4), textureFish);
time -= 3;
time -= 6;
}
}
drawObjectTexture(submarineContext, submarineModelMatrix, textureSubmarine);
@ -385,7 +395,6 @@ void initKeyRotation() {
oldRotationCamera = rotation;
}
keyRotation.push_back(glm::quat(1, 0, 0, 0));
keyRotation.push_back(glm::quat(1, -1, 1, 1));
}
void init()