diff options
Diffstat (limited to 'src/Skeleton.cpp')
-rw-r--r-- | src/Skeleton.cpp | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/src/Skeleton.cpp b/src/Skeleton.cpp index 58f6035..4a6910b 100644 --- a/src/Skeleton.cpp +++ b/src/Skeleton.cpp @@ -207,70 +207,6 @@ void Skeleton::Draw(int muscleview) jointcolor[2]=0; jointcolor[3]=.5; } - //Calc motionblur-ness - for(int i=0; i<max_joints; i++){ - joints[i].oldposition=joints[i].position; - joints[i].blurred=findDistance(joints[i].position,joints[i].oldposition)*100; - if(joints[i].blurred<1)joints[i].blurred=1; - } - - //Do Motionblur - glDepthMask(0); - glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); - glBegin(GL_QUADS); - for(int i=0; i<max_joints; i++){ - if(joints[i].hasparent){ - glColor4f(jointcolor[0],jointcolor[1],jointcolor[2],jointcolor[3]/joints[i].blurred); - glVertex3f(joints[i].position.x,joints[i].position.y,joints[i].position.z); - glColor4f(jointcolor[0],jointcolor[1],jointcolor[2],jointcolor[3]/joints[i].parent->blurred); - glVertex3f(joints[i].parent->position.x,joints[i].parent->position.y,joints[i].parent->position.z); - glColor4f(jointcolor[0],jointcolor[1],jointcolor[2],jointcolor[3]/joints[i].parent->blurred); - glVertex3f(joints[i].parent->oldposition.x,joints[i].parent->oldposition.y,joints[i].parent->oldposition.z); - glColor4f(jointcolor[0],jointcolor[1],jointcolor[2],jointcolor[3]/joints[i].blurred); - glVertex3f(joints[i].oldposition.x,joints[i].oldposition.y,joints[i].oldposition.z); - } - } - for(int i=0; i<num_muscles; i++){ - if(muscles[i].type==boneconnect){ - glColor4f(jointcolor[0],jointcolor[1],jointcolor[2],jointcolor[3]/muscles[i].parent2->blurred); - glVertex3f(muscles[i].parent1->position.x,muscles[i].parent1->position.y,muscles[i].parent1->position.z); - glColor4f(jointcolor[0],jointcolor[1],jointcolor[2],jointcolor[3]/muscles[i].parent2->blurred); - glVertex3f(muscles[i].parent2->position.x,muscles[i].parent2->position.y,muscles[i].parent2->position.z); - glColor4f(jointcolor[0],jointcolor[1],jointcolor[2],jointcolor[3]/muscles[i].parent2->blurred); - glVertex3f(muscles[i].parent2->oldposition.x,muscles[i].parent2->oldposition.y,muscles[i].parent2->oldposition.z); - glColor4f(jointcolor[0],jointcolor[1],jointcolor[2],jointcolor[3]/muscles[i].parent1->blurred); - glVertex3f(muscles[i].parent1->oldposition.x,muscles[i].parent1->oldposition.y,muscles[i].parent1->oldposition.z); - } - } - glEnd(); - - glBegin(GL_LINES); - for(int i=0; i<max_joints; i++){ - if(joints[i].hasparent){ - glColor4f(jointcolor[0],jointcolor[1],jointcolor[2],jointcolor[3]/joints[i].blurred); - glVertex3f(joints[i].position.x,joints[i].position.y,joints[i].position.z); - glColor4f(jointcolor[0],jointcolor[1],jointcolor[2],jointcolor[3]/joints[i].parent->blurred); - glVertex3f(joints[i].parent->position.x,joints[i].parent->position.y,joints[i].parent->position.z); - } - } - for(int i=0; i<num_muscles; i++){ - if(muscles[i].type==boneconnect){ - glColor4f(jointcolor[0],jointcolor[1],jointcolor[2],jointcolor[3]/muscles[i].parent1->blurred); - glVertex3f(muscles[i].parent1->position.x,muscles[i].parent1->position.y,muscles[i].parent1->position.z); - glColor4f(jointcolor[0],jointcolor[1],jointcolor[2],jointcolor[3]/muscles[i].parent2->blurred); - glVertex3f(muscles[i].parent2->position.x,muscles[i].parent2->position.y,muscles[i].parent2->position.z); - } - } - glColor3f(.6,.6,0); - if(muscleview==1) - for(int i=0; i<num_muscles; i++){ - if(muscles[i].type!=boneconnect){ - glVertex3f(muscles[i].parent1->position.x,muscles[i].parent1->position.y,muscles[i].parent1->position.z); - glVertex3f(muscles[i].parent2->position.x,muscles[i].parent2->position.y,muscles[i].parent2->position.z); - } - } - glEnd(); if(muscleview!=2){ glPointSize(3); |