class SG_EXPORT osg::Image: public Object

Image class for encapsulating the storage texture image data

Inheritance:


Public Methods

[more] Image()
[more]virtual Object* clone() const
[more]virtual bool isSameKindAs(Object* obj)
[more]virtual const char* className() const
[more]const char* getFileName()
[more]void setFileName(const char* fileName)
[more]void setImage(int s, int t, int r, int internalFormat, unsigned int pixelFormat, unsigned int dataType, unsigned char *data, int packing=-1)
set the image data and format.
[more]int s()
Width of image
[more]int t()
Height of image
[more]int r()
Depth of image
[more]int internalFormat()
[more]unsigned int pixelFormat()
[more]unsigned int dataType()
[more]unsigned int packing()
[more]unsigned char* data()
raw image data
[more]void scaleImage(int s, int t, int r)
Scale image to specified size.
[more]void ensureDimensionsArePowerOfTwo()
Ensure image dimensions are a power of two.

Protected Fields

[more]char* _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

Protected Methods

[more]virtual ~Image()
[more]virtual bool readLocalData(Input& fr)
[more]virtual bool writeLocalData(Output& fw)


Inherited from Object:

Public Methods

ovirtual Object* readClone(Input& fr)
ovirtual bool write(Output& fw)


Inherited from Referenced:

Public Methods

oReferenced& operator = (Referenced&)
ovoid ref()
ovoid unref()
oint referenceCount()

Protected Fields

oint _refCount


Documentation

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

ovirtual Object* clone() const

ovirtual bool isSameKindAs(Object* obj)

ovirtual const char* className() const

oconst char* getFileName()

ovoid setFileName(const char* fileName)

ovoid setImage(int s, int t, int r, int internalFormat, unsigned int pixelFormat, unsigned int dataType, unsigned char *data, int packing=-1)
set the image data and format. note, when no 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.

oint s()
Width of image

oint t()
Height of image

oint r()
Depth of image

oint internalFormat()

ounsigned int pixelFormat()

ounsigned int dataType()

ounsigned int packing()

ounsigned char* data()
raw image data

ovoid scaleImage(int s, int t, 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.

ovirtual ~Image()

ovirtual bool readLocalData(Input& fr)

ovirtual bool writeLocalData(Output& fw)

ochar* _fileName

oint _s

oint _t

oint _r

oint _internalFormat

ounsigned int _pixelFormat

ounsigned int _dataType

ounsigned int _packing

ounsigned char* _data


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



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