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_LOCKED_DATA |
15 | #define PX_PHYSICS_NX_LOCKED_DATA |
16 | /** \addtogroup physics |
17 | @{ |
18 | */ |
19 | |
20 | #include "PxPhysXConfig.h" |
21 | #include "foundation/PxFlags.h" |
22 | |
23 | #ifndef PX_DOXYGEN |
24 | namespace physx |
25 | { |
26 | #endif |
27 | |
28 | struct PxDataAccessFlag |
29 | { |
30 | enum Enum |
31 | { |
32 | eREADABLE = (1 << 0), |
33 | eWRITABLE = (1 << 1), |
34 | eDEVICE = (1 << 2) |
35 | }; |
36 | }; |
37 | |
38 | /** |
39 | \brief collection of set bits defined in PxDataAccessFlag. |
40 | |
41 | @see PxDataAccessFlag |
42 | */ |
43 | typedef PxFlags<PxDataAccessFlag::Enum,PxU8> PxDataAccessFlags; |
44 | PX_FLAGS_OPERATORS(PxDataAccessFlag::Enum,PxU8) |
45 | |
46 | |
47 | /** |
48 | \brief Parent class for bulk data that is shared between the SDK and the application. |
49 | */ |
50 | class PxLockedData |
51 | { |
52 | public: |
53 | |
54 | /** |
55 | \brief Any combination of PxDataAccessFlag::eREADABLE and PxDataAccessFlag::eWRITABLE |
56 | @see PxDataAccessFlag |
57 | */ |
58 | virtual PxDataAccessFlags getDataAccessFlags() = 0; |
59 | |
60 | /** |
61 | \brief Unlocks the bulk data. |
62 | */ |
63 | virtual void unlock() = 0; |
64 | |
65 | /** |
66 | \brief virtual destructor |
67 | */ |
68 | virtual ~PxLockedData() {} |
69 | }; |
70 | |
71 | #ifndef PX_DOXYGEN |
72 | } // namespace physx |
73 | #endif |
74 | |
75 | /** @} */ |
76 | #endif |
77 | |