Panda3D
|
00001 // Filename: physxMemoryReadBuffer.h 00002 // Created by: enn0x (11Oct09) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #ifndef PHYSXMEMORYREADBUFFER_H 00016 #define PHYSXMEMORYREADBUFFER_H 00017 00018 #include "pandabase.h" 00019 00020 #include "physx_includes.h" 00021 00022 //////////////////////////////////////////////////////////////////// 00023 // Class : PhysxMemoryReadBuffer 00024 // Description : 00025 //////////////////////////////////////////////////////////////////// 00026 class EXPCL_PANDAPHYSX PhysxMemoryReadBuffer : public NxStream { 00027 00028 public: 00029 PhysxMemoryReadBuffer(const NxU8 *data); 00030 virtual ~PhysxMemoryReadBuffer(); 00031 00032 virtual NxU8 readByte() const; 00033 virtual NxU16 readWord() const; 00034 virtual NxU32 readDword() const; 00035 virtual float readFloat() const; 00036 virtual double readDouble() const; 00037 virtual void readBuffer(void *buffer, NxU32 size) const; 00038 00039 virtual NxStream &storeByte(NxU8 b) { NX_ASSERT(0); return *this; } 00040 virtual NxStream &storeWord(NxU16 w) { NX_ASSERT(0); return *this; } 00041 virtual NxStream &storeDword(NxU32 d) { NX_ASSERT(0); return *this; } 00042 virtual NxStream &storeFloat(NxReal f) { NX_ASSERT(0); return *this; } 00043 virtual NxStream &storeDouble(NxF64 f) { NX_ASSERT(0); return *this; } 00044 virtual NxStream &storeBuffer(const void *buffer, NxU32 size) { NX_ASSERT(0); return *this; } 00045 00046 mutable const NxU8 *buffer; 00047 }; 00048 00049 #endif // PHYSXMEMORYREADBUFFER_H