[692] | 1 | <HTML> |
---|
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
---|
| 3 | <!-- Created on , 12 2006 by texi2html 1.64 --> |
---|
| 4 | <!-- |
---|
| 5 | Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author) |
---|
| 6 | Karl Berry <karl@freefriends.org> |
---|
| 7 | Olaf Bachmann <obachman@mathematik.uni-kl.de> |
---|
| 8 | and many others. |
---|
| 9 | Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de> |
---|
| 10 | Send bugs and suggestions to <texi2html@mathematik.uni-kl.de> |
---|
| 11 | |
---|
| 12 | --> |
---|
| 13 | <HEAD> |
---|
| 14 | <TITLE>Hardware Buffers In OGRE: Pixel boxes</TITLE> |
---|
| 15 | |
---|
| 16 | <META NAME="description" CONTENT="Hardware Buffers In OGRE: Pixel boxes"> |
---|
| 17 | <META NAME="keywords" CONTENT="Hardware Buffers In OGRE: Pixel boxes"> |
---|
| 18 | <META NAME="resource-type" CONTENT="document"> |
---|
| 19 | <META NAME="distribution" CONTENT="global"> |
---|
| 20 | <META NAME="Generator" CONTENT="texi2html 1.64"> |
---|
| 21 | <LINK TYPE="text/css" rel="stylesheet" href="../style.css"> |
---|
| 22 | </HEAD> |
---|
| 23 | |
---|
| 24 | <BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000"> |
---|
| 25 | |
---|
| 26 | <A NAME="SEC35"></A> |
---|
| 27 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> |
---|
| 28 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="vbo-update_21.html#SEC32"> < </A>]</TD> |
---|
| 29 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="vbo-update_17.html#SEC22"> Up </A>]</TD> |
---|
| 30 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ > ]</TD> |
---|
| 31 | <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="index.html#SEC_Top">Top</A>]</TD> |
---|
| 32 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="vbo-update_toc.html#SEC_Contents">Contents</A>]</TD> |
---|
| 33 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD> |
---|
| 34 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="vbo-update_abt.html#SEC_About"> ? </A>]</TD> |
---|
| 35 | </TR></TABLE> |
---|
| 36 | <HR SIZE=1> |
---|
| 37 | <H3> 2.8.5 Pixel boxes </H3> |
---|
| 38 | <!--docid::SEC35::--> |
---|
| 39 | <P> |
---|
| 40 | |
---|
| 41 | All methods in Ogre that take or return raw image data return a PixelBox object. |
---|
| 42 | </P><P> |
---|
| 43 | |
---|
| 44 | A PixelBox is a primitive describing a volume (3D), image (2D) or line (1D) of pixels in CPU memory. It describes the location and data format of a region of memory used for image data, but does not do any memory management in itself. |
---|
| 45 | </P><P> |
---|
| 46 | |
---|
| 47 | Inside the memory pointed to by the <EM>data</EM> member of a pixel box, pixels are stored as a succession of "depth" slices (in Z), each containing "height" rows (Y) of "width" pixels (X). |
---|
| 48 | </P><P> |
---|
| 49 | |
---|
| 50 | Dimensions that are not used must be 1. For example, a one dimensional image will have extents (width,1,1). A two dimensional image has extents (width,height,1). |
---|
| 51 | </P><P> |
---|
| 52 | |
---|
| 53 | A PixelBox has the following members: |
---|
| 54 | <DL COMPACT> |
---|
| 55 | <DT>data |
---|
| 56 | <DD>The pointer to the first component of the image data in memory. |
---|
| 57 | <DT>format |
---|
| 58 | <DD>The pixel format (See section <A HREF="vbo-update_21.html#SEC32">2.8.4 Pixel Formats</A>) of the image data. |
---|
| 59 | <DT>rowPitch |
---|
| 60 | <DD>The number of elements between the leftmost pixel of one row and the left pixel of the next. This value must always be equal to getWidth() (consecutive) for compressed formats. |
---|
| 61 | <DT>slicePitch |
---|
| 62 | <DD>The number of elements between the top left pixel of one (depth) slice and the top left pixel of the next. Must be a multiple of rowPitch. This value must always be equal to getWidth()*getHeight() (consecutive) |
---|
| 63 | for compressed formats. |
---|
| 64 | <DT>left, top, right, bottom, front, back |
---|
| 65 | <DD>Extents of the box in three dimensional integer space. Note that the left, top, and front edges are included but the right, bottom and top ones are not. <EM>left</EM> must always be smaller or equal to <EM>right</EM>, <EM>top</EM> must always be smaller or equal to <EM>bottom</EM>, and <EM>front</EM> must always be smaller or equal to <EM>back</EM>. |
---|
| 66 | </DL> |
---|
| 67 | <P> |
---|
| 68 | |
---|
| 69 | It also has some useful methods: |
---|
| 70 | <DL COMPACT> |
---|
| 71 | <DT>getWidth() |
---|
| 72 | <DD>Get the width of this box |
---|
| 73 | <DT>getHeight() |
---|
| 74 | <DD>Get the height of this box. This is 1 for one dimensional images. |
---|
| 75 | <DT>getDepth() |
---|
| 76 | <DD>Get the depth of this box. This is 1 for one and two dimensional images. |
---|
| 77 | <DT>setConsecutive() |
---|
| 78 | <DD>Set the rowPitch and slicePitch so that the buffer is laid out consecutive in memory. |
---|
| 79 | <DT>getRowSkip() |
---|
| 80 | <DD>Get the number of elements between one past the rightmost pixel of one row and the leftmost pixel of the next row. This is zero if rows are consecutive. |
---|
| 81 | <DT>getSliceSkip() |
---|
| 82 | <DD>Get the number of elements between one past the right bottom pixel of one slice and the left top pixel of the next slice. This is zero if slices are consecutive. |
---|
| 83 | <DT>isConsecutive() |
---|
| 84 | <DD>Return whether this buffer is laid out consecutive in memory (ie the pitches are equal to the dimensions) |
---|
| 85 | <DT>getConsecutiveSize() |
---|
| 86 | <DD>Return the size (in bytes) this image would take if it was laid out consecutive in memory |
---|
| 87 | <DT>getSubVolume(const Box &def) |
---|
| 88 | <DD>Return a subvolume of this PixelBox, as a PixelBox. |
---|
| 89 | </DL> |
---|
| 90 | <P> |
---|
| 91 | |
---|
| 92 | For more information about these methods consult the API documentation. |
---|
| 93 | </P><P> |
---|
| 94 | |
---|
| 95 | <HR SIZE=1> |
---|
| 96 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> |
---|
| 97 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="vbo-update_21.html#SEC32"> < </A>]</TD> |
---|
| 98 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="vbo-update_17.html#SEC22"> Up </A>]</TD> |
---|
| 99 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[ > ]</TD> |
---|
| 100 | <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="index.html#SEC_Top">Top</A>]</TD> |
---|
| 101 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="vbo-update_toc.html#SEC_Contents">Contents</A>]</TD> |
---|
| 102 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD> |
---|
| 103 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="vbo-update_abt.html#SEC_About"> ? </A>]</TD> |
---|
| 104 | </TR></TABLE> |
---|
| 105 | <BR> |
---|
| 106 | <FONT SIZE="-1"> |
---|
| 107 | This document was generated |
---|
| 108 | by <I>Steve Streeting</I> on <I>, 12 2006</I> |
---|
| 109 | using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html |
---|
| 110 | "><I>texi2html</I></A> |
---|
| 111 | |
---|
| 112 | </BODY> |
---|
| 113 | </HTML> |
---|