RavEngine
Loading...
Searching...
No Matches
PvdMetaDataPropertyVisitor.h
1// Redistribution and use in source and binary forms, with or without
2// modification, are permitted provided that the following conditions
3// are met:
4// * Redistributions of source code must retain the above copyright
5// notice, this list of conditions and the following disclaimer.
6// * Redistributions in binary form must reproduce the above copyright
7// notice, this list of conditions and the following disclaimer in the
8// documentation and/or other materials provided with the distribution.
9// * Neither the name of NVIDIA CORPORATION nor the names of its
10// contributors may be used to endorse or promote products derived
11// from this software without specific prior written permission.
12//
13// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
14// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
17// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24//
25// Copyright (c) 2008-2022 NVIDIA Corporation. All rights reserved.
26// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
27// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
28
29#ifndef PX_META_DATA_PROPERTY_VISITOR_H
30#define PX_META_DATA_PROPERTY_VISITOR_H
31
32#include <stdio.h>
33#include "PvdMetaDataExtensions.h"
34namespace physx
35{
36
37namespace Vd
38{
39
40//PVD only deals with read-only properties, indexed, and properties like this by in large.
41//so we have a filter that expands properties to a level where we can get to them and expands them into
42//named functions that make more sense and are easier to read than operator()
43template<typename TOperatorType>
45{
46
47private:
48 PvdPropertyFilter& operator=(const PvdPropertyFilter&);
49
50public:
51
52 TOperatorType mOperator;
53 PxU32* mKeyOverride;
54 PxU32* mOffsetOverride;
55
56 PvdPropertyFilter( TOperatorType& inOperator )
57 : mOperator( inOperator )
58 , mKeyOverride( 0 )
59 , mOffsetOverride( 0 ) {}
60
61 PvdPropertyFilter( TOperatorType& inOperator, PxU32* inKeyOverride, PxU32* inOffsetOverride )
62 : mOperator( inOperator )
63 , mKeyOverride( inKeyOverride )
64 , mOffsetOverride( inOffsetOverride ) {}
65
66 PvdPropertyFilter( const PvdPropertyFilter& inOther ) : mOperator( inOther.mOperator ), mKeyOverride( inOther.mKeyOverride ), mOffsetOverride( inOther.mOffsetOverride ) {}
67
68 template<PxU32 TKey, typename TAccessorType>
69 void dispatchAccessor( PxU32 inKey, const TAccessorType& inAccessor, bool, bool, bool)
70 {
71 mOperator.simpleProperty(inKey, inAccessor );
72 }
73
74 template<PxU32 TKey, typename TAccessorType>
75 void dispatchAccessor( PxU32 inKey, const TAccessorType& inAccessor, bool, bool, const PxU32ToName* inConversions )
76 {
77 mOperator.flagsProperty(inKey, inAccessor, inConversions );
78 }
79
80 template<PxU32 TKey, typename TAccessorType>
81 void dispatchAccessor( PxU32 inKey, const TAccessorType& inAccessor, const PxU32ToName* inConversions, bool, bool )
82 {
83 mOperator.enumProperty( inKey, inAccessor, inConversions );
84 }
85
86 template<PxU32 TKey, typename TAccessorType, typename TInfoType>
87 void dispatchAccessor(PxU32, const TAccessorType& inAccessor, bool, const TInfoType* inInfo, bool )
88 {
89 PxU32 rangeStart = TKey;
90 PxU32& propIdx = mKeyOverride == NULL ? rangeStart : *mKeyOverride;
91 mOperator.complexProperty( &propIdx, inAccessor, *inInfo );
92 }
93
94 PxU32 getKeyValue( PxU32 inPropertyKey )
95 {
96 PxU32 retval = inPropertyKey;
97 if ( mKeyOverride )
98 {
99 retval = *mKeyOverride;
100 (*mKeyOverride)++;
101 }
102 return retval;
103 }
104
105
106 void setupValueStructOffset( const ValueStructOffsetRecord&, bool, PxU32* ) {}
107 void setupValueStructOffset( const ValueStructOffsetRecord& inAccessor, PxU32 inOffset, PxU32* inAdditionalOffset )
108 {
109 //This allows us to nest properties correctly.
110 if ( inAdditionalOffset ) inOffset += *inAdditionalOffset;
111 inAccessor.setupValueStructOffset( inOffset );
112 }
113
114 template<PxU32 TKey, typename TAccessorType>
115 void handleAccessor( PxU32 inKey, const TAccessorType& inAccessor )
116 {
117 typedef typename TAccessorType::prop_type TPropertyType;
118 dispatchAccessor<TKey>( inKey
119 , inAccessor
120 , PxEnumTraits<TPropertyType>().NameConversion
122 , IsFlagsType<TPropertyType>().FlagData );
123 }
124
125
126 template<PxU32 TKey, typename TAccessorType>
127 void handleAccessor( const TAccessorType& inAccessor )
128 {
129 setupValueStructOffset( inAccessor, PxPropertyToValueStructMemberMap<TKey>().Offset, mOffsetOverride );
130 handleAccessor<TKey>( getKeyValue( TKey ), inAccessor );
131 }
132
133 template<PxU32 TKey, typename TObjType, typename TPropertyType>
134 void operator()( const PxReadOnlyPropertyInfo<TKey,TObjType,TPropertyType>& inProperty, PxU32 )
135 {
137 mOperator.pushName( inProperty.mName );
138 handleAccessor<TKey>( theAccessor );
139 mOperator.popName();
140 }
141
142 //We don't handle unbounded indexed properties
143 template<PxU32 TKey, typename TObjType, typename TIndexType, typename TPropertyType, typename TValueConversionType, typename TInfoType>
144 void indexedProperty( PxU32, const PxIndexedPropertyInfo<TKey, TObjType, TIndexType, TPropertyType >&, bool, TValueConversionType, const TInfoType& ) {}
145
146
147 template<PxU32 TKey, typename TObjType, typename TIndexType, typename TPropertyType>
148 void indexedProperty( PxU32, const PxIndexedPropertyInfo<TKey, TObjType, TIndexType, TPropertyType >& inProp, const PxU32ToName* theConversions, const PxUnknownClassInfo& )
149 {
150 mOperator.pushName( inProp.mName );
151 PxU32 rangeStart = TKey;
152 PxU32& propIdx = mKeyOverride == NULL ? rangeStart : *mKeyOverride;
153 PxU32 theOffset = 0;
154 if ( mOffsetOverride ) theOffset = *mOffsetOverride;
155
156 while( theConversions->mName != NULL )
157 {
158 mOperator.pushBracketedName( theConversions->mName );
159 PxPvdIndexedPropertyAccessor<TKey, TObjType, TIndexType, TPropertyType> theAccessor( inProp, theConversions->mValue );
160 setupValueStructOffset( theAccessor, PxPropertyToValueStructMemberMap<TKey>().Offset, &theOffset );
161 handleAccessor<TKey>( propIdx, theAccessor );
162 mOperator.popName();
163 ++propIdx;
164 ++theConversions;
165 theOffset += sizeof( TPropertyType );
166 }
167 mOperator.popName();
168 }
169
170 template<PxU32 TKey, typename TObjType, typename TIndexType, typename TPropertyType, typename TInfoType>
171 void indexedProperty( PxU32, const PxIndexedPropertyInfo<TKey, TObjType, TIndexType, TPropertyType >& inProp, const PxU32ToName* theConversions, const TInfoType& inInfo )
172 {
173 //ouch, not nice. Indexed complex property.
174 mOperator.pushName( inProp.mName );
175 PxU32 propIdx = TKey;
176 PxU32 theOffset = 0;
177 if ( mOffsetOverride ) theOffset = *mOffsetOverride;
178
179 while( theConversions->mName != NULL )
180 {
181 mOperator.pushBracketedName( theConversions->mName );
182 PxPvdIndexedPropertyAccessor<TKey, TObjType, TIndexType, TPropertyType> theAccessor( inProp, theConversions->mValue );
183 setupValueStructOffset( theAccessor, PxPropertyToValueStructMemberMap<TKey>().Offset, &theOffset );
184 PX_ASSERT( theAccessor.mHasValidOffset );
185 mOperator.complexProperty( &propIdx, theAccessor, inInfo );
186 mOperator.popName();
187 ++theConversions;
188 theOffset += sizeof( TPropertyType );
189 }
190 mOperator.popName();
191 }
192
193 static char* myStrcat(const char* a,const char * b)
194 {
195 size_t len = strlen(a)+strlen(b);
196 char* result = new char[len+1];
197
198 strcpy(result,a);
199 strcat(result,b);
200 result[len] = 0;
201
202 return result;
203 }
204
205 template<PxU32 TKey, typename TObjType, typename TPropertyType, typename TInfoType>
206 void handleBufferCollectionProperty(PxU32 , const PxBufferCollectionPropertyInfo<TKey, TObjType, TPropertyType >& inProp, const TInfoType& inInfo)
207 {
208 //append 'Collection' to buffer properties
209 char* name = myStrcat(inProp.mName, "Collection");
210
211 mOperator.pushName(name);
212 PxU32 propIdx = TKey;
213 PxU32 theOffset = 0;
214
216 setupValueStructOffset( theAccessor, PxPropertyToValueStructMemberMap<TKey>().Offset, &theOffset );
217
218 mOperator.bufferCollectionProperty( &propIdx, theAccessor, inInfo );
219 mOperator.popName();
220 delete []name;
221 }
222
223 template<PxU32 TKey, typename TObjType, typename TIndexType, typename TPropertyType>
224 void operator()( const PxIndexedPropertyInfo<TKey, TObjType, TIndexType, TPropertyType >& inProp, PxU32 inIndex )
225 {
226 indexedProperty( inIndex, inProp, IndexerToNameMap<TKey,TIndexType>().Converter.NameConversion
228 }
229
230 template<PxU32 TKey, typename TObjType, typename TPropertyType, typename TIndexType, typename TInfoType>
231 void handleExtendedIndexProperty(PxU32 inIndex, const PxExtendedIndexedPropertyInfo<TKey, TObjType, TIndexType, TPropertyType >& inProp, const TInfoType& inInfo)
232 {
233 mOperator.pushName(inProp.mName);
234 PxU32 propIdx = TKey;
235 PxU32 theOffset = 0;
236
238 setupValueStructOffset( theAccessor, PxPropertyToValueStructMemberMap<TKey>().Offset, &theOffset );
239
240 mOperator.extendedIndexedProperty( &propIdx, theAccessor, inInfo );
241 mOperator.popName();
242 }
243
244 template<PxU32 TKey, typename TObjType, typename TPropertyType, typename TIndexType, typename TInfoType>
245 void handlePxFixedSizeLookupTableProperty( const PxU32 inIndex, const PxFixedSizeLookupTablePropertyInfo<TKey, TObjType, TIndexType, TPropertyType >& inProp, const TInfoType& inInfo)
246 {
247 mOperator.pushName(inProp.mName);
248
249 PxU32 propIdx = TKey;
250 PxU32 theOffset = 0;
251
253 setupValueStructOffset( theAccessor, PxPropertyToValueStructMemberMap<TKey>().Offset, &theOffset );
254
255 mOperator.PxFixedSizeLookupTableProperty( &propIdx, theAccessor, inInfo );
256
257 mOperator.popName();
258 }
259
260 template<PxU32 TKey, typename TObjType, typename TIndexType, typename TPropertyType>
261 void operator()( const PxExtendedIndexedPropertyInfo<TKey, TObjType, TIndexType, TPropertyType >& inProp, PxU32 inIndex )
262 {
263 handleExtendedIndexProperty( inIndex, inProp, PxClassInfoTraits<TPropertyType>().Info );
264 }
265
266 template<PxU32 TKey, typename TObjType, typename TIndexType, typename TPropertyType>
267 void operator()( const PxFixedSizeLookupTablePropertyInfo<TKey, TObjType, TIndexType, TPropertyType >& inProp, PxU32 inIndex)
268 {
269 handlePxFixedSizeLookupTableProperty(inIndex, inProp, PxClassInfoTraits<TPropertyType>().Info);
270 }
271
272 //We don't handle unbounded indexed properties
273 template<PxU32 TKey, typename TObjType, typename TIndexType, typename TIndex2Type, typename TPropertyType, typename TNameConv, typename TNameConv2 >
274 void dualIndexedProperty( PxU32 idx, const PxDualIndexedPropertyInfo<TKey, TObjType, TIndexType, TIndex2Type, TPropertyType >&, TNameConv, TNameConv2 ) { PX_UNUSED(idx); }
275
276 template<PxU32 TKey, typename TObjType, typename TIndexType, typename TIndex2Type, typename TPropertyType>
277 void dualIndexedProperty( PxU32 /*idx*/, const PxDualIndexedPropertyInfo<TKey, TObjType, TIndexType, TIndex2Type, TPropertyType >& inProp, const PxU32ToName* c1, const PxU32ToName* c2 )
278 {
279 mOperator.pushName( inProp.mName );
280 PxU32 rangeStart = TKey;
281 PxU32& propIdx = mKeyOverride == NULL ? rangeStart : *mKeyOverride;
282 PxU32 theOffset = 0;
283 if ( mOffsetOverride ) theOffset = *mOffsetOverride;
284 while( c1->mName != NULL )
285 {
286 mOperator.pushBracketedName( c1->mName );
287 const PxU32ToName* c2Idx = c2;
288 while( c2Idx->mName != NULL )
289 {
290 mOperator.pushBracketedName( c2Idx->mName );
292 setupValueStructOffset( theAccessor, PxPropertyToValueStructMemberMap<TKey>().Offset, &theOffset );
293 handleAccessor<TKey>( propIdx, theAccessor );
294 mOperator.popName();
295 ++propIdx;
296 ++c2Idx;
297 theOffset += sizeof( TPropertyType );
298 }
299 mOperator.popName();
300 ++c1;
301 }
302 mOperator.popName();
303 }
304
305 template<PxU32 TKey, typename TObjType, typename TIndexType, typename TIndex2Type, typename TPropertyType>
306 void extendedDualIndexedProperty( PxU32 /*idx*/, const PxExtendedDualIndexedPropertyInfo<TKey, TObjType, TIndexType, TIndex2Type, TPropertyType >& inProp, PxU32 id0Count, PxU32 id1Count )
307 {
308 mOperator.pushName( inProp.mName );
309 PxU32 rangeStart = TKey;
310 PxU32& propIdx = mKeyOverride == NULL ? rangeStart : *mKeyOverride;
311 PxU32 theOffset = 0;
312 if ( mOffsetOverride ) theOffset = *mOffsetOverride;
313 for(PxU32 i = 0; i < id0Count; ++i)
314 {
315 char buffer1[32] = { 0 };
316 sprintf( buffer1, "eId1_%u", i );
317
318 mOperator.pushBracketedName( buffer1 );
319 for(PxU32 j = 0; j < id1Count; ++j)
320 {
321 char buffer2[32] = { 0 };
322 sprintf( buffer2, "eId2_%u", j );
323
324 mOperator.pushBracketedName( buffer2 );
326 setupValueStructOffset( theAccessor, PxPropertyToValueStructMemberMap<TKey>().Offset, &theOffset );
327 handleAccessor<TKey>( propIdx, theAccessor );
328 mOperator.popName();
329 ++propIdx;
330 theOffset += sizeof( TPropertyType );
331 }
332 mOperator.popName();
333 }
334 mOperator.popName();
335 }
336
337 template<PxU32 TKey, typename TObjType, typename TIndexType, typename TIndex2Type, typename TPropertyType>
339 {
340 dualIndexedProperty( idx, inProp
341 , IndexerToNameMap<TKey,TIndexType>().Converter.NameConversion
342 , IndexerToNameMap<TKey,TIndex2Type>().Converter.NameConversion );
343 }
344
345 template<PxU32 TKey, typename TObjType, typename TIndexType, typename TIndex2Type, typename TPropertyType>
347 {
348 extendedDualIndexedProperty( idx, inProp, inProp.mId0Count, inProp.mId1Count );
349 }
350
351 template<PxU32 TKey, typename TObjType, typename TPropertyType>
352 void operator()( const PxRangePropertyInfo<TKey, TObjType, TPropertyType>& inProperty, PxU32 /*idx*/)
353 {
354 PxU32 rangeStart = TKey;
355 PxU32& propIdx = mKeyOverride == NULL ? rangeStart : *mKeyOverride;
356 PxU32 theOffset = 0;
357 if ( mOffsetOverride ) theOffset = *mOffsetOverride;
358
359 mOperator.pushName( inProperty.mName );
360 mOperator.pushName( inProperty.mArg0Name );
361 PxPvdRangePropertyAccessor<TKey, TObjType, TPropertyType> theAccessor( inProperty, true );
362 setupValueStructOffset( theAccessor, PxPropertyToValueStructMemberMap<TKey>().Offset, &theOffset );
363 handleAccessor<TKey>( propIdx, theAccessor );
364 ++propIdx;
365 theOffset += sizeof( TPropertyType );
366 mOperator.popName();
367 mOperator.pushName( inProperty.mArg1Name );
368 theAccessor.mFirstValue = false;
369 setupValueStructOffset( theAccessor, PxPropertyToValueStructMemberMap<TKey>().Offset, &theOffset );
370 handleAccessor<TKey>( propIdx, theAccessor );
371 mOperator.popName();
372 mOperator.popName();
373 }
374
375 template<PxU32 TKey, typename TObjType, typename TPropertyType>
376 void operator()( const PxBufferCollectionPropertyInfo<TKey, TObjType, TPropertyType>& inProp, PxU32 count )
377 {
378 handleBufferCollectionProperty( count, inProp, PxClassInfoTraits<TPropertyType>().Info );
379 }
380
381 template<PxU32 TKey, typename TObjectType, typename TPropertyType, PxU32 TEnableFlag>
383 {
384 mOperator.handleBuffer( inProp );
385 }
386
387 template<PxU32 TKey, typename TObjectType, typename TPropertyType, PxU32 TEnableFlag>
388 void operator()( const PxBufferPropertyInfo<TKey, TObjectType, TPropertyType, TEnableFlag>& inProp, PxU32 )
389 {
390 handleBuffer( inProp );
391 }
392
393 template<PxU32 TKey, typename TObjType>
394 void operator()( const PxReadOnlyCollectionPropertyInfo<TKey, TObjType, PxU32>& prop, PxU32 )
395 {
396 mOperator.handleCollection( prop );
397 }
398
399 template<PxU32 TKey, typename TObjType>
400 void operator()( const PxReadOnlyCollectionPropertyInfo<TKey, TObjType, PxReal>& prop, PxU32 )
401 {
402 mOperator.handleCollection( prop );
403 }
404
405 template<PxU32 TKey, typename TObjType, typename TPropertyType>
406 void operator()( const PxWriteOnlyPropertyInfo<TKey,TObjType,TPropertyType>&, PxU32 ) {}
407
408 template<PxU32 TKey, typename TObjType, typename TCollectionType>
410
411 template<PxU32 TKey, typename TObjType, typename TCollectionType, typename TFilterType>
413
414
415 //We don't deal with these property datatypes.
416#define DEFINE_PVD_PROPERTY_NOP(datatype) \
417 template<PxU32 TKey, typename TObjType> \
418 void operator()( const PxReadOnlyPropertyInfo<TKey,TObjType,datatype>& inProperty, PxU32 ){PX_UNUSED(inProperty); }
419
420 DEFINE_PVD_PROPERTY_NOP( const void* )
421 DEFINE_PVD_PROPERTY_NOP( void* )
422 DEFINE_PVD_PROPERTY_NOP( PxSimulationFilterCallback * )
423 DEFINE_PVD_PROPERTY_NOP( physx::PxTaskManager * )
424 DEFINE_PVD_PROPERTY_NOP( PxSimulationFilterShader * )
425 DEFINE_PVD_PROPERTY_NOP( PxSimulationFilterShader)
426 DEFINE_PVD_PROPERTY_NOP( PxContactModifyCallback * )
427 DEFINE_PVD_PROPERTY_NOP( PxCCDContactModifyCallback * )
428 DEFINE_PVD_PROPERTY_NOP( PxSimulationEventCallback * )
429 DEFINE_PVD_PROPERTY_NOP( physx::PxCudaContextManager* )
430 DEFINE_PVD_PROPERTY_NOP( physx::PxCpuDispatcher * )
431 DEFINE_PVD_PROPERTY_NOP( PxRigidActor )
432 DEFINE_PVD_PROPERTY_NOP( const PxRigidActor )
433 DEFINE_PVD_PROPERTY_NOP( PxRigidActor& )
434 DEFINE_PVD_PROPERTY_NOP( const PxRigidActor& )
435 DEFINE_PVD_PROPERTY_NOP( PxScene* )
436 DEFINE_PVD_PROPERTY_NOP( PxConstraint )
437 DEFINE_PVD_PROPERTY_NOP( PxConstraint* )
438 DEFINE_PVD_PROPERTY_NOP( PxConstraint& )
439 DEFINE_PVD_PROPERTY_NOP( const PxConstraint& )
440 DEFINE_PVD_PROPERTY_NOP( PxAggregate * )
441 DEFINE_PVD_PROPERTY_NOP( PxArticulationReducedCoordinate&)
442 DEFINE_PVD_PROPERTY_NOP( const PxArticulationLink * )
443 DEFINE_PVD_PROPERTY_NOP( const PxRigidDynamic * )
444 DEFINE_PVD_PROPERTY_NOP( const PxRigidStatic * )
445 DEFINE_PVD_PROPERTY_NOP( PxArticulationJointReducedCoordinate * )
446 DEFINE_PVD_PROPERTY_NOP( PxBroadPhaseCallback * )
447 DEFINE_PVD_PROPERTY_NOP( const PxBroadPhaseRegion * )
448 DEFINE_PVD_PROPERTY_NOP( PxU32 * )
449};
450
451template<typename TOperator>
452inline PvdPropertyFilter<TOperator> makePvdPropertyFilter( TOperator inOperator )
453{
454 return PvdPropertyFilter<TOperator>( inOperator );
455}
456
457template<typename TOperator>
458inline PvdPropertyFilter<TOperator> makePvdPropertyFilter( TOperator inOperator, PxU32* inKey, PxU32* inOffset )
459{
460 return PvdPropertyFilter<TOperator>( inOperator, inKey, inOffset );
461}
462
463template<typename TOperator, typename TFuncType>
464inline void visitWithPvdFilter( TOperator inOperator, TFuncType inFuncType )
465{
466 PX_UNUSED(inFuncType);
467 TFuncType( makePvdPropertyFilter( inOperator ) );
468}
469
470template<typename TObjType, typename TOperator>
471inline void visitInstancePvdProperties( TOperator inOperator )
472{
473 visitInstanceProperties<TObjType>( makePvdPropertyFilter( inOperator ) );
474}
475
476template<typename TOperator>
478{
479 TOperator mOperator;
480 PvdAllPropertyVisitor( TOperator op ) : mOperator( op ) {}
481 template<typename TObjectType>
482 bool operator()( const TObjectType* ) { visitInstancePvdProperties<TObjectType>( mOperator ); return false; }
483};
484
485
486template<typename TOperator>
488{
489 TOperator mOperator;
490 PvdAllInfoVisitor( TOperator op ) : mOperator( op ) {}
491 template<typename TInfoType>
492 void operator()( TInfoType inInfo )
493 {
494 inInfo.template visitType<bool>( PvdAllPropertyVisitor<TOperator>( mOperator ) );
495 inInfo.visitBases( *this );
496 }
497};
498
499
500template<typename TObjType, typename TOperator>
501inline void visitAllPvdProperties( TOperator inOperator )
502{
503 visitAllProperties<TObjType>( makePvdPropertyFilter( inOperator ) );
504}
505
506
507
508template<typename TOperator>
509inline void visitRigidDynamicPerFrameProperties( TOperator inOperator )
510{
511 PvdPropertyFilter<TOperator> theFilter( inOperator );
513 theFilter( theInfo.GlobalPose, 0 );
514 theFilter( theInfo.LinearVelocity, 1 );
515 theFilter( theInfo.AngularVelocity, 2 );
516 theFilter( theInfo.IsSleeping, 3 );
517}
518
519template<typename TOperator>
520inline void visitArticulationLinkPerFrameProperties( TOperator inOperator )
521{
522 PvdPropertyFilter<TOperator> theFilter( inOperator );
524 theFilter( theInfo.GlobalPose, 0 );
525}
526
527}
528
529}
530
531#endif
Class to aggregate actors into a single broad-phase entry.
Definition PxAggregate.h:98
A joint between two links in an articulation.
Definition PxArticulationJointReducedCoordinate.h:49
A tree structure of bodies connected by joints that is treated as a unit by the dynamics solver....
Definition PxArticulationReducedCoordinate.h:448
Broad-phase callback to receive broad-phase related events.
Definition PxScene.h:144
An interface class that the user can implement in order to modify CCD contact constraints.
Definition PxContactModifyCallback.h:500
A plugin class for implementing constraints.
Definition PxConstraint.h:100
An interface class that the user can implement in order to modify contact constraints.
Definition PxContactModifyCallback.h:459
A CpuDispatcher is responsible for scheduling the execution of tasks passed to it by the SDK.
Definition PxCpuDispatcher.h:50
PxRigidActor represents a base class shared between dynamic and static rigid bodies in the physics SD...
Definition PxRigidActor.h:53
PxRigidDynamic represents a dynamic rigid simulation object in the physics SDK.
Definition PxRigidDynamic.h:82
PxRigidStatic represents a static rigid body simulation object in the physics SDK.
Definition PxRigidStatic.h:58
A scene is a collection of bodies and constraints which can interact.
Definition PxScene.h:178
An interface class that the user can implement in order to receive simulation events.
Definition PxSimulationEventCallback.h:792
Filter callback to specify handling of collision pairs.
Definition PxFiltering.h:633
The PxTaskManager interface.
Definition PxTaskManager.h:81
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
PxFilterFlags(* PxSimulationFilterShader)(PxFilterObjectAttributes attributes0, PxFilterData filterData0, PxFilterObjectAttributes attributes1, PxFilterData filterData1, PxPairFlags &pairFlags, const void *constantBlock, PxU32 constantBlockSize)
Filter method to specify how a pair of potentially colliding objects should be processed.
Definition PxFiltering.h:604
Definition PxAutoGeneratedMetaDataObjects.h:1058
Definition PxAutoGeneratedMetaDataObjects.h:924
"Region of interest" for the broad-phase.
Definition PxBroadPhase.h:110
Definition PxMetaDataObjects.h:298
Definition PxMetaDataObjects.h:478
Definition PxMetaDataObjects.h:255
Definition PxMetaDataObjects.h:583
Definition PxMetaDataObjects.h:274
Definition PxMetaDataObjects.h:230
Definition PxMetaDataObjects.h:321
Definition PxMetaDataObjects.h:211
Definition PxMetaDataObjects.h:489
Definition PxMetaDataObjects.h:186
Definition PxMetaDataObjects.h:353
Definition PxMetaDataObjects.h:373
Definition PxMetaDataObjects.h:149
Definition PxMetaDataObjects.h:124
Definition PxMetaDataObjects.h:453
Definition PxMetaDataObjects.h:160
Definition PvdMetaDataExtensions.h:104
Definition PvdMetaDataExtensions.h:294
Definition PvdMetaDataPropertyVisitor.h:488
Definition PvdMetaDataPropertyVisitor.h:478
Definition PvdMetaDataPropertyVisitor.h:45
Definition PvdMetaDataExtensions.h:139
Definition PvdMetaDataExtensions.h:83
Definition PvdMetaDataExtensions.h:219
Definition PvdMetaDataExtensions.h:241
Definition PvdMetaDataExtensions.h:177
Definition PvdMetaDataExtensions.h:197
Definition PvdMetaDataExtensions.h:159
Definition PvdMetaDataExtensions.h:263
Definition PvdMetaDataExtensions.h:122
Definition PvdMetaDataExtensions.h:109