Runtime visualization and analysis of a PhysX application by using PVD can be done by streaming the simulation-related data over the TCP/IP network on your local machine. Here, a PVD program works as a TCP/IP server and it must be launched before running your PhysX application. The default port used for listening is 5425.
The code snippet for connecting to PVD by using the TCP/IP network is given as follows:
// check if PvdConnection manager is available on this platform if(gPhysicsSDK->getPvdConnectionManager() == NULL) return; // setup connection parameters const char* pvd_host_ip = "127.0.0.1"; // IP of local PC machine PVD int port = 5425; // TCP port to connect to, where PVD is listening unsigned int timeout = 100; //time in milliseconds to wait for PVD to respond. PxVisualDebuggerConnectionFlags connectionFlags = PxVisualDebuggerExt::getAllConnectionFlags(); // and now try to connect debugger::comm::PvdConnection* theConnection = PxVisualDebuggerExt...