Merge branch 'master' of https://github.com/worklist/hifi into view_frustum_work

This commit is contained in:
ZappoMan 2013-04-22 17:22:24 -07:00
commit 978a41f6ca
4 changed files with 18 additions and 29 deletions

View file

@ -718,41 +718,25 @@ void Head::renderHead(int faceToFace) {
glPushMatrix();
if (_usingBodySprings) {
glTranslatef
(
_bone[ AVATAR_BONE_HEAD ].springyPosition.x,
_bone[ AVATAR_BONE_HEAD ].springyPosition.y,
_bone[ AVATAR_BONE_HEAD ].springyPosition.z
);
glTranslatef(_bone[ AVATAR_BONE_HEAD ].springyPosition.x,
_bone[ AVATAR_BONE_HEAD ].springyPosition.y,
_bone[ AVATAR_BONE_HEAD ].springyPosition.z);
}
else {
glTranslatef
(
_bone[ AVATAR_BONE_HEAD ].position.x,
_bone[ AVATAR_BONE_HEAD ].position.y,
_bone[ AVATAR_BONE_HEAD ].position.z
);
glTranslatef(_bone[ AVATAR_BONE_HEAD ].position.x,
_bone[ AVATAR_BONE_HEAD ].position.y,
_bone[ AVATAR_BONE_HEAD ].position.z);
}
glScalef( 0.03, 0.03, 0.03 );
glRotatef(_head.yaw, 0, 1, 0);
glRotatef(_head.pitch, 1, 0, 0);
glRotatef(_head.roll, 0, 0, 1);
// Overall scale of head
if (faceToFace) glScalef(2.0, 2.0, 2.0);
else glScalef(0.75, 1.0, 1.0);
glScalef(2.0, 2.0, 2.0);
glColor3fv(skinColor);
// Head
if (_isMine) {
glColor3fv(skinColor);
}
else {
glColor3f(0,0,1); // Temp: Other people are BLUE
}
glutSolidSphere(1, 30, 30);
// Ears

View file

@ -932,7 +932,7 @@ void display(void)
for(std::vector<Agent>::iterator agent = agentList->getAgents().begin();
agent != agentList->getAgents().end();
agent++) {
if (agent->getLinkedData() != NULL) {
if (agent->getLinkedData() != NULL && agent->getType() == AGENT_TYPE_AVATAR) {
Head *avatar = (Head *)agent->getLinkedData();
//glPushMatrix();

View file

@ -13,7 +13,7 @@
#include <AgentData.h>
const int BYTES_PER_AVATAR = 30;
const int BYTES_PER_AVATAR = 94;
class AvatarData : public AgentData {
public:

View file

@ -249,9 +249,14 @@ void Agent::printLog(Agent const& agent) {
sockaddr_in *agentPublicSocket = (sockaddr_in *) agent.publicSocket;
sockaddr_in *agentLocalSocket = (sockaddr_in *) agent.localSocket;
::printLog("T: %s (%c) PA: %s:%d LA: %s:%d\n", agent.getTypeName(), agent.type,
inet_ntoa(agentPublicSocket->sin_addr), ntohs(agentPublicSocket->sin_port),
inet_ntoa(agentLocalSocket->sin_addr), ntohs(agentLocalSocket->sin_port));
::printLog("ID: %d T: %s (%c) PA: %s:%d LA: %s:%d\n",
agent.agentId,
agent.getTypeName(),
agent.type,
inet_ntoa(agentPublicSocket->sin_addr),
ntohs(agentPublicSocket->sin_port),
inet_ntoa(agentLocalSocket->sin_addr),
ntohs(agentLocalSocket->sin_port));
}
std::ostream& operator<<(std::ostream& os, const Agent* agent) {