class SG_EXPORT osg::Image

Image class for encapsulating the storage texture image data

Inheritance:


Public Methods

[more] Image()
[more]virtual Object* clone() 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 const unsigned int getModifiedTag() const
Get modified tag value.

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()


Inherited from Object:


Inherited from Referenced:

Public Methods

oinline Referenced& operator = (Referenced&)
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()

ovirtual Object* clone() 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 postive 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 const unsigned int getModifiedTag() const
Get modified tag value.

ovirtual ~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++.