OpenSceneGraph/doc/doc++/osg/Image.html

275 lines
12 KiB
HTML
Raw Normal View History

2001-09-20 05:19:47 +08:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>class SG_EXPORT osg::Image</TITLE>
<META NAME="GENERATOR" CONTENT="DOC++ 3.4.8">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H2>class SG_EXPORT <A HREF="#DOC.DOCU">osg::Image</A></H2></H2><BLOCKQUOTE>Image class for encapsulating the storage texture image data</BLOCKQUOTE>
<HR>
<H2>Inheritance:</H2>
<APPLET CODE="ClassGraph.class" WIDTH=600 HEIGHT=95>
<param name=classes value="CReferenced,MReferenced.html,CObject,MObject.html,CImage,MImage.html">
<param name=before value="M,M,M">
<param name=after value="Md_SP,Md_,M">
<param name=indent value="0,1,2">
<param name=arrowdir value="down">
</APPLET>
<HR>
<DL>
<P><DL>
<DT><H3>Public Methods</H3><DD><DT>
2001-09-22 10:42:08 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.2.36.1">Image</A></B>()
2001-09-20 05:19:47 +08:00
<DT>
2001-09-22 10:42:08 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual <!1><A HREF="Object.html">Object</A>* <B><A HREF="#DOC.2.36.2">clone</A></B>() const
2001-09-20 05:19:47 +08:00
<DT>
2001-09-22 10:42:08 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual bool <B><A HREF="#DOC.2.36.3">isSameKindAs</A></B>(const <!1><A HREF="Object.html">Object</A>* obj) const
2001-09-20 05:19:47 +08:00
<DT>
2001-09-22 10:42:08 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual const char* <B><A HREF="#DOC.2.36.4">className</A></B>() const
2001-09-20 05:19:47 +08:00
<DT>
2001-09-22 10:42:08 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const std::string&amp; <B><A HREF="#DOC.2.36.5">getFileName</A></B>() const
2001-09-20 05:19:47 +08:00
<DT>
2001-09-22 10:42:08 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.36.6">setFileName</A></B>(const std::string&amp; fileName)
2001-09-20 05:19:47 +08:00
<DT>
2001-09-22 10:42:08 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.36.7">setImage</A></B>(const int <!1><A HREF="Image.html#DOC.2.36.8">s</A>, const int <!1><A HREF="Image.html#DOC.2.36.9">t</A>, const int <!1><A HREF="Image.html#DOC.2.36.10">r</A>, const int <!1><A HREF="Image.html#DOC.2.36.11">internalFormat</A>, const unsigned int <!1><A HREF="Image.html#DOC.2.36.12">pixelFormat</A>, const unsigned int <!1><A HREF="Image.html#DOC.2.36.13">dataType</A>, unsigned char* <!1><A HREF="Image.html#DOC.2.36.15">data</A>, const int <!1><A HREF="Image.html#DOC.2.36.14">packing</A>=-1)
2001-09-20 05:19:47 +08:00
<DD><I>set the image data and format.</I>
<DT>
2001-09-22 10:42:08 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const int <B><A HREF="#DOC.2.36.8">s</A></B>() const
2001-09-20 05:19:47 +08:00
<DD><I>Width of image</I>
<DT>
2001-09-22 10:42:08 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const int <B><A HREF="#DOC.2.36.9">t</A></B>() const
2001-09-20 05:19:47 +08:00
<DD><I>Height of image</I>
<DT>
2001-09-22 10:42:08 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const int <B><A HREF="#DOC.2.36.10">r</A></B>() const
2001-09-20 05:19:47 +08:00
<DD><I>Depth of image</I>
<DT>
2001-09-22 10:42:08 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const int <B><A HREF="#DOC.2.36.11">internalFormat</A></B>() const
2001-09-20 05:19:47 +08:00
<DT>
2001-09-22 10:42:08 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const unsigned int <B><A HREF="#DOC.2.36.12">pixelFormat</A></B>() const
2001-09-20 05:19:47 +08:00
<DT>
2001-09-22 10:42:08 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const unsigned int <B><A HREF="#DOC.2.36.13">dataType</A></B>() const
2001-09-20 05:19:47 +08:00
<DT>
2001-09-22 10:42:08 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const unsigned int <B><A HREF="#DOC.2.36.14">packing</A></B>() const
2001-09-20 05:19:47 +08:00
<DT>
2001-09-22 10:42:08 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline unsigned char* <B><A HREF="#DOC.2.36.15">data</A></B>()
2001-09-20 05:19:47 +08:00
<DD><I>raw image data</I>
<DT>
2001-09-22 10:42:08 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const unsigned char* <B><A HREF="#DOC.2.36.16">data</A></B>() const
2001-09-20 05:19:47 +08:00
<DD><I>raw const image data</I>
<DT>
2001-09-22 10:42:08 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.36.17">scaleImage</A></B>(const int <!1><A HREF="Image.html#DOC.2.36.8">s</A>, const int <!1><A HREF="Image.html#DOC.2.36.9">t</A>, const int <!1><A HREF="Image.html#DOC.2.36.10">r</A>)
2001-09-20 05:19:47 +08:00
<DD><I>Scale image to specified size.</I>
<DT>
2001-09-22 10:42:08 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.36.18">ensureDimensionsArePowerOfTwo</A></B>()
2001-09-20 05:19:47 +08:00
<DD><I>Ensure image dimensions are a power of two.</I>
<DT>
2001-09-22 10:42:08 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const unsigned int <B><A HREF="#DOC.2.36.19">getModifiedTag</A></B>() const
2001-09-20 05:19:47 +08:00
<DD><I>Get modified tag value.</I>
</DL></P>
<P><DL>
<DT><H3>Protected Fields</H3><DD><DT>
2001-09-22 10:42:08 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>std::string <B><A HREF="#DOC.2.36.21">_fileName</A></B>
2001-09-20 05:19:47 +08:00
<DT>
2001-09-22 10:42:08 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.2.36.22">_s</A></B>
2001-09-20 05:19:47 +08:00
<DT>
2001-09-22 10:42:08 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.2.36.23">_t</A></B>
2001-09-20 05:19:47 +08:00
<DT>
2001-09-22 10:42:08 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.2.36.24">_r</A></B>
2001-09-20 05:19:47 +08:00
<DT>
2001-09-22 10:42:08 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.2.36.25">_internalFormat</A></B>
2001-09-20 05:19:47 +08:00
<DT>
2001-09-22 10:42:08 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>unsigned int <B><A HREF="#DOC.2.36.26">_pixelFormat</A></B>
2001-09-20 05:19:47 +08:00
<DT>
2001-09-22 10:42:08 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>unsigned int <B><A HREF="#DOC.2.36.27">_dataType</A></B>
2001-09-20 05:19:47 +08:00
<DT>
2001-09-22 10:42:08 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>unsigned int <B><A HREF="#DOC.2.36.28">_packing</A></B>
2001-09-20 05:19:47 +08:00
<DT>
2001-09-22 10:42:08 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>unsigned char* <B><A HREF="#DOC.2.36.29">_data</A></B>
2001-09-20 05:19:47 +08:00
<DT>
2001-09-22 10:42:08 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>unsigned int <B><A HREF="#DOC.2.36.30">_modifiedTag</A></B>
2001-09-20 05:19:47 +08:00
</DL></P>
<P><DL>
<DT><H3>Protected Methods</H3><DD><DT>
2001-09-22 10:42:08 +08:00
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual <B><A HREF="#DOC.2.36.20">~Image</A></B>()
2001-09-20 05:19:47 +08:00
</DL></P>
</DL>
<HR><H3>Inherited from <A HREF="Object.html">Object</A>:</H3>
<DL>
</DL>
<HR><H3>Inherited from <A HREF="Referenced.html">Referenced</A>:</H3>
<DL>
<P><DL>
<DT><H3>Public Methods</H3><DD><DT>
<IMG ALT="o" SRC=icon2.gif>inline <!1><A HREF="Referenced.html">Referenced</A>&amp; <B>operator = </B>(<!1><A HREF="Referenced.html">Referenced</A>&amp;)
<DT>
<IMG ALT="o" SRC=icon2.gif>inline void <B>ref</B>() const
<DT>
<IMG ALT="o" SRC=icon2.gif>inline void <B>unref</B>() const
<DT>
<IMG ALT="o" SRC=icon2.gif>inline const int <B>referenceCount</B>() const
</DL></P>
<P><DL>
<DT><H3>Protected Fields</H3><DD><DT>
<IMG ALT="o" SRC=icon2.gif>mutable int <B>_refCount</B>
</DL></P>
</DL>
<A NAME="DOC.DOCU"></A>
<HR>
<H2>Documentation</H2>
<BLOCKQUOTE>Image class for encapsulating the storage texture image data</BLOCKQUOTE>
<DL>
<A NAME="Image"></A>
2001-09-22 10:42:08 +08:00
<A NAME="DOC.2.36.1"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> Image()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="clone"></A>
2001-09-22 10:42:08 +08:00
<A NAME="DOC.2.36.2"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual <!1><A HREF="Object.html">Object</A>* clone() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="isSameKindAs"></A>
2001-09-22 10:42:08 +08:00
<A NAME="DOC.2.36.3"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual bool isSameKindAs(const <!1><A HREF="Object.html">Object</A>* obj) const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="className"></A>
2001-09-22 10:42:08 +08:00
<A NAME="DOC.2.36.4"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual const char* className() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="getFileName"></A>
2001-09-22 10:42:08 +08:00
<A NAME="DOC.2.36.5"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const std::string&amp; getFileName() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="setFileName"></A>
2001-09-22 10:42:08 +08:00
<A NAME="DOC.2.36.6"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void setFileName(const std::string&amp; fileName)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="setImage"></A>
2001-09-22 10:42:08 +08:00
<A NAME="DOC.2.36.7"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void setImage(const int <!1><A HREF="Image.html#DOC.2.36.8">s</A>, const int <!1><A HREF="Image.html#DOC.2.36.9">t</A>, const int <!1><A HREF="Image.html#DOC.2.36.10">r</A>, const int <!1><A HREF="Image.html#DOC.2.36.11">internalFormat</A>, const unsigned int <!1><A HREF="Image.html#DOC.2.36.12">pixelFormat</A>, const unsigned int <!1><A HREF="Image.html#DOC.2.36.13">dataType</A>, unsigned char* <!1><A HREF="Image.html#DOC.2.36.15">data</A>, const int <!1><A HREF="Image.html#DOC.2.36.14">packing</A>=-1)</B></TT>
2001-09-20 05:19:47 +08:00
<DD>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.
<DL><DT><DD></DL><P>
<A NAME="s"></A>
2001-09-22 10:42:08 +08:00
<A NAME="DOC.2.36.8"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const int s() const </B></TT>
<DD>Width of image
<DL><DT><DD></DL><P>
<A NAME="t"></A>
2001-09-22 10:42:08 +08:00
<A NAME="DOC.2.36.9"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const int t() const </B></TT>
<DD>Height of image
<DL><DT><DD></DL><P>
<A NAME="r"></A>
2001-09-22 10:42:08 +08:00
<A NAME="DOC.2.36.10"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const int r() const </B></TT>
<DD>Depth of image
<DL><DT><DD></DL><P>
<A NAME="internalFormat"></A>
2001-09-22 10:42:08 +08:00
<A NAME="DOC.2.36.11"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const int internalFormat() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="pixelFormat"></A>
2001-09-22 10:42:08 +08:00
<A NAME="DOC.2.36.12"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const unsigned int pixelFormat() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="dataType"></A>
2001-09-22 10:42:08 +08:00
<A NAME="DOC.2.36.13"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const unsigned int dataType() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="packing"></A>
2001-09-22 10:42:08 +08:00
<A NAME="DOC.2.36.14"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const unsigned int packing() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="data"></A>
2001-09-22 10:42:08 +08:00
<A NAME="DOC.2.36.15"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline unsigned char* data()</B></TT>
<DD>raw image data
<DL><DT><DD></DL><P>
<A NAME="data"></A>
2001-09-22 10:42:08 +08:00
<A NAME="DOC.2.36.16"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const unsigned char* data() const </B></TT>
<DD>raw const image data
<DL><DT><DD></DL><P>
<A NAME="scaleImage"></A>
2001-09-22 10:42:08 +08:00
<A NAME="DOC.2.36.17"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void scaleImage(const int <!1><A HREF="Image.html#DOC.2.36.8">s</A>, const int <!1><A HREF="Image.html#DOC.2.36.9">t</A>, const int <!1><A HREF="Image.html#DOC.2.36.10">r</A>)</B></TT>
2001-09-20 05:19:47 +08:00
<DD>Scale image to specified size.
<DL><DT><DD></DL><P>
<A NAME="ensureDimensionsArePowerOfTwo"></A>
2001-09-22 10:42:08 +08:00
<A NAME="DOC.2.36.18"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void ensureDimensionsArePowerOfTwo()</B></TT>
<DD>Ensure image dimensions are a power of two.
Mip Mapped texture require the image dimensions to be
power of two.
<DL><DT><DD></DL><P>
<A NAME="getModifiedTag"></A>
2001-09-22 10:42:08 +08:00
<A NAME="DOC.2.36.19"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const unsigned int getModifiedTag() const </B></TT>
<DD>Get modified tag value.
<DL><DT><DD></DL><P>
<A NAME="~Image"></A>
2001-09-22 10:42:08 +08:00
<A NAME="DOC.2.36.20"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual ~Image()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="_fileName"></A>
2001-09-22 10:42:08 +08:00
<A NAME="DOC.2.36.21"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>std::string _fileName</B></TT>
<DL><DT><DD></DL><P>
<A NAME="_s"></A>
2001-09-22 10:42:08 +08:00
<A NAME="DOC.2.36.22"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>int _s</B></TT>
<DL><DT><DD></DL><P>
<A NAME="_t"></A>
2001-09-22 10:42:08 +08:00
<A NAME="DOC.2.36.23"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>int _t</B></TT>
<DL><DT><DD></DL><P>
<A NAME="_r"></A>
2001-09-22 10:42:08 +08:00
<A NAME="DOC.2.36.24"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>int _r</B></TT>
<DL><DT><DD></DL><P>
<A NAME="_internalFormat"></A>
2001-09-22 10:42:08 +08:00
<A NAME="DOC.2.36.25"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>int _internalFormat</B></TT>
<DL><DT><DD></DL><P>
<A NAME="_pixelFormat"></A>
2001-09-22 10:42:08 +08:00
<A NAME="DOC.2.36.26"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>unsigned int _pixelFormat</B></TT>
<DL><DT><DD></DL><P>
<A NAME="_dataType"></A>
2001-09-22 10:42:08 +08:00
<A NAME="DOC.2.36.27"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>unsigned int _dataType</B></TT>
<DL><DT><DD></DL><P>
<A NAME="_packing"></A>
2001-09-22 10:42:08 +08:00
<A NAME="DOC.2.36.28"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>unsigned int _packing</B></TT>
<DL><DT><DD></DL><P>
<A NAME="_data"></A>
2001-09-22 10:42:08 +08:00
<A NAME="DOC.2.36.29"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>unsigned char* _data</B></TT>
<DL><DT><DD></DL><P>
<A NAME="_modifiedTag"></A>
2001-09-22 10:42:08 +08:00
<A NAME="DOC.2.36.30"></A>
2001-09-20 05:19:47 +08:00
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>unsigned int _modifiedTag</B></TT>
<DL><DT><DD></DL><P></DL>
<HR><DL><DT><B>This class has no child classes.</B></DL>
<DL><DT><DD></DL><P><P><I><A HREF="index.html">Alphabetic index</A></I> <I><A HREF="HIER.html">HTML hierarchy of classes</A> or <A HREF="HIERjava.html">Java</A></I></P><HR>
<BR>
This page was generated with the help of <A HREF="http://docpp.sourceforge.net">DOC++</A>.
</BODY>
</HTML>