expand tabs and avoid a compiler warning
This commit is contained in:
parent
ad6e922e07
commit
28436244da
@ -30,7 +30,7 @@ PlainSpin::PlainSpin(SSMain * _SSMain) : SSMode(_SSMain)
|
||||
void PlainSpin::update()
|
||||
{
|
||||
SSMode::update();
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
int numMonitors = m_SSMain->getNumMonitors();
|
||||
int width = m_SSMain->getWidth();
|
||||
int height = m_SSMain->getHeight();
|
||||
|
54
ss/Towers.cc
54
ss/Towers.cc
@ -174,7 +174,7 @@ void Towers::update()
|
||||
for (unsigned int i = 0; i < delta / 2; i++)
|
||||
worldStep();
|
||||
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
int numMonitors = m_SSMain->getNumMonitors();
|
||||
int width = m_SSMain->getWidth();
|
||||
int height = m_SSMain->getHeight();
|
||||
@ -269,36 +269,36 @@ void Towers_collide_callback(void * data, dGeomID o1, dGeomID o2)
|
||||
{
|
||||
const int maxNumContacts = 2;
|
||||
Towers * t = (Towers *) data;
|
||||
static dContact contact[maxNumContacts];
|
||||
dBodyID b1 = dGeomGetBody(o1);
|
||||
dBodyID b2 = dGeomGetBody(o2);
|
||||
if (b1 && b2 && dAreConnected(b1, b2))
|
||||
return;
|
||||
int num = dCollide(o1, o2, maxNumContacts,
|
||||
&contact[0].geom, sizeof(dContact));
|
||||
int i;
|
||||
for (i = 0; i < num; i++)
|
||||
{
|
||||
contact[i].surface.mode =
|
||||
dContactSlip1 | dContactSlip2 | dContactBounce |
|
||||
dContactSoftERP | dContactSoftCFM | dContactApprox1;
|
||||
contact[i].surface.mu = 0.5;
|
||||
contact[i].surface.slip1 = 0.0;
|
||||
contact[i].surface.slip2 = 0.0;
|
||||
contact[i].surface.soft_erp = 0.8;
|
||||
contact[i].surface.soft_cfm = 0.01;
|
||||
contact[i].surface.bounce = 0.0;
|
||||
dJointID joint = dJointCreateContact(t->m_world,
|
||||
t->m_contactJointGroup, contact + i);
|
||||
dJointAttach(joint, b1, b2);
|
||||
}
|
||||
static dContact contact[maxNumContacts];
|
||||
dBodyID b1 = dGeomGetBody(o1);
|
||||
dBodyID b2 = dGeomGetBody(o2);
|
||||
if (b1 && b2 && dAreConnected(b1, b2))
|
||||
return;
|
||||
int num = dCollide(o1, o2, maxNumContacts,
|
||||
&contact[0].geom, sizeof(dContact));
|
||||
int i;
|
||||
for (i = 0; i < num; i++)
|
||||
{
|
||||
contact[i].surface.mode =
|
||||
dContactSlip1 | dContactSlip2 | dContactBounce |
|
||||
dContactSoftERP | dContactSoftCFM | dContactApprox1;
|
||||
contact[i].surface.mu = 0.5;
|
||||
contact[i].surface.slip1 = 0.0;
|
||||
contact[i].surface.slip2 = 0.0;
|
||||
contact[i].surface.soft_erp = 0.8;
|
||||
contact[i].surface.soft_cfm = 0.01;
|
||||
contact[i].surface.bounce = 0.0;
|
||||
dJointID joint = dJointCreateContact(t->m_world,
|
||||
t->m_contactJointGroup, contact + i);
|
||||
dJointAttach(joint, b1, b2);
|
||||
}
|
||||
}
|
||||
|
||||
/* invokes ODE to do physics on our world */
|
||||
void Towers::worldStep()
|
||||
{
|
||||
dSpaceCollide(m_space, this, Towers_collide_callback);
|
||||
dWorldQuickStep(m_world, WORLD_STEP);
|
||||
dJointGroupEmpty(m_contactJointGroup);
|
||||
dSpaceCollide(m_space, this, Towers_collide_callback);
|
||||
dWorldQuickStep(m_world, WORLD_STEP);
|
||||
dJointGroupEmpty(m_contactJointGroup);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user