63#pragma warning(disable:4251)
281 const unsigned char *bytes,
285 const unsigned char *bytes,
319 unsigned char *bytes);
325 unsigned char *bytes);
341 int num,
void **data);
347 int num,
void **data);
358 int num,
unsigned char **subBytes);
365 int num,
unsigned char **subBytes);
377 {
return ! ((*this) == f); }
470 {
return m_neverWrite ; }
495 return m_numComponents;
500 static void initClass();
501 static void exitClass();
502 void resetSubTextures();
520 void setHasTransparency( HasTransparency status );
536 unsigned char* m_buffer;
553 int m_hasTransparency;
555 HasTransparency m_hasTransparencyState;
559 unsigned int getImageValueSize()
const;
563 virtual void writeValue(
SoOutput *out)
const;
564 void deleteBytesArray();
571 const void*
getValue(int32_t &w, int32_t &h ,
int &nc,
DataType &dataType)
const;
578SoSFImage::getBufferObject()
const
580 return m_bufferObject.
ptr();
#define SO_SFIELD_CONSTRUCTOR_HEADER(className)
valueRef getValue() const
#define SO_SFIELD_REQUIRED_HEADER(className)
@ UNSIGNED_INT32
unsigned int (32bits)
@ UNSIGNED_BYTE
unsigned byte
@ SIGNED_SHORT
signed short
@ UNSIGNED_SHORT
unsigned short
@ SIGNED_INT32
signed int (32bits)
List of generic (void *) pointers.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Class encapsulat...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Abstract base cl...
Used to write Open Inventor data files.
Smart pointer for any class inheriting SoRefCounter.
T * ptr() const
Cast to C pointer.
Field containing a 2D image.
void setSubValues(const SbVec2s *subSizes, const SbVec2s *offsets, int num, void **data)
This method can be used for subtexturing.
SbRasterImage * toRasterImage(bool downSample=true) const
Returns an instance of SbRasterImage filled with the content of this field.
void * startEditing(SbVec2s &size, int &nc, DataType &dataType)
This method (along with finishEditing()) can be used to efficiently edit the values in an image field...
void setValue(const SbVec2i32 &size, int nc, DataType dataType, const void *data, CopyPolicy copy=COPY)
void setValue(const SbVec2i32 &size, int nc, const unsigned char *bytes, CopyPolicy copy=COPY)
unsigned char * getSubTexture(int index, SbVec2i32 &size, SbVec2i32 &offset)
const unsigned char * getValue(SbVec2s &size, int &nc) const
Same as above.
int getNumComponents() const
Returns image's number of components.
const void * getValue(SbVec2i32 &size, int &nc, DataType &dataType) const
SoSFImage(const SoSFImage &obj)
Copy constructor.
void setValue(const SbVec2i32 &size, int nc, DataType dataType, SoBufferObject *bufferObject, CopyPolicy copy=COPY)
void * getSubTexture(int index, SbVec2s &size, SbVec2s &offset, DataType &dataType)
Returns a buffer of a given subTexture set by setSubValue(), setSubValues() or a startEditing()/finis...
unsigned char * startEditing(SbVec2s &size, int &nc)
Same as above.
void finishEditing()
This method (along with startEditing())can be used to efficiently edit the values in an image field.
void setValue(const SbVec2s &size, int nc, DataType dataType, SoBufferObject *bufferObject, CopyPolicy copy=COPY)
int operator!=(const SoSFImage &f) const
Inequality test.
void * startEditing(SbVec2i32 &size, int &nc, DataType &dataType)
void setValue(const SbVec2s &size, int nc, const unsigned char *bytes, CopyPolicy copy=COPY)
Same as above.
void setSubValue(const SbVec2i32 &subSize, const SbVec2i32 &offset, void *data)
SbBool isNeverWrite()
Queries the "neverWrite" flag.
CopyPolicy
SoSFImage may be manipulating some large amounts of memory.
@ 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, SoSFImage will delete.
@ NO_COPY_AND_FREE
Passed buffer used, SoSFImage will free.
DataType
Encoding data type.
@ SIGNED_SHORT
SIGNED_SHORT.
@ UNSIGNED_SHORT
UNSIGNED_SHORT.
@ UNSIGNED_INT32
UNSIGNED_INT32.
@ SIGNED_INT32
SIGNED_INT32.
@ SIGNED_BYTE
SIGNED_BYTE.
@ UNSIGNED_BYTE
UNSIGNED_BYTE.
const unsigned char * getValue(SbVec2i32 &size, int &nc) const
const void * getValue(SbVec2s &size, int &nc, DataType &dataType) const
Returns the pixels in the image as an array of values of type <dataType>.
void setValue(const SbVec2s &size, int nc, 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,...
SbBool hasTransparency() const
Returns TRUE if the image contains any transparent pixels.
unsigned char * getSubTexture(int index, SbVec2s &size, SbVec2s &offset)
Same as above.
void setSubValues(const SbVec2i32 *subSizes, const SbVec2i32 *offsets, int num, unsigned char **subBytes)
void setSubValue(const SbVec2s &subSize, const SbVec2s &offset, unsigned char *bytes)
Same as above.
void setNeverWrite(SbBool neverWrite)
Sets the "neverWrite" flag.
int operator==(const SoSFImage &f) const
Equality test.
void * getSubTexture(int index, SbVec2i32 &size, SbVec2i32 &offset, DataType &dataType)
void setSubValue(const SbVec2i32 &subSize, const SbVec2i32 &offset, unsigned char *bytes)
SbBool hasSubTextures(int &numSubTextures)
Returns TRUE if subTextures have been defined or FALSE if none have been defined.
unsigned char * startEditing(SbVec2i32 &size, int &nc)
void setSubValues(const SbVec2s *subSizes, const SbVec2s *offsets, int num, unsigned char **subBytes)
Same as above.
void setSubValues(const SbVec2i32 *subSizes, const SbVec2i32 *offsets, int num, void **data)
void setSubValue(const SbVec2s &subSize, const SbVec2s &offset, void *data)
This method can be used for subtexturing.
Abstract base class for all single-value fields.