[Scummvm-git-logs] scummvm master -> 6ef5efbbed62b68a2e2b309635745c5ecf449b3d
aquadran
aquadran at gmail.com
Mon Oct 18 05:52:24 UTC 2021
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
6ef5efbbed STARK: Get use interpolate vector3d helper
Commit: 6ef5efbbed62b68a2e2b309635745c5ecf449b3d
https://github.com/scummvm/scummvm/commit/6ef5efbbed62b68a2e2b309635745c5ecf449b3d
Author: PaweÅ KoÅodziejski (aquadran at gmail.com)
Date: 2021-10-18T07:52:20+02:00
Commit Message:
STARK: Get use interpolate vector3d helper
Changed paths:
engines/stark/gfx/openglactor.cpp
diff --git a/engines/stark/gfx/openglactor.cpp b/engines/stark/gfx/openglactor.cpp
index f68779e559..0d62f1d0e6 100644
--- a/engines/stark/gfx/openglactor.cpp
+++ b/engines/stark/gfx/openglactor.cpp
@@ -141,7 +141,7 @@ void OpenGLActorRenderer::render(const Math::Vector3d &position, float direction
position1 += bone1Position;
bone2Rotation.transform(position2);
position2 += bone2Position;
- Math::Vector3d modelPosition = position2 * (1.0 - boneWeight) + position1 * boneWeight;
+ Math::Vector3d modelPosition = Math::Vector3d::interpolate(position2, position1, boneWeight);
vertex.x = modelPosition.x();
vertex.y = modelPosition.y();
vertex.z = modelPosition.z();
@@ -151,7 +151,7 @@ void OpenGLActorRenderer::render(const Math::Vector3d &position, float direction
bone1Rotation.transform(n1);
Math::Vector3d n2 = normal;
bone2Rotation.transform(n2);
- Math::Vector3d modelNormal = Math::Vector3d(n2 * (1.0 - boneWeight) + n1 * boneWeight).getNormalized();
+ Math::Vector3d modelNormal = Math::Vector3d(Math::Vector3d::interpolate(n2, n1, boneWeight)).getNormalized();
vertex.nx = modelNormal.x();
vertex.ny = modelNormal.y();
vertex.nz = modelNormal.z();
More information about the Scummvm-git-logs
mailing list