Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef PX_STREAM_FROM_FILE_BUF_H
00013 #define PX_STREAM_FROM_FILE_BUF_H
00014
00020 #include "ApexDefs.h"
00021 #include "foundation/PxIO.h"
00022 #include "filebuf/PxFileBuf.h"
00023
00024 namespace nvidia
00025 {
00026 namespace apex
00027 {
00028
00029 PX_PUSH_PACK_DEFAULT
00030
00034 class PxStreamFromFileBuf :
00035 public physx::PxInputStream, public physx::PxOutputStream
00036 {
00037 private:
00038 physx::PxFileBuf& mFileBuf;
00039 PxStreamFromFileBuf& operator=(const PxStreamFromFileBuf&)
00040 {
00041 return *this;
00042 }
00043
00044 public:
00046 PxStreamFromFileBuf(physx::PxFileBuf& fb) : mFileBuf(fb) {}
00047
00049 uint32_t read(void* dest, uint32_t count)
00050 {
00051 return mFileBuf.read(dest, count);
00052 }
00053
00055 uint32_t write(const void* src, uint32_t count)
00056 {
00057 return mFileBuf.write(src, count);
00058 }
00059 };
00060
00061 PX_POP_PACK
00062
00063 }
00064 }
00065
00066 #endif // PX_STREAM_FROM_FILE_BUF_H