00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #pragma once
00024
00025 #include <Inventor/devices/SoCpuBufferObject.h>
00026 #include <LDM/tiles/SoBufferPropertiesInterface.h>
00027 #include <LDM/tiles/SoLDMBufferObjectInterface.h>
00028 #include <LDM/SoLDMTileID.h>
00029
00030 class SoDataSet;
00031 class SoGLBufferObject;
00032 class SoCpuBufferFromVolumeReaderImpl;
00033
00045 class SoCpuBufferFromVolumeReader: public SoCpuBufferObject, public SoBufferPropertiesInterface, public SoLDMBufferObjectInterface
00046 {
00047 SO_TYPED_CLASS_HEADER();
00048
00049
00050 public:
00051
00058 SoCpuBufferFromVolumeReader( SoDataSet* dataset, SoLDMTileID tileId );
00059
00071 virtual void map( SoBufferObject* targetBufferObject, SoBufferObject::AccessMode accessMode, size_t startPosition, size_t mappingSize = SO_BUFFER_SIZE_ALL);
00072
00078 virtual void map( SoCpuBufferObject* targetBufferObject, SoBufferObject::AccessMode accessMode, size_t startPosition = 0, size_t mappingSize = SO_BUFFER_SIZE_ALL );
00079
00085 virtual void map( SoGLBufferObject* targetBufferObject, SoBufferObject::AccessMode accessMode, size_t startPosition = 0, size_t mappingSize = SO_BUFFER_SIZE_ALL );
00086
00097 virtual void* map(SoBufferObject::AccessMode accessMode, size_t offset = 0, size_t count = SO_BUFFER_SIZE_ALL);
00098
00107 virtual void unmap( SoCpuBufferObject* bufferObject );
00108
00117 virtual void unmap( SoGLBufferObject* bufferObject );
00118
00125 void unmap( SoBufferObject* bufferObject );
00126
00132 virtual void unmap();
00133
00142 bool getMinMax( double& min, double& max);
00143
00147 size_t getRealSize() const;
00148
00149 private:
00153 virtual ~SoCpuBufferFromVolumeReader();
00154
00155 SoINTERNAL private:
00156
00157 virtual SoCpuBufferObject* createCachedBuffer();
00158
00159 virtual void prefetchBuffer();
00160
00161 friend class SoCpuBufferFromVolumeReaderImpl;
00162
00163 SoCpuBufferFromVolumeReader( SoCpuBufferFromVolumeReaderImpl* impl );
00164
00165 private:
00169 SoCpuBufferFromVolumeReader() {}
00170 };
00171