PhysX Stream.h 916 B

123456789101112131415161718192021222324252627
  1. /******************************************************************************/
  2. #pragma once // needed for android "fake PCH" compilation
  3. #if PHYSX
  4. /******************************************************************************/
  5. struct OutputStream : PxOutputStream
  6. {
  7. Int pos, max;
  8. Byte *data;
  9. virtual PxU32 write(const void* src, PxU32 count);
  10. OutputStream() {pos=max=0; data=null;}
  11. ~OutputStream() {pos=max=0; Free(data);}
  12. };
  13. /******************************************************************************/
  14. struct InputStream : PxInputStream
  15. {
  16. Int pos, size;
  17. const Byte *data;
  18. virtual PxU32 read(void* dest, PxU32 count);
  19. InputStream(CPtr data, Int size) {T.pos=0; T.size=size; T.data=(const Byte*)data;}
  20. };
  21. /******************************************************************************/
  22. #endif
  23. /******************************************************************************/