source: OGRE/trunk/ogrenew/Docs/manual/manual_60.html @ 692

Revision 692, 6.0 KB checked in by mattausch, 18 years ago (diff)

adding ogre 1.2 and dependencies

Line 
1<HTML>
2<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
3<!-- Created on , 12 2006 by texi2html 1.64 -->
4<!--
5Written 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.
9Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
10Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
11 
12-->
13<HEAD>
14<TITLE>OGRE Manual v1.2.0 ('Dagon'): Pixel boxes</TITLE>
15
16<META NAME="description" CONTENT="OGRE Manual v1.2.0 ('Dagon'): Pixel boxes">
17<META NAME="keywords" CONTENT="OGRE Manual v1.2.0 ('Dagon'): 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="SEC262"></A>
27<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
28<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_59.html#SEC259"> &lt; </A>]</TD>
29<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_55.html#SEC249"> Up </A>]</TD>
30<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_61.html#SEC263"> &gt; </A>]</TD>
31<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="index.html#SEC_Top">Top</A>]</TD>
32<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
33<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
34<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
35</TR></TABLE>
36<HR SIZE=1>
37<H3> 5.8.5 Pixel boxes </H3>
38<!--docid::SEC262::-->
39<P>
40
41All methods in Ogre that take or return raw image data return a PixelBox object.
42</P><P>
43
44A 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
47Inside 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
50Dimensions 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
53A 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="manual_59.html#SEC259">5.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)
63for 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
69It 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 &#38;def)
88<DD>Return a subvolume of this PixelBox, as a PixelBox.
89</DL>
90<P>
91
92For more information about these methods consult the API documentation.
93</P><P>
94
95<A NAME="External Texture Sources"></A>
96<HR SIZE=1>
97<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
98<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_59.html#SEC259"> &lt; </A>]</TD>
99<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_55.html#SEC249"> Up </A>]</TD>
100<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_61.html#SEC263"> &gt; </A>]</TD>
101<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="index.html#SEC_Top">Top</A>]</TD>
102<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
103<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
104<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
105</TR></TABLE>
106<BR> 
107<FONT SIZE="-1">
108This document was generated
109by <I>Steve Streeting</I> on <I>, 12 2006</I>
110using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
111"><I>texi2html</I></A>
112
113</BODY>
114</HTML>
Note: See TracBrowser for help on using the repository browser.