RavEngine
Loading...
Searching...
No Matches
PxCustomSceneQuerySystem.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_NEW_SCENE_QUERY_SYSTEM_H
30#define PX_NEW_SCENE_QUERY_SYSTEM_H
35#include "PxSceneQuerySystem.h"
36
37#if !PX_DOXYGEN
38namespace physx
39{
40#endif
41
53 {
54 public:
56 virtual ~PxCustomSceneQuerySystem() {}
57
78 virtual PxU32 addPruner(PxPruningStructureType::Enum primaryType, PxDynamicTreeSecondaryPruner::Enum secondaryType, PxU32 preallocated=0) = 0;
79
103 virtual PxU32 startCustomBuildstep() = 0;
104
112 virtual void customBuildstep(PxU32 index) = 0;
113
121 virtual void finishCustomBuildstep() = 0;
122 };
123
133 {
134 public:
137
152 virtual PxU32 getPrunerIndex(const PxRigidActor& actor, const PxShape& shape) const = 0;
153
166 virtual bool processPruner(PxU32 prunerIndex, const PxQueryThreadContext* context, const PxQueryFilterData& filterData, PxQueryFilterCallback* filterCall) const = 0;
167 };
168
184 PxCustomSceneQuerySystem* PxCreateCustomSceneQuerySystem(PxSceneQueryUpdateMode::Enum sceneQueryUpdateMode, PxU64 contextID, const PxCustomSceneQuerySystemAdapter& adapter, bool usesTreeOfPruners=false);
185
186#if !PX_DOXYGEN
187} // namespace physx
188#endif
189
191#endif
Definition base.h:1940
An adapter class to customize the object-to-pruner mapping.
Definition PxCustomSceneQuerySystem.h:133
virtual bool processPruner(PxU32 prunerIndex, const PxQueryThreadContext *context, const PxQueryFilterData &filterData, PxQueryFilterCallback *filterCall) const =0
Pruner filtering callback.
virtual PxU32 getPrunerIndex(const PxRigidActor &actor, const PxShape &shape) const =0
Gets a pruner index for an actor/shape.
A custom scene query system.
Definition PxCustomSceneQuerySystem.h:53
virtual PxU32 addPruner(PxPruningStructureType::Enum primaryType, PxDynamicTreeSecondaryPruner::Enum secondaryType, PxU32 preallocated=0)=0
Adds a pruner to the system.
virtual void customBuildstep(PxU32 index)=0
Perform a custom build-step for a given pruner.
virtual void finishCustomBuildstep()=0
Finish custom build-steps.
virtual PxU32 startCustomBuildstep()=0
Start custom build-steps for all pruners.
Scene query filtering callbacks.
Definition PxQueryFiltering.h:175
PxRigidActor represents a base class shared between dynamic and static rigid bodies in the physics SD...
Definition PxRigidActor.h:53
Scene-queries external sub-system for PxScene-based objects.
Definition PxSceneQuerySystem.h:421
Abstract class for collision shapes.
Definition PxShape.h:146
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
PxCustomSceneQuerySystem * PxCreateCustomSceneQuerySystem(PxSceneQueryUpdateMode::Enum sceneQueryUpdateMode, PxU64 contextID, const PxCustomSceneQuerySystemAdapter &adapter, bool usesTreeOfPruners=false)
Creates a custom scene query system.
Definition ExtCustomSceneQuerySystem.cpp:501
Enum
Definition PxSceneQueryDesc.h:101
Enum
Definition PxSceneQueryDesc.h:65
Scene query filtering data.
Definition PxQueryFiltering.h:138
A per-thread context passed to low-level query functions.
Definition PxGeometryQueryContext.h:52
Enum
Definition PxSceneQueryDesc.h:134