00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef PVDBINDING_H
00029 #define PVDBINDING_H
00030
00031 #include "foundation/Px.h"
00032 #include "physxvisualdebuggersdk/PvdConnectionFlags.h"
00033 #include "NxApexDefs.h"
00034
00035
00036 #define DEFAULT_PVD_BINDING_PORT 5425
00037 #define DEFAULT_PVD_BINDING_TIMEOUT_MS 100
00038
00039 #define APEX_PVD_NAMESPACE "Apex"
00040
00041
00042 namespace NxParameterized
00043 {
00044 class Interface;
00045 class Definition;
00046 class Handle;
00047 }
00048
00049 namespace physx
00050 {
00051 class PxProfileZoneManager;
00052
00053 namespace debugger
00054 {
00055 namespace comm
00056 {
00057 class PvdConnectionManager;
00058 class PvdConnection;
00059 class PvdDataStream;
00060 }
00061 namespace renderer
00062 {
00063 class PvdImmediateRenderer;
00064 }
00065 }
00066 }
00067
00068 namespace PVD
00069 {
00073 struct PvdAction
00074 {
00078 enum Enum
00079 {
00083 UPDATE,
00084
00088 DESTROY
00089 };
00090 };
00091
00092
00093
00097 class PvdBinding
00098 {
00099 protected:
00100 virtual ~PvdBinding(){}
00101 public:
00105 virtual physx::debugger::comm::PvdConnectionManager& getConnectionManager() = 0;
00106
00110 virtual physx::PxProfileZoneManager& getProfileManager() = 0;
00111
00115 virtual bool isConnected() = 0;
00116
00120 virtual physx::debugger::TConnectionFlagsType getConnectionType() = 0;
00121
00125 virtual void disconnect() = 0;
00126
00131 virtual void beginFrame( void* inInstanceId ) = 0;
00132
00136 virtual void endFrame( void* inInstanceId ) = 0;
00137
00141 virtual void release() = 0;
00147 virtual void connect( const char* inHost
00148 , int inPort = DEFAULT_PVD_BINDING_PORT
00149 , unsigned int inTimeoutInMilliseconds = DEFAULT_PVD_BINDING_TIMEOUT_MS
00150
00151
00152
00153 , physx::debugger::TConnectionFlagsType inConnectionType = physx::debugger::defaultConnectionFlags() ) = 0;
00154
00158 virtual physx::debugger::comm::PvdDataStream* getDataStream() = 0;
00159
00163 virtual physx::debugger::renderer::PvdImmediateRenderer* getRenderer() = 0;
00164
00168 virtual void initPvdClasses() = 0;
00169
00173 virtual void initPvdInstances() = 0;
00174
00180 virtual void initPvdClasses(const NxParameterized::Definition& paramsHandle, const char* pvdClassName) = 0;
00181
00185 virtual void updatePvd(const void* pvdInstance, NxParameterized::Interface& params, PvdAction::Enum pvdAction = PvdAction::UPDATE) = 0;
00186
00191 virtual void lock() = 0;
00192
00196 virtual void unlock() = 0;
00197
00201 static PvdBinding* create( physx::debugger::comm::PvdConnectionManager& inConnectionManager, physx::PxProfileZoneManager& inProfileManager );
00202
00211 static PvdBinding* create( bool inRecordMemoryEvents );
00212 };
00213
00214 }
00215
00216
00217
00218 #endif // PVDBINDING_H