Menu

PhysX: Stalling for the results?

2009-07-01
2013-01-08
  • SoftwareSamurai

    SoftwareSamurai - 2009-07-01

    Am I reading the source code correctly? It looks like in novodex_pal.cpp that Iterate() calls StartIterate() and then immediately calls WaitForIteration(). And in WaitForIteration(), the fetchResults() is called with blocking on the results. This doesn't give the rest of my engine the ability to do some work while the physics crunches the numbers.

    This wouldn't be a problem if the paSolver was exposed to my engine. (Thus allowing me to get access to StartIterat(), QueryIterationComplete(), and WaitForIteration().) But right now I don't see where I can get a pointer to the current paSolver.

    Am I missing something?

    Thanks!
    -john

     
    • Adrian Boeing

      Adrian Boeing - 2009-07-02

      Hi John,

      You can expose the palSolver by doing a dynamic cast from the palPhysics.

      eg:
      palSolver *ps = dynamic_cast<palSolver *>( palphysicspointer);
      if (ps)....

       
    • SoftwareSamurai

      SoftwareSamurai - 2009-07-02

      I see. Might be a good tip to document somewhere.

      Thanks!
      -john

       

Log in to post a comment.

MongoDB Logo MongoDB