Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
SoCpuBufferCompressed.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
27#include <LDM/tiles/SoBufferPropertiesInterface.h>
28#include <LDM/tiles/SoLDMBufferObjectInterface.h>
29#include <LDM/compressors/SoDataCompressor.h>
30
32class SoCpuBufferCompressedImpl;
33
49{
50 SO_TYPED_CLASS_HEADER();
51
52 // ----------------------- Public usage --------------------------------------
53public:
54
59
64
76 virtual void map( SoBufferObject* targetBufferObject, SoBufferObject::AccessMode accessMode, size_t startPosition = 0, size_t mappingSize = SO_BUFFER_SIZE_ALL );
77
83 virtual void map( SoCpuBufferObject* targetBufferObject, SoBufferObject::AccessMode accessMode, size_t startPosition = 0, size_t mappingSize = SO_BUFFER_SIZE_ALL);
84
90 virtual void map( SoGLBufferObject* targetBufferObject, SoBufferObject::AccessMode accessMode, size_t startPosition = 0, size_t mappingSize = SO_BUFFER_SIZE_ALL);
91
98 virtual void* map( SoBufferObject::AccessMode accessMode, size_t offset = 0, size_t count = SO_BUFFER_SIZE_ALL );
99
108 virtual void unmap( SoCpuBufferObject* bufferObject );
109
118 virtual void unmap( SoGLBufferObject* bufferObject );
119
128 virtual void unmap( SoBufferObject* bufferObject );
129
135 virtual void unmap();
136
145 virtual bool getMinMax( double& min, double& max);
146
153 virtual void setMinMax(const double& min, const double& max);
154
158 size_t getRealSize() const;
159
165 virtual void setCompressor( SoDataCompressor* compressor );
166
167private:
169 bool setTileInfo( const SoDataCompressor::TileInfo& tileInfo);
170
171private:
175 virtual ~SoCpuBufferCompressed();
176
177SoINTERNAL private:
178 // Create internal uncompress version of the buffer
179 virtual SoCpuBufferObject* createCachedBuffer();
180 virtual void prefetchBuffer();
181
183
185};
<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...
virtual void setCompressor(SoDataCompressor *compressor)
Set the compressor used to decompress buffer.
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 unmap(SoBufferObject *bufferObject)
Remove the specified bufferObject from the list of buffers which map the current buffer.
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::AccessMode accessMode, size_t offset=0, size_t count=SO_BUFFER_SIZE_ALL)
Returns a pointer to the memory array used for the storage of the buffer.
virtual void unmap()
Unmap a mapped buffer.
SoCpuBufferCompressed(SoDataCompressor *compressor)
Constructor with compressor given as parameter.
virtual void map(SoBufferObject *targetBufferObject, SoBufferObject::AccessMode accessMode, size_t startPosition=0, size_t mappingSize=SO_BUFFER_SIZE_ALL)
Map the current buffer object into the specified buffer object.
virtual bool getMinMax(double &min, double &max)
Get the min and max values in the buffer, if they are known.
size_t getRealSize() const
Returns the size of the uncompressed data in bytes.
SoCpuBufferCompressed()
Default constructor.
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 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.
virtual void setMinMax(const double &min, const double &max)
Set the min and max values for this buffer.
<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 com...
<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...
This structure contains the dimension and the type of the tile being processed.