use Syoyo Fujita's Wavefront obj loader. made some performance improvements in debug mode for Visual Studio

use Maya style controls under Windows (need to fix Linux/OSX) use ALT+mouse to rotate, and mouse pick to pick objects
This commit is contained in:
erwincoumans
2013-07-18 15:55:38 -07:00
parent 733f9027fb
commit a5b73e7c76
25 changed files with 496 additions and 1640 deletions

View File

@@ -304,9 +304,28 @@ b3Vector3 GpuRigidBodyDemo::getRayTo(int x,int y)
return rayTo;
}
bool GpuRigidBodyDemo::keyboardCallback(int key, int state)
{
if (m_data)
{
if (key==B3G_ALT)
{
m_data->m_altPressed = state;
}
if (key==B3G_CONTROL)
{
m_data->m_controlPressed = state;
}
}
return false;
}
bool GpuRigidBodyDemo::mouseMoveCallback(float x,float y)
{
if (m_data->m_altPressed!=0)
return false;
if (m_data->m_pickBody>=0 && m_data->m_pickConstraint>=0)
{
m_data->m_rigidBodyPipeline->removeConstraintByUid(m_data->m_pickConstraint);
@@ -329,9 +348,10 @@ bool GpuRigidBodyDemo::mouseMoveCallback(float x,float y)
}
bool GpuRigidBodyDemo::mouseButtonCallback(int button, int state, float x, float y)
{
if (state==1)
{
if (button==0)
if(button==0 && (m_data->m_altPressed==0))
{
b3AlignedObjectArray<b3RayInfo> rays;
b3AlignedObjectArray<b3RayHit> hitResults;