Open Inventor Release 2024.1.1
 
Loading...
Searching...
No Matches
SoBufferPropertiesInterface.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#if !defined SOBUFFERPROPERTIESINTERFACE_H
24#define SOBUFFERPROPERTIESINTERFACE_H
25
26#include <Inventor/SbBase.h>
27#include <Inventor/devices/SoBufferObject.h>
28
30
31
49{
50
51 // ----------------------- Public usage --------------------------------------
52public:
53
58
63
72 virtual bool getMinMax(double& min, double& max) = 0;
73
80 virtual size_t getRealSize() const = 0;
81
82private:
83
84 // Set the cache id allocated by the DataSet
85 virtual void setCacheSignature(const uint64_t& cacheSignature);
86
87 // Retrieve cache id allocated by the DataSet
88 uint64_t getCacheSignature();
89
90SoINTERNAL private:
91
92 void invalidateCache();
93
94 // Tell if the Min/Max values are available
95 bool m_bMinMaxIsSet;
96
97 // Real size of the buffer (once uncompressed)
98 size_t m_realSize;
99
100 // Min and Max value of the buffer
101 double m_dMin, m_dMax;
102
103 // id of the buffer in the mapping of Inventor base
104 uint64_t m_mappingId;
105
106 // Check the given access mode is supported by buffer
107 bool checkAccessMode( const SoBufferObject::AccessMode accessMode );
108
109 // Internal unmap method. As long as code is the same
110 // for all buffer that inherits of this interface
111 void internalUnmap( SoBufferObject* bufferObject );
112
113 // Unique Id allocated by volumeData;
114 uint64_t m_cacheSignature;
115
116 // Internal buffer Management
117 SoCpuBufferObject* m_internalPtrRef;
118 uint64_t m_internalPtrRefCount;
119
124};
125
126#endif //SOBUFFERPROPERTIESINTERFACE_H
127
<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.
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> LDM inte...
SoBufferPropertiesInterface()
Default constructor.
virtual ~SoBufferPropertiesInterface()
Destructor.
virtual size_t getRealSize() const =0
Returns the real size of the buffer in bytes.
virtual bool getMinMax(double &min, double &max)=0
Get the min and max values in the buffer, if they are known.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> CPU buffer objec...