class SG_EXPORT osg::Image

Image class for encapsulating the storage texture image data

Inheritance:


Public Methods

[more] Image()
[more] Image(const Image& image, const CopyOp& copyop=CopyOp::SHALLOW_COPY)
Copy constructor using CopyOp to manage deep vs shallow copy
[more]virtual Object* cloneType() const
[more]virtual Object* clone(const CopyOp& copyop) const
[more]virtual bool isSameKindAs(const Object* obj) const
[more]virtual const char* className() const
[more]inline const std::string& getFileName() const
[more]void setFileName(const std::string& fileName)
[more]void setImage(const int s, const int t, const int r, const int internalFormat, const unsigned int pixelFormat, const unsigned int dataType, unsigned char* data, const int packing=-1)
set the image data and format.
[more]inline const int s() const
Width of image
[more]inline const int t() const
Height of image
[more]inline const int r() const
Depth of image
[more]inline const int internalFormat() const
[more]inline const unsigned int pixelFormat() const
[more]inline const unsigned int dataType() const
[more]inline const unsigned int packing() const
[more]inline unsigned char* data()
raw image data
[more]inline const unsigned char* data() const
raw const image data
[more]void scaleImage(const int s, const int t, const int r)
Scale image to specified size.
[more]void ensureDimensionsArePowerOfTwo()
Ensure image dimensions are a power of two.
[more]inline void dirty()
Dirty the image, which increments the modified flag, to force osg::Texture to reload the image
[more]inline void setModifiedTag(const unsigned int value)
Set the modified tag value, only used by osg::Texture when using texture subloading.
[more]inline const unsigned int getModifiedTag() const
Get modified tag value, only used by osg::Texture when using texture subloading.

Protected Fields

[more]std::string _fileName
[more]int _s
[more]int _t
[more]int _r
[more]int _internalFormat
[more]unsigned int _pixelFormat
[more]unsigned int _dataType
[more]unsigned int _packing
[more]unsigned char* _data
[more]unsigned int _modifiedTag

Protected Methods

[more]virtual ~Image()
[more]Image& operator = (const Image&)


Inherited from Object:


Inherited from Referenced:

Public Methods

oinline void ref() const
oinline void unref() const
oinline const int referenceCount() const

Protected Fields

omutable int _refCount


Documentation

Image class for encapsulating the storage texture image data
o Image()

o Image(const Image& image, const CopyOp& copyop=CopyOp::SHALLOW_COPY)
Copy constructor using CopyOp to manage deep vs shallow copy

ovirtual Object* cloneType() const

ovirtual Object* clone(const CopyOp& copyop) const

ovirtual bool isSameKindAs(const Object* obj) const

ovirtual const char* className() const

oinline const std::string& getFileName() const

ovoid setFileName(const std::string& fileName)

ovoid setImage(const int s, const int t, const int r, const int internalFormat, const unsigned int pixelFormat, const unsigned int dataType, unsigned char* data, const int packing=-1)
set the image data and format. note, when the packing value is negative (the default is -1) this method assumes a _packing width of 1 if the width is not a multiple of 4, otherwise automatically sets to _packing to 4. If a positive value of packing is supplied than _packing is simply set to that value.

oinline const int s() const
Width of image

oinline const int t() const
Height of image

oinline const int r() const
Depth of image

oinline const int internalFormat() const

oinline const unsigned int pixelFormat() const

oinline const unsigned int dataType() const

oinline const unsigned int packing() const

oinline unsigned char* data()
raw image data

oinline const unsigned char* data() const
raw const image data

ovoid scaleImage(const int s, const int t, const int r)
Scale image to specified size.

ovoid ensureDimensionsArePowerOfTwo()
Ensure image dimensions are a power of two. Mip Mapped texture require the image dimensions to be power of two.

oinline void dirty()
Dirty the image, which increments the modified flag, to force osg::Texture to reload the image

oinline void setModifiedTag(const unsigned int value)
Set the modified tag value, only used by osg::Texture when using texture subloading.

oinline const unsigned int getModifiedTag() const
Get modified tag value, only used by osg::Texture when using texture subloading.

ovirtual ~Image()

oImage& operator = (const Image&)

ostd::string _fileName

oint _s

oint _t

oint _r

oint _internalFormat

ounsigned int _pixelFormat

ounsigned int _dataType

ounsigned int _packing

ounsigned char* _data

ounsigned int _modifiedTag


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.