27#ifndef PX_PVD_OBJECT_MODEL_INTERNAL_TYPES_H
28#define PX_PVD_OBJECT_MODEL_INTERNAL_TYPES_H
30#include "foundation/PxMemory.h"
31#include "PxPvdObjectModelBaseTypes.h"
32#include "foundation/PxArray.h"
33#include "PxPvdFoundation.h"
45#define DECLARE_INTERNAL_PVD_TYPE(type) type,
46#include "PxPvdObjectModelInternalTypeDefs.h"
48#undef DECLARE_INTERNAL_PVD_TYPE
59template <PvdInternalType::Enum>
65#define DECLARE_INTERNAL_PVD_TYPE(type) \
67 struct DataTypeToPvdTypeMap<type> \
71 BaseTypeEnum = PvdInternalType::type \
75 struct PvdTypeToDataTypeMap<PvdInternalType::type> \
77 typedef type TDataType; \
80 struct PvdDataTypeToNamespacedNameMap<type> \
82 NamespacedName Name; \
83 PvdDataTypeToNamespacedNameMap<type>() : Name("physx3_debugger_internal", #type) \
87#include "PxPvdObjectModelInternalTypeDefs.h"
88#undef DECLARE_INTERNAL_PVD_TYPE
90template <
typename TDataType,
typename TAlloc>
96static inline bool safeStrEq(
const DataRef<String>& lhs,
const DataRef<String>& rhs)
98 uint32_t count = lhs.size();
99 if(count != rhs.size())
101 for(uint32_t idx = 0; idx < count; ++idx)
102 if(!safeStrEq(lhs[idx], rhs[idx]))
107static inline char* copyStr(
const char* str)
110 uint32_t len =
static_cast<uint32_t
>(strlen(str));
111 char* newData =
reinterpret_cast<char*
>(PX_ALLOC(len + 1,
"string"));
118template <
typename TDataType, u
int8_t TNumBits, u
int8_t TOffset,
typename TInputType>
122 static TDataType createOffsetMask()
124 return createMask() << TOffset;
127 static TDataType createMask()
129 return static_cast<TDataType
>((1 << TNumBits) - 1);
131 void setValue(TDataType& inCurrent, TInputType inData)
133 PX_ASSERT(inData < (1 << TNumBits));
136 TDataType theMask = ~(createOffsetMask());
138 inCurrent = inCurrent & theMask;
140 TDataType theAddition =
reinterpret_cast<TDataType
>(inData << TOffset);
142 inCurrent = inCurrent | theAddition;
145 TInputType getValue(TDataType inCurrent)
147 return static_cast<TInputType
>((inCurrent >> TOffset) & createMask());
Definition PxPvdObjectModelBaseTypes.h:345
#define PX_COMPILE_TIME_ASSERT(exp)
Definition PxPreprocessor.h:428
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
PX_FORCE_INLINE void * PxMemCopy(void *dest, const void *src, PxU32 count)
Copies the bytes of one memory block to another. The memory blocks must not overlap.
Definition PxMemory.h:83
Definition PxProfileMemoryEvents.h:83
Definition PxPvdObjectModelInternalTypes.h:56
Definition PxPvdObjectModelMetaData.h:308
Definition PxPvdObjectModelInternalTypes.h:41
Definition PxPvdObjectModelInternalTypes.h:61