I created very simple performance grapher.
Here is screen shot in bottom left side are PerformanceTick results. Performance counter uses MICROSeconds[us].
And simple graph of WORLD_UPDATE. other graphs are not jet implemented.
Moderators: Sascha Willems, walaber
void PhysicObject::forceCallBack(OgreNewt::Body* m_pBody,float t,int ThreadID)
{
Ogre::Vector3 g = Ogre::Vector3(0,(-9.803),0);
//!OUTSIDE FORCE
//!/////////////////////////////////////////////
if(isTouched)
{
while(!m_Torque.empty())
{
FORCEPAIR f = m_Torque.front();
m_Torque.pop();
m_pBody->addTorque(f.first);
}
while(!m_LocalForce.empty())
{
FORCEPAIR f = m_LocalForce.front();
m_LocalForce.pop();
m_pBody->addLocalForce(f.first,f.second);
}
while(!m_GlobalForce.empty())
{
FORCEPAIR f = m_GlobalForce.front();
m_GlobalForce.pop();
m_pBody->addGlobalForce(f.first,f.second);
}
while(!m_Impulse.empty())
{
FORCEPAIR f = m_Impulse.front();
m_Impulse.pop();
m_pBody->addImpulse(f.first,f.second);
}
isTouched = false;
}
//!BOUYANCY
//!////////////////////////////////////////////////
OgreNewt::Body::buoyancyPlaneCallback boostbnd_bouy_pln_cbck = boost::bind( &PhysicObject::waterPlaneCallBack,this,_1,_2,_3,_4,_5);
m_pBody->addBouyancyForce( 1000, 0.001519, 0.000001519 , g, boostbnd_bouy_pln_cbck);
//!GRAVITY
//!///////////////////////////////////////////////
//!Fg = m * g
Ogre::Real mass;Ogre::Vector3 inertia;
m_pBody->getMassMatrix(mass,inertia);
Ogre::Vector3 gravitation_force = g * mass;
m_pBody->addForce(gravitation_force);
}
tiresius wrote:I never thought the smooth shapes would be slower than a convex hull. I always assumed the included shapes were highly optimized in the engine, and a convex hull would be slower. Well, you learn a new thing every day, I guess.
tiresius wrote:I never thought the smooth shapes would be slower than a convex hull. I always assumed the included shapes were highly optimized in the engine, and a convex hull would be slower. Well, you learn a new thing every day, I guess.
Users browsing this forum: No registered users and 6 guests