spacing fixes in Avatar class

This commit is contained in:
Stephen Birarda 2013-04-25 16:18:17 -07:00
parent 507f39a052
commit 7e0dab6224
2 changed files with 107 additions and 118 deletions

View file

@ -358,29 +358,22 @@ void Avatar::simulate(float deltaTime) {
}
if (usingBigSphereCollisionTest) {
// test for avatar collision response (using a big sphere :)
updateAvatarCollisionDetectionAndResponse
(
_TEST_bigSpherePosition,
updateAvatarCollisionDetectionAndResponse(_TEST_bigSpherePosition,
_TEST_bigSphereRadius,
_TEST_bigSphereRadius,
glm::vec3( 0.0, 1.0, 0.0 ),
deltaTime
);
deltaTime);
}
if ( AVATAR_GRAVITY ) {
if ( _position.y > _bone[ AVATAR_BONE_RIGHT_FOOT ].radius * 2.0 ) {
_velocity += glm::dvec3( 0.0, -1.0, 0.0 ) * ( 6.0 * deltaTime );
}
else {
if ( _position.y < _bone[ AVATAR_BONE_RIGHT_FOOT ].radius ) {
} else if ( _position.y < _bone[ AVATAR_BONE_RIGHT_FOOT ].radius ) {
_position.y = _bone[ AVATAR_BONE_RIGHT_FOOT ].radius;
_velocity.y = 0.0;
}
}
}
// update body springs
updateBodySprings( deltaTime );

View file

@ -247,7 +247,6 @@ class Avatar : public AvatarData {
Avatar* _interactingOther;
bool _interactingOtherIsNearby;
// private methods...
void initializeSkeleton();
void updateSkeleton();
void initializeBodySprings();
@ -255,14 +254,11 @@ class Avatar : public AvatarData {
void calculateBoneLengths();
void readSensors();
void renderBoneAsBlock( AvatarBoneID b );
void updateAvatarCollisionDetectionAndResponse
(
glm::vec3 collisionPosition,
void updateAvatarCollisionDetectionAndResponse(glm::vec3 collisionPosition,
float collisionGirth,
float collisionHeight,
glm::vec3 collisionUpVector,
float deltaTime
);
float deltaTime);
};
#endif