29#ifndef OMNI_PVD_PX_SAMPLER_H
30#define OMNI_PVD_PX_SAMPLER_H
42#if PX_SUPPORT_OMNI_PVD
44 #define OMNI_PVD_ACTIVE (::OmniPvdPxSampler::getInstance() != NULL)
46 #define OMNI_PVD_CREATE(c, o) if (::OmniPvdPxSampler::getInstance() != NULL) {::OmniPvdPxSampler::getInstance()->createObject(OmniPvdPxSampler::classHandle_##c, o); }
48 #define OMNI_PVD_DESTROY(c, o) if (::OmniPvdPxSampler::getInstance() != NULL) {::OmniPvdPxSampler::getInstance()->destroyObject(o); }
51 #define OMNI_PVD_SET(c, a, o, v) if (::OmniPvdPxSampler::getInstance() != NULL) {::OmniPvdPxSampler::getInstance()->setAttribute(OmniPvdPxSampler::attributeHandle_##c##_##a, o, v); }
53 #define OMNI_PVD_SETB(c, a, o, pv, n)if (::OmniPvdPxSampler::getInstance() != NULL) {::OmniPvdPxSampler::getInstance()->setAttributeBytes(OmniPvdPxSampler::attributeHandle_##c##_##a, o, pv, n); }
55 #define OMNI_PVD_ADD(c, a, o, v) if (::OmniPvdPxSampler::getInstance() != NULL) {::OmniPvdPxSampler::getInstance()->addToSet(OmniPvdPxSampler::attributeHandle_##c##_##a, o, v); }
57 #define OMNI_PVD_REMOVE(c, a, o, v) if (::OmniPvdPxSampler::getInstance() != NULL) {::OmniPvdPxSampler::getInstance()->removeFromSet(OmniPvdPxSampler::attributeHandle_##c##_##a, o, v); }
60 #define OMNI_PVD_ACTIVE (false)
61 #define OMNI_PVD_CREATE(c, p)
62 #define OMNI_PVD_DESTROY(c, p)
63 #define OMNI_PVD_SET(c, a, p, v)
64 #define OMNI_PVD_SETB(c, a, p, v, n)
65 #define OMNI_PVD_ADD(c, a, p, v)
66 #define OMNI_PVD_REMOVE(c, a, p, v)
70#if PX_SUPPORT_OMNI_PVD
71#include "omnipvd/PxOmniPvd.h"
73#include "foundation/PxSimpleTypes.h"
74#include "foundation/PxHashMap.h"
75#include "foundation/PxMutex.h"
76#include "OmniPvdChunkAlloc.h"
77#include "foundation/PxUserAllocated.h"
79#include "../../../pvdruntime/include/OmniPvdDefines.h"
90 class PxGeometryHolder;
101enum OmniPvdSharedMeshEnum {
103 eOmniPvdConvexMesh = 1,
104 eOmniPvdHeightField = 2,
109class OmniPvdPxSampler;
111class OmniPvdActorMod;
112class OmniPvdShapeMod;
121 void startSampling();
136 template <
typename ClassType>
void createObject(OmniPvdClassHandle, ClassType
const & objectId);
137 template <
typename ClassType>
void destroyObject(ClassType
const & objectId);
138 template <
typename ClassType,
typename AttributeType>
void setAttribute(OmniPvdAttributeHandle, ClassType
const & objectId, AttributeType
const & value);
139 template <
typename ClassType,
typename AttributeType>
void setAttributeBytes(OmniPvdAttributeHandle, ClassType
const & objectId, AttributeType
const * value,
unsigned nBytes);
140 template <
typename ClassType,
typename AttributeType>
void addToSet(OmniPvdAttributeHandle, ClassType
const & objectId, AttributeType
const & value);
141 template <
typename ClassType,
typename AttributeType>
void removeFromSet(OmniPvdAttributeHandle, ClassType
const & objectId, AttributeType
const & value);
145#define OMNI_PVD_FAKE_CLASS(c, classT, classStr) static OmniPvdClassHandle classHandle_##c;
146#define OMNI_PVD_CLASS(c, classT) static OmniPvdClassHandle classHandle_##c;
147#define OMNI_PVD_CLASS_DERIVED(c, classT, baseClass) OMNI_PVD_CLASS(c, classT)
148#define OMNI_PVD_ENUM(c, classT) OMNI_PVD_CLASS(c, classT)
149#define OMNI_PVD_ENUM_VALUE(c, a, v)
150#define OMNI_PVD_ATTRIBUTE(c, a, classT, attrT, t, n) static OmniPvdAttributeHandle attributeHandle_##c##_##a;
151#define OMNI_PVD_ATTRIBUTE_SET(c, a, classT, attrT) static OmniPvdAttributeHandle attributeHandle_##c##_##a;
152#define OMNI_PVD_ATTRIBUTE_FLAG(c, a, classT, attrT, enumClass) static OmniPvdAttributeHandle attributeHandle_##c##_##a;
155#include "OmniPvdTypes.h"
157#undef OMNI_PVD_ENUM_VALUE
158#undef OMNI_PVD_FAKE_CLASS
160#undef OMNI_PVD_CLASS_DERIVED
161#undef OMNI_PVD_ATTRIBUTE
162#undef OMNI_PVD_ATTRIBUTE_SET
163#undef OMNI_PVD_ATTRIBUTE_FLAG
165 static OmniPvdPxSampler* getInstance();
Definition OmniPvdLoader.h:43
Used to abstract a memory write stream.
Definition OmniPvdWriteStream.h:40
Used to write debug information to an OmniPvdWriteStream.
Definition OmniPvdWriter.h:47
PxActor is the base class for the main simulation objects in the physics SDK.
Definition PxActor.h:201
Base class for objects that can be members of a PxCollection.
Definition PxBase.h:73
Material class to represent a set of surface properties.
Definition PxMaterial.h:149
Abstract class for collision shapes.
Definition PxShape.h:146
Definition PxUserAllocated.h:43
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39