History

Don't bother with testing the ignore orientations stuff.

Andrzej Kapolka committed 13 years ago

Commit 5194fb21 parent 04b72e31 file · +5 −14Browse files

Showing the changes to interface/src/AvatarVoxelSystem.cpp (1 of 1 file). Show all

Unified · Split

interface/src/AvatarVoxelSystem.cpp+5−14
@@ -83,18 +83,13 @@ public: · 82 unmodified lines
8383 bool bindVoxelsTogether;
8484 int maxBonesPerBind;
8585 bool includeBonesOutsideBindRadius;
86− bool ignoreOrientations;
8786 };
8887
8988 const Mode MODES[] = {
90− { false, BONE_ELEMENTS_PER_VERTEX, false, false }, // original
91− { false, 1, true, false }, // one bone per vertex
92− { true, 1, true, false }, // one bone per voxel
93− { true, BONE_ELEMENTS_PER_VERTEX, false, false }, // four bones per voxel
94− { false, BONE_ELEMENTS_PER_VERTEX, false, true }, // no orientations
95− { false, 1, true, true }, // no orientations, one bone per vertex
96− { true, 1, true, true }, // no orientations, one bone per voxel
97− { true, BONE_ELEMENTS_PER_VERTEX, false, true } }; // no orientations, four bones per voxel
89+ { false, BONE_ELEMENTS_PER_VERTEX, false }, // original
90+ { false, 1, true }, // one bone per vertex
91+ { true, 1, true }, // one bone per voxel
92+ { true, BONE_ELEMENTS_PER_VERTEX, false } }; // four bones per voxel
9893
9994 void AvatarVoxelSystem::cycleMode() {
10095 _mode = (_mode + 1) % (sizeof(MODES) / sizeof(MODES[0]));
@@ -221,11 +216,7 @@ void AvatarVoxelSystem::applyScaleAndBindProgram(bool texture) { · 120 unmodified lines
221216 glm::quat orientation;
222217 _avatar->getBodyBallTransform((AvatarJointID)i, position, orientation);
223218 boneMatrices[i].translate(position.x, position.y, position.z);
224− if (MODES[_mode].ignoreOrientations) {
225− orientation = _avatar->getOrientation();
226− } else {
227− orientation = orientation * glm::inverse(_avatar->getSkeleton().joint[i].absoluteBindPoseRotation);
228− }
219+ orientation = orientation * glm::inverse(_avatar->getSkeleton().joint[i].absoluteBindPoseRotation);
229220 boneMatrices[i].rotate(QQuaternion(orientation.w, orientation.x, orientation.y, orientation.z));
230221 const glm::vec3& bindPosition = _avatar->getSkeleton().joint[i].absoluteBindPosePosition;
231222 boneMatrices[i].translate(-bindPosition.x, -bindPosition.y, -bindPosition.z);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t