24#ifndef _SO_SF_IMAGE_3_
25#define _SO_SF_IMAGE_3_
229 unsigned char *bytes,
266 unsigned char* bytes,
297 unsigned char** bytes,
308 {
return ! ((*this) == f); }
407 {
return m_neverWrite; }
417 static void initClass();
418 static void exitClass();
419 void resetSubTextures();
421 void deleteBytesArray();
424 SbBool hasTransparency()
const;
427 void setHasTransparency(SoSFImage::HasTransparency status)
429 m_hasTransparencyState = status;
443 unsigned char* m_buffer;
462 SoSFImage::HasTransparency m_hasTransparencyState;
464 size_t getImageValueSize()
const;
468 virtual void writeValue(
SoOutput *out)
const;
474 return m_bufferObject.
ptr();
480 return m_numComponents;
#define SO_SFIELD_CONSTRUCTOR_HEADER(className)
#define SO_SFIELD_REQUIRED_HEADER(className)
List of generic (void *) pointers.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> 3D vector class.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Abstract base cl...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> CPU buffer objec...
Used to write Open Inventor data files.
Smart pointer for any class inheriting SoRefCounter.
T * ptr() const
Cast to C pointer.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Field containing...
SoBufferObject * getBufferObject(SbVec3i32 &size, int &nc, SoSFImage::DataType &dataType) const
Returns the pixels in the image as a buffer object.
SbBool isNeverWrite()
As this field may have to handle large amounts of data and its representation in an ....
void setSubValues(const SbVec3s *subSizes, const SbVec3s *offsets, int num, unsigned char **bytes, CopyPolicy copy=COPY)
These methods may be used for subtexturing: instead of replacing the entire texture in texture memory...
const void * getValue(SbVec3i32 &size, int &nc, SoSFImage::DataType &dataType) const
Returns the pixels in the image as an array of values of type <dataType>.
SoBufferObject * getBufferObject(SbVec3s &size, int &nc) const
Returns the pixels in the image as a buffer object.
void setSubValue(const SbVec3i32 &subSize, const SbVec3i32 &offset, void *bytes, CopyPolicy copy=COPY)
These methods may be used for subtexturing: instead of replacing the entire texture in texture memory...
int operator==(const SoSFImage3 &f) const
Equality/inequality tests.
void setValue(const SbVec3i32 &size, int nc, SoSFImage::DataType dataType, const void *data, CopyPolicy copy=COPY)
Sets the value of this field to be an image of the given size, with the given number of components,...
void * getSubTexture(int index, SbVec3i32 &size, SbVec3i32 &offset, SoSFImage::DataType &dataType)
Returns a buffer to a given subTexture set by setSubValue, setSubValues, or a startEditing()/finishEd...
void setSubValue(const SbVec3s &subSize, const SbVec3s &offset, unsigned char *bytes, CopyPolicy copy=COPY)
These methods may be used for subtexturing: instead of replacing the entire texture in texture memory...
const unsigned char * getValue(SbVec3s &size, int &nc) const
Returns the pixels in the image as an array of unsigned chars.
unsigned char * startEditing(SbVec3s &size, int &nc)
These methods can be used to efficiently edit the values in an image field.
void setValue(const SbVec3s &size, int nc, unsigned char *bytes, CopyPolicy copy=COPY)
Sets the value of this field to be an image of the given size, with the given number of components,...
int operator!=(const SoSFImage3 &f) const
Equality/inequality tests.
CopyPolicy
SoSFImage3 may be manipulating some large amounts of memory.
@ NO_COPY_AND_FREE
Passed buffer used, SoSFImage3 will free .
@ NO_COPY
Passed buffer used , user will delete .
@ COPY
Open Inventor will make a copy of the data (default)
@ NO_COPY_AND_DELETE
Passed buffer used, SoSFImage3 will delete .
void setSubValues(const SbVec3i32 *subSizes, const SbVec3i32 *offsets, int num, void **data, CopyPolicy copy=COPY)
These methods may be used for subtexturing: instead of replacing the entire texture in texture memory...
SoBufferObject * getBufferObject() const
void setValue(const SbVec3s &size, int nc, SoBufferObject *bufferObject, CopyPolicy copy=COPY)
Sets the value of this field to be an image of the given size, with the given number of components,...
void * startEditing(SbVec3i32 &size, int &nc, SoSFImage::DataType &dataType)
These methods can be used to efficiently edit the values in an image field.
SbBool hasSubTextures(int &numSubTextures)
Returns TRUE if subTextures have been defined or FALSE if none have been defined.
void setNeverWrite(SbBool neverWrite)
As this field may have to handle large amounts of data and its representation in an ....
int getNumComponents() const
Returns the number of components in each pixels of the image.
void finishEditing()
These methods can be used to efficiently edit the values in an image field.
void setValue(const SbVec3i32 &size, int nc, SoSFImage::DataType dataType, SoBufferObject *bufferObject, CopyPolicy copy=COPY)
Sets the value of this field to be an image of the given size, with the given number of components,...
unsigned char * getSubTexture(int index, SbVec3s &size, SbVec3s &offset)
Returns a buffer to a given subTexture set by setSubValue, setSubValues, or a startEditing()/finishEd...
DataType
Encoding data type.
Abstract base class for all single-value fields.