Panda3D
Loading...
Searching...
No Matches
physxMemoryReadBuffer.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 physxMemoryReadBuffer.h
10 * @author enn0x
11 * @date 2009-10-11
12 */
13
14#ifndef PHYSXMEMORYREADBUFFER_H
15#define PHYSXMEMORYREADBUFFER_H
16
17#include "pandabase.h"
18
19#include "physx_includes.h"
20
21/**
22 *
23 */
24class EXPCL_PANDAPHYSX PhysxMemoryReadBuffer : public NxStream {
25
26public:
27 PhysxMemoryReadBuffer(const NxU8 *data);
28 virtual ~PhysxMemoryReadBuffer();
29
30 virtual NxU8 readByte() const;
31 virtual NxU16 readWord() const;
32 virtual NxU32 readDword() const;
33 virtual float readFloat() const;
34 virtual double readDouble() const;
35 virtual void readBuffer(void *buffer, NxU32 size) const;
36
37 virtual NxStream &storeByte(NxU8 b) { NX_ASSERT(0); return *this; }
38 virtual NxStream &storeWord(NxU16 w) { NX_ASSERT(0); return *this; }
39 virtual NxStream &storeDword(NxU32 d) { NX_ASSERT(0); return *this; }
40 virtual NxStream &storeFloat(NxReal f) { NX_ASSERT(0); return *this; }
41 virtual NxStream &storeDouble(NxF64 f) { NX_ASSERT(0); return *this; }
42 virtual NxStream &storeBuffer(const void *buffer, NxU32 size) { NX_ASSERT(0); return *this; }
43
44 mutable const NxU8 *buffer;
45};
46
47#endif // PHYSXMEMORYREADBUFFER_H
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.