Java Reference
In-Depth Information
}
setRotation(viewTrans, -ANGLESTEP, comMat, 1);
turningAngle -= ANGLESTEP;
}
else if (buttonvalue.indexOf(“Pitchup”) != -1)
{
if (pitchAngle>-10.0f*ANGLEPAI)
{
setRotation(viewTrans, -ANGLESTEP, comMat, 2);
pitchAngle -= ANGLESTEP;
}
}
else if (buttonvalue.indexOf(“Pitchdown”) != -1)
{
if (pitchAngle<10.0f*ANGLEPAI)
{
setRotation(viewTrans, ANGLESTEP, comMat, 2);
pitchAngle += ANGLESTEP;
}
}
else if (buttonvalue.indexOf(“Yawleft”) != -1)
{
}
else if (buttonvalue.indexOf(“Yawright”) != -1)
{
}
else if (buttonvalue.indexOf(“Horizontal”) != -1)
{
if (pitchAngle!=0)
{
setRotation(viewTrans, -pitchAngle, comMat, 2);
pitchAngle = 0.0f;
}
}
else if (buttonvalue.indexOf(“Original”) != -1)
{
viewposi = new Point3f(firstviewposi);
if (pitchAngle!=0)
{
setRotation(viewTrans, -pitchAngle, comMat, 2);
pitchAngle = 0.0f;
}
if (turningAngle!=0)
{
setRotation(viewTrans, -turningAngle, comMat, 1);
turningAngle = 0.0f;
}
setPosition(bodyTrans, viewposi);
setPosition(viewTrans, viewposi);
if (outsideTrans!=null)
setPosition(outsideTrans, new Point3f(Outsidescale*viewposi.x, outsideposi.y, outsideposi.z));
}
Search WWH ::




Custom Search