Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
SoSFArray2D.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-2014 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : R. ALBOU (Jan 2005)
22**=======================================================================*/
23
24#ifndef _SO_SF_ARRAY_2D_
25#define _SO_SF_ARRAY_2D_
26
27#include <Inventor/fields/SoSubField.h>
28#include <Inventor/fields/SoSFImage.h>
29#include <Inventor/fields/SoSFArray.h>
30
31class SoMemoryObject;
32
113class SoSFArray2D : public SoSFArray
114{
115 // Uses only some of the standard field stuff
116 // (because there is no SbArray2D type):
117 SO_SFIELD_REQUIRED_HEADER(SoSFArray2D);
118 SO_SFIELD_CONSTRUCTOR_HEADER(SoSFArray2D);
119
120public:
125 void setValue(const SbVec2s &size, DataType dataType,
126 const void* data, CopyPolicy copy=COPY);
127
132 void setValue(const SbVec2i32 &size, DataType dataType,
133 const void* data, CopyPolicy copy=COPY);
134
140 const void* getValue(SbVec2s &size, DataType &dataType) const ;
141
147 const void* getValue(SbVec2i32 &size, DataType &dataType) const ;
148
159 void* startEditing(SbVec2s &size, DataType &dataType);
160
171 void* startEditing(SbVec2i32 &size, DataType &dataType);
172
177 inline SbVec2i32 getSize() const;
178
179private:
183
184private:
185 static void initClass();
186 static void exitClass();
187};
188/*----------------------------------------------------------------------------*/
189
190/*----------------------------------------------------------------------------*/
193{
194 return SbVec2i32(m_size[0], m_size[1]);
195}
196
197#endif /* _SO_SF_ARRAY_2D_ */
198
199
2D vector class.
Definition SbVec.h:517
2D vector class.
Definition SbVec.h:700
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Handle memory bu...
Field containing a 2D array value.
void * startEditing(SbVec2s &size, DataType &dataType)
Returns a pointer to the internally maintained array that can be modified.
const void * getValue(SbVec2s &size, DataType &dataType) const
Returns a read-only pointer to the 2D array's values and its dimensions and data type.
SbVec2i32 getSize() const
Returns the dimensions of the array.
void setValue(const SbVec2s &size, DataType dataType, const void *data, CopyPolicy copy=COPY)
Fill the 2D array with data of the specified dimensions and type using the specified copy policy.
void setValue(const SbVec2i32 &size, DataType dataType, const void *data, CopyPolicy copy=COPY)
Fill the 2D array with data of the specified dimensions and type using the specified copy policy.
const void * getValue(SbVec2i32 &size, DataType &dataType) const
Returns a read-only pointer to the 2D array's values and its dimensions and data type.
void * startEditing(SbVec2i32 &size, DataType &dataType)
Returns a pointer to the internally maintained array that can be modified.
Abstract Field containing an array of values.
Definition SoSFArray.h:50
void * getValue() const
Returns a read-only pointer to the array's values.
Definition SoSFArray.h:253
CopyPolicy
SoSFArray may be manipulating some large amounts of memory.
Definition SoSFArray.h:63
@ COPY
Open Inventor will make a copy of the data (default)
Definition SoSFArray.h:67
DataType
Supported data type enumeration values.
Definition SoSFArray.h:86
void setValue(const SbVec3i32 &size, const SbDataType &dataType, const void *data, CopyPolicy copy=COPY)
Fill the array with data of the specified dimensions and type using the specified copy policy.
void * startEditing(SbVec3i32 &size, SbDataType &dataType)
Returns a pointer to the internally maintained array that can be modified.