Main Page
Class Hierarchy
Compound List
Compound Members
Include
PxQueryFiltering.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved.
3
*
4
* NVIDIA CORPORATION and its licensors retain all intellectual property
5
* and proprietary rights in and to this software, related documentation
6
* and any modifications thereto. Any use, reproduction, disclosure or
7
* distribution of this software and related documentation without an express
8
* license agreement from NVIDIA CORPORATION is strictly prohibited.
9
*/
10
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
11
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
12
13
14
#ifndef PX_PHYSICS_NX_SCENE_QUERY_FILTERING
15
#define PX_PHYSICS_NX_SCENE_QUERY_FILTERING
16
20
#include "
PxPhysXConfig.h
"
21
#include "
PxFiltering.h
"
22
#include "
PxQueryReport.h
"
23
#include "
PxClient.h
"
24
25
#ifndef PX_DOXYGEN
26
namespace
physx
27
{
28
#endif
29
30
class
PxShape
;
31
class
PxRigidActor
;
32
struct
PxQueryHit
;
33
34
40
struct
PxQueryFlag
41
{
42
enum
Enum
43
{
44
eSTATIC = (1<<0),
45
46
eDYNAMIC = (1<<1),
47
48
ePREFILTER = (1<<2),
49
50
ePOSTFILTER = (1<<3),
51
52
eANY_HIT = (1<<4),
53
54
55
eNO_BLOCK = (1<<5),
56
57
58
eRESERVED = (1<<15)
59
};
60
};
61
PX_COMPILE_TIME_ASSERT
(
PxQueryFlag::eSTATIC
==(1<<0));
62
PX_COMPILE_TIME_ASSERT
(
PxQueryFlag::eDYNAMIC
==(1<<1));
63
69
typedef
PxFlags<PxQueryFlag::Enum,PxU16>
PxQueryFlags
;
70
PX_FLAGS_OPERATORS
(
PxQueryFlag::Enum
,
PxU16
)
71
72
73
#define PxSceneQueryFilterFlag PxQueryFlag // PX_DEPRECATED
74
75
#define PxSceneQueryFilterFlags PxQueryFlags // PX_DEPRECATED
76
97
struct
PxQueryHitType
98
{
99
enum
Enum
100
{
101
eNONE = 0,
102
eTOUCH = 1,
103
eBLOCK = 2
104
};
105
};
106
108
#define PxSceneQueryHitType PxQueryHitType // PX_DEPRECATED
109
124
struct
PxQueryFilterData
125
{
127
explicit
PX_INLINE
PxQueryFilterData
() :
flags
(
PxQueryFlag
::eDYNAMIC |
PxQueryFlag
::eSTATIC), clientId(
PX_DEFAULT_CLIENT
) {}
128
130
explicit
PX_INLINE
PxQueryFilterData
(
const
PxFilterData
& fd,
PxQueryFlags
f) : data(fd),
flags
(f), clientId(
PX_DEFAULT_CLIENT
) {}
131
133
explicit
PX_INLINE
PxQueryFilterData
(
PxQueryFlags
f) :
flags
(f), clientId(
PX_DEFAULT_CLIENT
) {}
134
135
PxFilterData
data
;
136
PxQueryFlags
flags
;
137
PxClientID
clientId
;
138
};
139
141
#define PxSceneQueryFilterData PxQueryFilterData // PX_DEPRECATED
142
165
class
PxQueryFilterCallback
166
{
167
public
:
168
178
virtual
PxQueryHitType::Enum
preFilter(
179
const
PxFilterData
& filterData,
const
PxShape
* shape,
const
PxRigidActor
* actor, PxHitFlags& queryFlags) = 0;
180
188
virtual
PxQueryHitType::Enum
postFilter(
const
PxFilterData
& filterData,
const
PxQueryHit
& hit) = 0;
189
193
virtual
~PxQueryFilterCallback
() {}
194
};
195
197
#define PxSceneQueryFilterCallback PxQueryFilterCallback
198
230
typedef
PxQueryHitType::Enum
(*
PxBatchQueryPreFilterShader
)(
231
PxFilterData
queryFilterData,
PxFilterData
objectFilterData,
232
const
void
* constantBlock,
PxU32
constantBlockSize,
233
PxHitFlags& hitFlags);
234
261
typedef
PxQueryHitType::Enum
(*
PxBatchQueryPostFilterShader
)(
262
PxFilterData
queryFilterData,
PxFilterData
objectFilterData,
263
const
void
* constantBlock,
PxU32
constantBlockSize,
264
const
PxQueryHit
& hit);
265
266
#ifndef PX_DOXYGEN
267
}
// namespace physx
268
#endif
269
271
#endif
Copyright © 2008-2015 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved.
www.nvidia.com