Panda3D
physxMemoryWriteBuffer.h
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file physxMemoryWriteBuffer.h
10  * @author enn0x
11  * @date 2009-10-11
12  */
13 
14 #ifndef PHYSXMEMORYWRITEBUFFER_H
15 #define PHYSXMEMORYWRITEBUFFER_H
16 
17 #include "pandabase.h"
18 
19 #include "physx_includes.h"
20 
21 /**
22  *
23  */
24 class EXPCL_PANDAPHYSX PhysxMemoryWriteBuffer : public NxStream {
25 
26 public:
28  virtual ~PhysxMemoryWriteBuffer();
29 
30  virtual NxU8 readByte() const { NX_ASSERT(0); return 0; }
31  virtual NxU16 readWord() const { NX_ASSERT(0); return 0; }
32  virtual NxU32 readDword() const { NX_ASSERT(0); return 0; }
33  virtual float readFloat() const { NX_ASSERT(0); return 0.0f; }
34  virtual double readDouble() const { NX_ASSERT(0); return 0.0; }
35  virtual void readBuffer(void *buffer, NxU32 size) const { NX_ASSERT(0); }
36 
37  virtual NxStream &storeByte(NxU8 b);
38  virtual NxStream &storeWord(NxU16 w);
39  virtual NxStream &storeDword(NxU32 d);
40  virtual NxStream &storeFloat(NxReal f);
41  virtual NxStream &storeDouble(NxF64 f);
42  virtual NxStream &storeBuffer(const void *buffer, NxU32 size);
43 
44  NxU32 currentSize;
45  NxU32 maxSize;
46  NxU8 *data;
47 };
48 
49 #endif // PHYSXMEMORYWRITEBUFFER_H
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.