OROCHI
 
Loading...
Searching...
No Matches
GxNxStreamBuffer.h
Go to the documentation of this file.
1//===========================================================================
10//===========================================================================
11#pragma once
12
13#if PLATFORM_PHYSX_SUPPORT
14
16//===========================================================================
18//===========================================================================
19class MemoryWriteBuffer : public PxOutputStream
20{
21 //-------------------------------------------------------------
23 //-------------------------------------------------------------
25public:
27 MemoryWriteBuffer(void);
29 virtual ~MemoryWriteBuffer(void);
30
32 //-----------------------------------------------------------
34 //-----------------------------------------------------------
36
38 u32 write(const void* pSrc, u32 count) override;
39
41 //-----------------------------------------------------------
43 //-----------------------------------------------------------
45
46 PxU32 _currentSize;
47 PxU32 _maxSize;
48 PxU8* _pData;
49
51};
52
53//===========================================================================
55//===========================================================================
56class MemoryWriteBufferFast : public PxOutputStream
57{
58 //-------------------------------------------------------------
60 //-------------------------------------------------------------
62public:
64 MemoryWriteBufferFast(void);
66 virtual ~MemoryWriteBufferFast(void);
67
69 //-----------------------------------------------------------
71 //-----------------------------------------------------------
73
74 // 書込み
75 u32 write(const void* pSrc, u32 count) override;
76
78 //-----------------------------------------------------------
80 //-----------------------------------------------------------
82
83 PxU32 _seek;
84 PxU32 _maxSize;
85 PxU8* _pData;
86
88};
89
90//===========================================================================
92//===========================================================================
93class MemoryReadBuffer : public PxInputStream
94{
95 //-------------------------------------------------------------
97 //-------------------------------------------------------------
99public:
101 MemoryReadBuffer(const PxU8* pData);
103 virtual ~MemoryReadBuffer(void);
104
106 //-----------------------------------------------------------
108 //-----------------------------------------------------------
110
112 u32 read(void* pBuffer, u32 count) override;
113
115 //-----------------------------------------------------------
117 //-----------------------------------------------------------
119
120 mutable const PxU8* _pBuffer;
121
123};
124GX_PHYSICS_NAMESPACE_END()
125
126#endif //PLATFORM_PHYSX_SUPPORT
#define GX_PHYSICS_NAMESPACE_BEGIN()
ネームスペースマクロ
Definition GxPhysics.h:28