mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 08:49:05 +02:00
cleaned up a bunch of leftover tabs and converted each to 4 spaces
This commit is contained in:
parent
026ee4345c
commit
8457b91fe0
1 changed files with 231 additions and 225 deletions
|
@ -877,12 +877,18 @@ void Avatar::renderHead(bool lookingInMirror) {
|
||||||
|
|
||||||
if (lookingInMirror) {
|
if (lookingInMirror) {
|
||||||
glRotatef(_bodyYaw - _headYaw, 0, 1, 0);
|
glRotatef(_bodyYaw - _headYaw, 0, 1, 0);
|
||||||
glRotatef(_bodyPitch + _headPitch, 1, 0, 0);
|
//glRotatef(_bodyPitch + _headPitch, 1, 0, 0);
|
||||||
glRotatef(_bodyRoll - _headRoll, 0, 0, 1);
|
//glRotatef(_bodyRoll - _headRoll, 0, 0, 1);
|
||||||
|
// don't let body pitch and roll affect the head..
|
||||||
|
glRotatef( _headPitch, 1, 0, 0);
|
||||||
|
glRotatef( -_headRoll, 0, 0, 1);
|
||||||
} else {
|
} else {
|
||||||
glRotatef(_bodyYaw + _headYaw, 0, 1, 0);
|
glRotatef(_bodyYaw + _headYaw, 0, 1, 0);
|
||||||
glRotatef(_bodyPitch + _headPitch, 1, 0, 0);
|
//glRotatef(_bodyPitch + _headPitch, 1, 0, 0);
|
||||||
glRotatef(_bodyRoll + _headRoll, 0, 0, 1);
|
//glRotatef(_bodyRoll + _headRoll, 0, 0, 1);
|
||||||
|
// don't let body pitch and roll affect the head..
|
||||||
|
glRotatef( _headPitch, 1, 0, 0);
|
||||||
|
glRotatef( _headRoll, 0, 0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
//glScalef(2.0, 2.0, 2.0);
|
//glScalef(2.0, 2.0, 2.0);
|
||||||
|
@ -1234,7 +1240,6 @@ void Avatar::initializeBodySprings() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Avatar::updateBodySprings( float deltaTime ) {
|
void Avatar::updateBodySprings( float deltaTime ) {
|
||||||
for (int b = 0; b < NUM_AVATAR_JOINTS; b++) {
|
for (int b = 0; b < NUM_AVATAR_JOINTS; b++) {
|
||||||
glm::vec3 springVector( _joint[b].springyPosition );
|
glm::vec3 springVector( _joint[b].springyPosition );
|
||||||
|
@ -1282,7 +1287,7 @@ const glm::vec3& Avatar::getHeadPosition() const {
|
||||||
// return _joint[ AVATAR_JOINT_HEAD_BASE ].springyPosition;
|
// return _joint[ AVATAR_JOINT_HEAD_BASE ].springyPosition;
|
||||||
//}
|
//}
|
||||||
|
|
||||||
return _joint[ AVATAR_JOINT_HEAD_BASE ].position;
|
return _joint[ AVATAR_JOINT_HEAD_BASE ].springyPosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1325,8 +1330,6 @@ void Avatar::updateArmIKAndConstraints( float deltaTime ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void Avatar::renderBody() {
|
void Avatar::renderBody() {
|
||||||
|
|
||||||
// Render joint positions as spheres
|
// Render joint positions as spheres
|
||||||
|
@ -1360,7 +1363,8 @@ void Avatar::renderBody() {
|
||||||
glLineWidth(3.0);
|
glLineWidth(3.0);
|
||||||
|
|
||||||
for (int b = 1; b < NUM_AVATAR_JOINTS; b++) {
|
for (int b = 1; b < NUM_AVATAR_JOINTS; b++) {
|
||||||
if ( _joint[b].parent != AVATAR_JOINT_NULL ) {
|
if ( _joint[b].parent != AVATAR_JOINT_NULL )
|
||||||
|
if ( b != AVATAR_JOINT_HEAD_TOP ) {
|
||||||
glBegin( GL_LINE_STRIP );
|
glBegin( GL_LINE_STRIP );
|
||||||
glVertex3fv( &_joint[ _joint[ b ].parent ].springyPosition.x );
|
glVertex3fv( &_joint[ _joint[ b ].parent ].springyPosition.x );
|
||||||
glVertex3fv( &_joint[ b ].springyPosition.x );
|
glVertex3fv( &_joint[ b ].springyPosition.x );
|
||||||
|
@ -1368,6 +1372,7 @@ void Avatar::renderBody() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
else {
|
else {
|
||||||
glColor3fv( skinColor );
|
glColor3fv( skinColor );
|
||||||
glLineWidth(3.0);
|
glLineWidth(3.0);
|
||||||
|
@ -1381,6 +1386,7 @@ void Avatar::renderBody() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void Avatar::SetNewHeadTarget(float pitch, float yaw) {
|
void Avatar::SetNewHeadTarget(float pitch, float yaw) {
|
||||||
|
|
Loading…
Reference in a new issue