Source

ogre / Docs / vbo-update / vbo-update_22.html

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
<!-- Created on May, 26 2012 by texi2html 1.70 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
            Karl Berry  <karl@freefriends.org>
            Olaf Bachmann <obachman@mathematik.uni-kl.de>
            and many others.
Maintained by: Many creative people <dev@texi2html.cvshome.org>
Send bugs and suggestions to <users@texi2html.cvshome.org>

-->
<head>
<title>Geometry Changes In OGRE 0.12: 2.8.5 Pixel boxes</title>

<meta name="description" content="Geometry Changes In OGRE 0.12: 2.8.5 Pixel boxes">
<meta name="keywords" content="Geometry Changes In OGRE 0.12: 2.8.5 Pixel boxes">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="texi2html 1.70">
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
pre.display {font-family: serif}
pre.format {font-family: serif}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: serif; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: serif; font-size: smaller}
pre.smalllisp {font-size: smaller}
ul.toc {list-style: none}
body {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; color: black; background-color: white}
a:link {  color: #003300; text-decoration: underline}
a:hover {  color: #F5BC52; text-decoration: underline}
a:visited {  color: #004400; text-decoration: underline}
li {  color: #003300; list-style-type: diamond; position: relative; left: -15px; clip:    rect(   )}
td {  font-size: 10pt}
th {  font-size: 10pt}

.MainHeader {  font-weight: bold; color: #F5BC52; background-color: #006600; font-size: 10pt}
.BorderHeader {  background-color: #999900; font-size: 8pt; font-weight: bold; color: #F5BC52; text-align: center} 	  
.MainContent { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; color: #CCFFCC } 	 
.BorderContent {  font-size: 8pt; color: #66CC33; border-color: black #666600 #666600; 
                  padding-top: 2px; padding-right: 2px; padding-bottom: 10px; padding-left: 2px;
                  margin-bottom: 2px; border-style: solid; 
                  border-top-width: 0px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px}
.NewsDate {  color: #CCFFCC; font-weight: bold}
.Annotation {  font-size: 10px}

H1, H2, H3 {
        background-color: #6b7d6b;
	color: white;
	padding: 2px;
	padding-left: 5px;
	border-style: solid;
	border-width: 1px;
	border-color: black;
}

H1 {
	text-align: center; 
}
H2 {
}
H3 {
    FONT-FAMILY: trebuchet ms,helvetica,arial;
}
pre {
	background-color: #eeffee;
	color: black;
	padding: 5px;
}
td.example {
	border-style: solid;
	border-width: 1px;
	border-color: black;
}
dt { color: #3D653D; font-weight: bold;}

A.qindex {} 	 
A.qindexRef {} 	 
A.el { text-decoration: none; font-weight: bold } 	 
A.elRef { font-weight: bold } 	 
A.code { text-decoration: none; font-weight: normal; color: Blue } 	 
A:visited.code { text-decoration: none; font-weight: normal; color: Navy } 	 
A:hover.code { text-decoration: underline; font-weight: normal; color: Blue } 	 
A.codeRef { font-weight: normal; color: #4444ee } 	 
DL.el { margin-left: -1cm } 	 
DIV.fragment { width: 100%; border: none; background-color: #003300 } 	 
DIV.ah { color: white; background-color: black; margin-bottom: 3; margin-top: 3 } 	 
DIV.groupHeader { margin-left: 16; margin-top: 12; margin-bottom: 6; font-weight: bold } 	 
DIV.groupText { margin-left: 16; font-style: italic; font-size: smaller } 	 
FONT.keyword       { color: #008000 } 	 
FONT.keywordtype   { color: #999920 } 	 
FONT.keywordflow   { color: #e0FF00 } 	 
FONT.comment       { color: #009900 } 	 
FONT.preprocessor  { color: #809020 } 	 
FONT.stringliteral { color: #002080 } 	 
FONT.charliteral   { color: #008080 }
.ex { 	 
     FONT-SIZE: 8pt; FONT-FAMILY: tahoma
}
CODE.keywordtype { 	 
     COLOR: #00ccff 	 
} 	 
CODE.keyword { 	 
     FONT-WEIGHT: bold; COLOR: #00ccff 	 
} 	 
CODE.fn { 	 
     COLOR: white; 	 
     FONT-WEIGHT: bold; 	 
} 	 
CODE.var { 	 
     COLOR: #dcdcdc; 	 
} 	 
CODE.macro { 	 
     COLOR: #809020; 	 
     FONT-WEIGHT: bold; 	 
 } 	 
CODE.comm { 	 
     COLOR: lime 	 
 }

CODE.num {
	COLOR: purple
	}
CODE.str {
	COLOR: #ffcc33;
	font-style: italic
}
/* Used for rendering members in API specification */

.mdTable
{
	background-color: #eeffee;
	color: #ED9C08;
        width: 100%;
	border-top-style: solid;
	border-top-color: black;
	border-top-width: 1px;
}

.md
{
	font-size: 12pt;
	font-weight: bold;
	color: 
}
.md A.el {
	color: #F5BC52;
}
.md A:link.el {
	color: #007700;
}
.md A:hover.el {
	color: #F5BC52;
}
.md A:visited.el {
	color: #229922;
}


.mdname1, .mdname
{
   font-size: 12pt;
   font-weight: normal;
   font-style: italic;
}

/* There's no class on the graph images in the API docs, but they're
all centered.  TODO: get doxygen to give them a class.  (This won't 
look terrible on any image, though, really.) */
center img {
	border-style: solid;
	border-width: 1px;
	border-color: #AACCAA;
}

.memItemLeft
{
	background-color: #eeffee;
}
.memItemRight
{
	background-color: #eeffee;
}


HR { height: 1px; }

-->
</style>


</head>

<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">

<a name="NOD22"></a>
<a name="SEC35"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="vbo-update_21.html#SEC32" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[ &gt; ]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="vbo-update_3.html#SEC3" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="vbo-update_17.html#SEC22" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[ &gt;&gt; ]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="index.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="vbo-update_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<hr size="1">
<h3 class="subsection"> 2.8.5 Pixel boxes </h3>

<p>All methods in Ogre that take or return raw image data return a PixelBox object.

</p><p>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.

</p><p>Inside the memory pointed to by the <em>data</em> member of a pixel box, pixels are stored as a succession of &quot;depth&quot; slices (in Z), each containing &quot;height&quot; rows (Y) of &quot;width&quot; pixels (X).

</p><p>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).

</p><p>A PixelBox has the following members:
</p><dl compact="compact">
<dt> data</dt>
<dd><p>The pointer to the first component of the image data in memory.
</p></dd>
<dt> format</dt>
<dd><p>The pixel format (See section <a href="vbo-update_21.html#SEC32">Pixel Formats</a>) of the image data.
</p></dd>
<dt> rowPitch</dt>
<dd><p>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.
</p></dd>
<dt> slicePitch</dt>
<dd><p>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)
for compressed formats.
</p></dd>
<dt> left, top, right, bottom, front, back</dt>
<dd><p>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>.
</p></dd>
</dl>

<p>It also has some useful methods:
</p><dl compact="compact">
<dt> getWidth()</dt>
<dd><p>Get the width of this box
</p></dd>
<dt> getHeight()</dt>
<dd><p>Get the height of this box. This is 1 for one dimensional images.
</p></dd>
<dt> getDepth()</dt>
<dd><p>Get the depth of this box. This is 1 for one and two dimensional images.
</p></dd>
<dt> setConsecutive()</dt>
<dd><p>Set the rowPitch and slicePitch so that the buffer is laid out consecutive in memory.
</p></dd>
<dt> getRowSkip()</dt>
<dd><p>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.
</p></dd>
<dt> getSliceSkip()</dt>
<dd><p>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.
</p></dd>
<dt> isConsecutive()</dt>
<dd><p>Return whether this buffer is laid out consecutive in memory (i.e. the pitches are equal to the dimensions)
</p></dd>
<dt> getConsecutiveSize()</dt>
<dd><p>Return the size (in bytes) this image would take if it was laid out consecutive in memory
</p></dd>
<dt> getSubVolume(const Box &amp;def)</dt>
<dd><p>Return a subvolume of this PixelBox, as a PixelBox.
</p></dd>
</dl>

<p>For more information about these methods consult the API documentation.

</p>

<hr size="1">
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="vbo-update_21.html#SEC32" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[ &gt; ]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="vbo-update_3.html#SEC3" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="vbo-update_17.html#SEC22" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[ &gt;&gt; ]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="index.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="vbo-update_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<p>
 <font size="-1">
  This document was generated by <em>David Rogers</em> on <em>May, 26 2012</em> using <a href="http://texi2html.cvshome.org/"><em>texi2html 1.70</em></a>.
 </font>
 <br>

</p>
</body>
</html>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.