Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
SoCpuBufferFromVolumeReader.h
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2020 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : VSG (MMM YYYY)
22**=======================================================================*/
23#pragma once
24
25#include <Inventor/devices/SoCpuBufferObject.h>
26#include <LDM/tiles/SoBufferPropertiesInterface.h>
27#include <LDM/tiles/SoLDMBufferObjectInterface.h>
28#include <LDM/SoLDMTileID.h>
29
30class SoDataSet;
32class SoCpuBufferFromVolumeReaderImpl;
33
46{
47 SO_TYPED_CLASS_HEADER();
48
49 // ----------------------- Public usage --------------------------------------
50public:
51
59
71 virtual void map( SoBufferObject* targetBufferObject, SoBufferObject::AccessMode accessMode, size_t startPosition, size_t mappingSize = SO_BUFFER_SIZE_ALL);
72
78 virtual void map( SoCpuBufferObject* targetBufferObject, SoBufferObject::AccessMode accessMode, size_t startPosition = 0, size_t mappingSize = SO_BUFFER_SIZE_ALL );
79
85 virtual void map( SoGLBufferObject* targetBufferObject, SoBufferObject::AccessMode accessMode, size_t startPosition = 0, size_t mappingSize = SO_BUFFER_SIZE_ALL );
86
97 virtual void* map(SoBufferObject::AccessMode accessMode, size_t offset = 0, size_t count = SO_BUFFER_SIZE_ALL);
98
107 virtual void unmap( SoCpuBufferObject* bufferObject );
108
117 virtual void unmap( SoGLBufferObject* bufferObject );
118
125 void unmap( SoBufferObject* bufferObject );
126
132 virtual void unmap();
133
142 bool getMinMax( double& min, double& max);
143
147 size_t getRealSize() const;
148
149private:
154
155SoINTERNAL private:
156 // Create internal uncompress version of the buffer
157 virtual SoCpuBufferObject* createCachedBuffer();
158
159 virtual void prefetchBuffer();
160
162
164
165private:
170};
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Abstract base cl...
AccessMode
This enum provides the possible access modes for a mapped buffer object.
#define SO_BUFFER_SIZE_ALL
Used to indicate that we want to use the whole buffer.
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> LDM inte...
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> LDM buff...
size_t getRealSize() const
Returns the real size of the buffer in bytes.
virtual void unmap(SoCpuBufferObject *bufferObject)
Unmap the specified CPU buffer object It is defined just to speed up the call when the type of the ...
virtual void map(SoBufferObject *targetBufferObject, SoBufferObject::AccessMode accessMode, size_t startPosition, size_t mappingSize=SO_BUFFER_SIZE_ALL)
Map the current buffer object into the specified buffer object.
SoCpuBufferFromVolumeReader(SoDataSet *dataset, SoLDMTileID tileId)
Constructor with dataset and tile Id as parameter.
virtual void unmap(SoGLBufferObject *bufferObject)
Unmap the specified GL buffer object It is defined just to speed up the call when the type of the o...
virtual void unmap()
Unmap a mapped buffer.
virtual void * map(SoBufferObject::AccessMode accessMode, size_t offset=0, size_t count=SO_BUFFER_SIZE_ALL)
Map the buffer to a system memory address and allows the mapping of a sub part of the buffer object i...
bool getMinMax(double &min, double &max)
Get the min and max values in the buffer, if they are known.
virtual void map(SoCpuBufferObject *targetBufferObject, SoBufferObject::AccessMode accessMode, size_t startPosition=0, size_t mappingSize=SO_BUFFER_SIZE_ALL)
Map the current buffer object into the specified CPU buffer object.
virtual void map(SoGLBufferObject *targetBufferObject, SoBufferObject::AccessMode accessMode, size_t startPosition=0, size_t mappingSize=SO_BUFFER_SIZE_ALL)
Map the current buffer object into the specified GL buffer object.
void unmap(SoBufferObject *bufferObject)
Unmap the specified buffer object It is defined just to speed up the call when the type of the obje...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> CPU buffer objec...
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> Data set...
Definition SoDataSet.h:139
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> OpenGL buffer ob...
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> LDM inte...
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> Tile ID
Definition SoLDMTileID.h:63