Merge remote-tracking branch 'upstream/master' into agentlist-array

This commit is contained in:
Stephen Birarda 2013-04-25 16:40:20 -07:00
commit cdb8b1b144
4 changed files with 10 additions and 22 deletions

View file

@ -384,28 +384,22 @@ void Avatar::simulate(float deltaTime) {
_thrust = glm::vec3( 0.0, 0.0, 0.0 );
if (_driveKeys[FWD]) {
glm::vec3 front( _orientation.getFront().x, _orientation.getFront().y, _orientation.getFront().z );
_thrust += front * THRUST_MAG;
_thrust += _orientation.getFront() * THRUST_MAG;
}
if (_driveKeys[BACK]) {
glm::vec3 front( _orientation.getFront().x, _orientation.getFront().y, _orientation.getFront().z );
_thrust -= front * THRUST_MAG;
_thrust -= _orientation.getFront() * THRUST_MAG;
}
if (_driveKeys[RIGHT]) {
glm::vec3 right( _orientation.getRight().x, _orientation.getRight().y, _orientation.getRight().z );
_thrust += right * THRUST_MAG;
_thrust += _orientation.getRight() * THRUST_MAG;
}
if (_driveKeys[LEFT]) {
glm::vec3 right( _orientation.getRight().x, _orientation.getRight().y, _orientation.getRight().z );
_thrust -= right * THRUST_MAG;
_thrust -= _orientation.getRight() * THRUST_MAG;
}
if (_driveKeys[UP]) {
glm::vec3 up( _orientation.getUp().x, _orientation.getUp().y, _orientation.getUp().z );
_thrust += up * THRUST_MAG;
_thrust += _orientation.getUp() * THRUST_MAG;
}
if (_driveKeys[DOWN]) {
glm::vec3 up( _orientation.getUp().x, _orientation.getUp().y, _orientation.getUp().z );
_thrust -= up * THRUST_MAG;
_thrust -= _orientation.getUp() * THRUST_MAG;
}
if (_driveKeys[ROT_RIGHT]) {
_bodyYawDelta -= YAW_MAG * deltaTime;
@ -1210,4 +1204,4 @@ void Avatar::processTransmitterData(unsigned char* packetData, int numBytes) {
addVelocity(linVel);
*/
}
}

View file

@ -161,10 +161,6 @@ namespace starfield {
#if STARFIELD_HEMISPHERE_ONLY
altitude = std::max(0.0f, altitude);
#endif
unsigned tileIndex =
_objTiling.getTileIndex(azimuth, altitude);
// printLog("Stars.cpp: starting on tile #%d\n", tileIndex);
#if STARFIELD_DEBUG_CULLING
mat4 matrix_debug = glm::translate(glm::frustum(-hw, hw, -hh, hh, nearClip, 10.0f),

View file

@ -171,10 +171,8 @@ int AvatarData::parseData(unsigned char* sourceBuffer, int numBytes) {
return sourceBuffer - startPosition;
}
glm::vec3 AvatarData::getPosition() {
return glm::vec3(_position.x,
_position.y,
_position.z);
const glm::vec3& AvatarData::getPosition() const {
return _position;
}
void AvatarData::setPosition(glm::vec3 position) {

View file

@ -20,7 +20,7 @@ public:
AvatarData* clone() const;
glm::vec3 getPosition();
const glm::vec3& getPosition() const;
void setPosition(glm::vec3 position);
void setHandPosition(glm::vec3 handPosition);