virtual void onPvdSendClassDescriptions( physx::debugger::comm::PvdConnection& inFactory ) { using namespace physx::debugger; //register the joint classes. PvdDataStream* connection = &inFactory.createDataStream(); connection->addRef(); Ext::VisualDebugger::sendClassDescriptions( *connection ); connection->flush(); connection->release(); }
void onPvdConnected() { PvdDataStream* stream = PvdDataStream::create(mPvd); if(stream) { mConnected = true; Ext::Pvd::sendClassDescriptions(*stream); stream->release(); } }
bool PvdImpl::connect(PxPvdTransport& transport, PxPvdInstrumentationFlags flags) { if(mIsConnected) { physx::shdfnd::getFoundation().error(PxErrorCode::eINVALID_PARAMETER, __FILE__, __LINE__, "PxPvd::connect - recall connect! Should call disconnect before re-connect."); return false; } mFlags = flags; mPvdTransport = &transport; mIsConnected = mPvdTransport->connect(); if(mIsConnected) { mSharedMetaProvider = PVD_NEW(MetaDataProvider); sendTransportInitialization(); PvdDataStream* stream = PvdDataStream::create(this); initializeModelTypes(*stream); stream->release(); if(mFlags & PxPvdInstrumentationFlag::eMEMORY) { mMemClient = PVD_NEW(PvdMemClient)(*this); mPvdClients.pushBack(mMemClient); } if((mFlags & PxPvdInstrumentationFlag::ePROFILE) && mProfileZoneManager) { mPvdClients.pushBack(mProfileClient); mProfileZone = &physx::profile::PxProfileZone::createProfileZone(&physx::shdfnd::getAllocator(),gSdkName,gProfileNameProvider.getProfileNames()); } for(uint32_t i = 0; i < mPvdClients.size(); i++) mPvdClients[i]->onPvdConnected(); if (mProfileZone) { mProfileZoneManager->addProfileZoneHandler(*mProfileClient); mProfileZoneManager->addProfileZone( *mProfileZone ); } if ((mFlags & PxPvdInstrumentationFlag::ePROFILE)) { PxSetProfilerCallback(this); } } return mIsConnected; }
void createInstance( PvdDataStream& inStream, const PxConstraint& c, const TObjType& inSource ) { const PxJoint* theJoint = &inSource; PxRigidActor* actor0, *actor1; c.getActors( actor0, actor1 ); inStream.createInstance( &inSource ); inStream.pushBackObjectRef( c.getScene(), "Joints", (const void*)theJoint ); if ( actor0 && (actor0->getScene() != NULL ) ) inStream.pushBackObjectRef( (PxActor*)actor0, "Joints", theJoint ); if ( actor1 && (actor1->getScene() != NULL )) inStream.pushBackObjectRef( (PxActor*)actor1, "Joints", theJoint ); const void* parent = actor0 ? (const void*)actor0 : (const void*) actor1; inStream.setPropertyValue( theJoint, "Parent", parent ); }
void registerProperties( PvdDataStream& inStream ) { inStream.createClass<TObjType>(); PvdPropertyDefinitionHelper& theHelper( inStream.getPropertyDefinitionHelper() ); PvdClassInfoDefine theDefinitionObj( theHelper, getPvdNamespacedNameForType<TObjType>() ); visitPvdInstanceProperties<TObjType>( theDefinitionObj ); }
void registerPropertiesAndValueStruct( PvdDataStream& inStream ) { inStream.createClass<TObjType>(); inStream.deriveClass<PxJoint,TObjType>(); PvdPropertyDefinitionHelper& theHelper( inStream.getPropertyDefinitionHelper() ); { PvdClassInfoDefine theDefinitionObj( theHelper, getPvdNamespacedNameForType<TObjType>() ); visitPvdInstanceProperties<TObjType>( theDefinitionObj ); } { PvdClassInfoValueStructDefine theDefinitionObj( theHelper ); visitPvdProperties<TObjType>( theDefinitionObj ); theHelper.addPropertyMessage<TObjType,TValueStructType>(); } }
void sendAllProperties( PvdDataStream& inStream, const TObjType& inSource ) { TValueStructType theValueStruct( &inSource ); inStream.setPropertyMessage( &inSource, theValueStruct ); }