29#ifndef PXC_NP_THREAD_CONTEXT_H
30#define PXC_NP_THREAD_CONTEXT_H
32#include "geometry/PxGeometry.h"
33#include "geomutils/PxContactBuffer.h"
34#include "common/PxRenderOutput.h"
36#include "CmRenderBuffer.h"
40#include "PxcNpCacheStreamPair.h"
41#include "PxcConstraintBlockStream.h"
42#include "PxcThreadCoherentCache.h"
43#include "PxcScratchAllocator.h"
44#include "foundation/PxBitMap.h"
45#include "../pcm/GuPersistentContactManifold.h"
46#include "../contact/GuContactMethodImpl.h"
51class PxsTransformCache;
52class PxsMaterialManager;
66 PxI32 mSharedDataIndex;
67 PxU32 mDataStreamSize;
68 PxU32 mSharedDataIndexGPU;
70 bool isOverflown()
const
75 return (mSharedDataIndex + mSharedDataIndexGPU) > mDataStreamSize;
86 mNpMemBlockPool (mScratchAllocator),
87 mMeshContactMargin (0.0f),
88 mToleranceLength (0.0f),
89 mContactStreamPool (NULL),
90 mPatchStreamPool (NULL),
91 mForceAndIndiceStreamPool(NULL),
92 mMaterialManager (NULL)
98 PxReal mMeshContactMargin;
99 PxReal mToleranceLength;
107 PX_FORCE_INLINE PxReal getToleranceLength()
const {
return mToleranceLength; }
108 PX_FORCE_INLINE void setToleranceLength(PxReal x) { mToleranceLength = x; }
109 PX_FORCE_INLINE PxReal getMeshContactMargin()
const {
return mMeshContactMargin; }
110 PX_FORCE_INLINE void setMeshContactMargin(PxReal x) { mMeshContactMargin = x; }
125#if PX_ENABLE_SIM_STATS
128 PX_CATCH_UNDEFINED_ENABLE_SIM_STATS
131 PX_FORCE_INLINE void addLocalNewTouchCount(PxU32 newTouchCMCount) { mLocalNewTouchCount += newTouchCMCount; }
132 PX_FORCE_INLINE void addLocalLostTouchCount(PxU32 lostTouchCMCount) { mLocalLostTouchCount += lostTouchCMCount; }
133 PX_FORCE_INLINE PxU32 getLocalNewTouchCount()
const {
return mLocalNewTouchCount; }
134 PX_FORCE_INLINE PxU32 getLocalLostTouchCount()
const {
return mLocalLostTouchCount; }
139 void reset(PxU32 cmCount);
147#if PX_ENABLE_SIM_STATS
151 PX_CATCH_UNDEFINED_ENABLE_SIM_STATS
169 const PxReal* mContactDistances;
172 bool mCreateAveragePoint;
173#if PX_ENABLE_SIM_STATS
174 PxU32 mCompressedCacheSize;
175 PxU32 mNbDiscreteContactPairsWithCacheHits;
176 PxU32 mNbDiscreteContactPairsWithContacts;
178 PX_CATCH_UNDEFINED_ENABLE_SIM_STATS
186 PxU32 mTotalCompressedCacheSize;
197 PxU32 mLocalNewTouchCount;
198 PxU32 mLocalLostTouchCount;
Definition CmRenderBuffer.h:45
Definition PxRenderOutput.h:50
Definition PxcNpMemBlockPool.h:52
Definition PxcNpThreadContext.h:119
Definition PxcScratchAllocator.h:42
Definition PxcThreadCoherentCache.h:52
Definition PxsMaterialManager.h:126
#define PX_FORCE_INLINE
Definition PxPreprocessor.h:335
#define PX_ALIGN(alignment, decl)
Definition PxPreprocessor.h:402
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
Definition GuContactMethodImpl.h:49
@ eGEOMETRY_COUNT
internal use only!
Definition PxGeometry.h:65
Definition PxcNpThreadContext.h:64
Definition PxcNpCacheStreamPair.h:43
Definition PxcNpThreadContext.h:80