Merge pull request #1165 from birarda/assignment

fix broken build in Skeleton merge
This commit is contained in:
Stephen Birarda 2013-10-31 15:39:00 -07:00
commit 36f4e148dc

View file

@ -42,6 +42,18 @@ bool SkeletonModel::render(float alpha) {
glm::vec3 skinColor, darkSkinColor;
_owningAvatar->getSkinColors(skinColor, darkSkinColor);
for (int i = 0; i < _jointStates.size(); i++) {
glPushMatrix();
glm::vec3 position;
getJointPosition(i, position);
glTranslatef(position.x, position.y, position.z);
glm::quat rotation;
getJointRotation(i, rotation);
glm::vec3 axis = glm::axis(rotation);
glRotatef(glm::angle(rotation), axis.x, axis.y, axis.z);
glColor4f(skinColor.r, skinColor.g, skinColor.b, alpha);
const float BALL_RADIUS = 0.005f;
const int BALL_SUBDIVISIONS = 10;
@ -61,6 +73,7 @@ bool SkeletonModel::render(float alpha) {
Avatar::renderJointConnectingCone(parentPosition, position, STICK_RADIUS * _owningAvatar->getScale(),
STICK_RADIUS * _owningAvatar->getScale());
}
}
Model::render(alpha);