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