| 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_CLIENT |
| 15 | #define PX_PHYSICS_NX_CLIENT |
| 16 | |
| 17 | #include "foundation/PxFlags.h" |
| 18 | |
| 19 | #ifndef PX_DOXYGEN |
| 20 | namespace physx |
| 21 | { |
| 22 | #endif |
| 23 | |
| 24 | /** |
| 25 | \brief An ID to identify different clients for multiclient support. |
| 26 | |
| 27 | @see PxScene::createClient() |
| 28 | */ |
| 29 | typedef PxU8 PxClientID; |
| 30 | |
| 31 | /** |
| 32 | \brief The predefined default PxClientID value. |
| 33 | |
| 34 | @see PxClientID PxScene::createClient() |
| 35 | */ |
| 36 | static const PxClientID PX_DEFAULT_CLIENT = 0; |
| 37 | |
| 38 | /** |
| 39 | \brief The maximum number of clients we support. |
| 40 | |
| 41 | @see PxClientID PxScene::createClient() |
| 42 | */ |
| 43 | static const PxClientID PX_MAX_CLIENTS = 128; |
| 44 | |
| 45 | /** |
| 46 | \brief Behavior bit flags for simulation clients. |
| 47 | |
| 48 | @see PxClientBehaviorFlags PxScene::setClientBehaviorFlags() |
| 49 | */ |
| 50 | struct PxClientBehaviorFlag |
| 51 | { |
| 52 | enum Enum |
| 53 | { |
| 54 | /** |
| 55 | \brief Report actors belonging to other clients to the trigger callback of this client. |
| 56 | |
| 57 | @see PxSimulationEventCallback::onTrigger() |
| 58 | */ |
| 59 | eREPORT_FOREIGN_OBJECTS_TO_TRIGGER_NOTIFY = (1<<0), |
| 60 | /** |
| 61 | \brief Report actors belonging to other clients to the contact callback of this client. |
| 62 | |
| 63 | @see PxSimulationEventCallback::onContact() |
| 64 | */ |
| 65 | eREPORT_FOREIGN_OBJECTS_TO_CONTACT_NOTIFY = (1<<1), |
| 66 | /** |
| 67 | \brief Report actors belonging to other clients to the constraint break callback of this client. |
| 68 | |
| 69 | @see PxSimulationEventCallback::onConstraintBreak() |
| 70 | */ |
| 71 | eREPORT_FOREIGN_OBJECTS_TO_CONSTRAINT_BREAK_NOTIFY = (1<<2), |
| 72 | /** |
| 73 | \brief Report actors belonging to other clients to scene queries of this client. |
| 74 | */ |
| 75 | eREPORT_FOREIGN_OBJECTS_TO_SCENE_QUERY = (1<<3) |
| 76 | }; |
| 77 | }; |
| 78 | |
| 79 | /** |
| 80 | \brief Bitfield that contains a set of raised flags defined in PxClientBehaviorFlag. |
| 81 | |
| 82 | @see PxClientBehaviorFlag PxScene::setClientBehaviorFlags() |
| 83 | */ |
| 84 | typedef PxFlags<PxClientBehaviorFlag::Enum, PxU8> PxClientBehaviorFlags; |
| 85 | PX_FLAGS_OPERATORS(PxClientBehaviorFlag::Enum, PxU8) |
| 86 | |
| 87 | |
| 88 | /** |
| 89 | \brief Multiclient behavior bit flags for actors. |
| 90 | |
| 91 | @see PxActorClientBehaviorFlags PxActor::setClientBehaviorFlags() |
| 92 | */ |
| 93 | struct PxActorClientBehaviorFlag |
| 94 | { |
| 95 | enum Enum |
| 96 | { |
| 97 | /** |
| 98 | \brief Report this actor to trigger callbacks of other clients. |
| 99 | |
| 100 | @see PxSimulationEventCallback::onTrigger() |
| 101 | */ |
| 102 | eREPORT_TO_FOREIGN_CLIENTS_TRIGGER_NOTIFY = (1<<0), |
| 103 | /** |
| 104 | \brief Report this actor to contact callbacks of other clients. |
| 105 | |
| 106 | @see PxSimulationEventCallback::onContact() |
| 107 | */ |
| 108 | eREPORT_TO_FOREIGN_CLIENTS_CONTACT_NOTIFY = (1<<1), |
| 109 | /** |
| 110 | \brief Report this actor to constraint break callbacks of other clients. |
| 111 | |
| 112 | @see PxSimulationEventCallback::onConstraintBreak() |
| 113 | */ |
| 114 | eREPORT_TO_FOREIGN_CLIENTS_CONSTRAINT_BREAK_NOTIFY = (1<<2), |
| 115 | /** |
| 116 | \brief Report this actor to scene queries of other clients. |
| 117 | */ |
| 118 | eREPORT_TO_FOREIGN_CLIENTS_SCENE_QUERY = (1<<3) |
| 119 | }; |
| 120 | }; |
| 121 | |
| 122 | /** |
| 123 | \brief Bitfield that contains a set of raised flags defined in PxActorClientBehaviorFlag. |
| 124 | |
| 125 | @see PxActorClientBehaviorFlag PxActor::setClientBehaviorFlags() |
| 126 | */ |
| 127 | typedef PxFlags<PxActorClientBehaviorFlag::Enum, PxU8> PxActorClientBehaviorFlags; |
| 128 | PX_FLAGS_OPERATORS(PxActorClientBehaviorFlag::Enum, PxU8) |
| 129 | |
| 130 | #ifndef PX_DOXYGEN |
| 131 | } // namespace physx |
| 132 | #endif |
| 133 | |
| 134 | #endif |
| 135 | |