OGRE: Ogre::Box Struct Reference - OGRE Documentation

# Ogre::Box Struct Reference

Structure used to define a box in a 3-D integer space. More...

`#include <OgreCommon.h>`

Inheritance diagram for Ogre::Box:

[legend]

List of all members.

## Public Member Functions
| Box ()
| Parameterless constructor for setting the members manually.
| Box (size_t l, size_t t, size_t r, size_t b)
| Define a box from left, top, right and bottom coordinates This box will have depth one (front=0 and back=1).
| Box (size_t l, size_t t, size_t ff, size_t r, size_t b, size_t bb)
| Define a box from left, top, front, right, bottom and back coordinates.
bool | contains (const Box &def) const
| Return true if the other box is a part of this one.
size_t | getWidth () const
| Get the width of this box.
size_t | getHeight () const
| Get the height of this box.
size_t | getDepth () const
| Get the depth of this box.
## Public Attributes
size_t | left
size_t | top
size_t | right
size_t | bottom
size_t | front
size_t | back

## Detailed Description

Structure used to define a box in a 3-D integer space.

Note that the left, top, and front edges are included but the right, bottom and back ones are not.

Definition at line 349 of file OgreCommon.h.

## Constructor & Destructor Documentation

Ogre::Box::Box | ( |  | ) |

Parameterless constructor for setting the members manually.

Definition at line 353 of file OgreCommon.h.

Ogre::Box::Box | ( | size_t | l,
|  | size_t | t,
|  | size_t | r,
|  | size_t | b |
| ) |  |  |

Define a box from left, top, right and bottom coordinates This box will have depth one (front=0 and back=1).

Parameters:

  | l | x value of left edge
  | t | y value of top edge
  | r | x value of right edge
  | b | y value of bottom edge

Note:
  Note that the left, top, and front edges are included but the right, bottom and back ones are not.

Definition at line 366 of file OgreCommon.h.

References back, bottom, front, left, right, and top.

Ogre::Box::Box | ( | size_t | l,
|  | size_t | t,
|  | size_t | ff,
|  | size_t | r,
|  | size_t | b,
|  | size_t | bb |
| ) |  |  |

Define a box from left, top, front, right, bottom and back coordinates.

Parameters:

  | l | x value of left edge
  | t | y value of top edge
  | ff | z value of front edge
  | r | x value of right edge
  | b | y value of bottom edge
  | bb | z value of back edge

Note:
  Note that the left, top, and front edges are included but the right, bottom and back ones are not.

Definition at line 387 of file OgreCommon.h.

References back, bottom, front, left, right, and top.

## Member Function Documentation

bool Ogre::Box::contains | ( | const Box & | def | ) | const

Return true if the other box is a part of this one.

Definition at line 399 of file OgreCommon.h.

References back, bottom, front, left, right, and top.

size_t Ogre::Box::getWidth | ( |  | ) | const

Get the width of this box.

Definition at line 406 of file OgreCommon.h.

References left, and right.

Referenced by Ogre::LinearResampler_Byte< channels >::scale(), Ogre::LinearResampler_Float32::scale(), Ogre::LinearResampler::scale(), and Ogre::NearestResampler< elemsize >::scale().

size_t Ogre::Box::getHeight | ( |  | ) | const

Get the height of this box.

Definition at line 408 of file OgreCommon.h.

References bottom, and top.

Referenced by Ogre::LinearResampler_Byte< channels >::scale(), Ogre::LinearResampler_Float32::scale(), Ogre::LinearResampler::scale(), and Ogre::NearestResampler< elemsize >::scale().

size_t Ogre::Box::getDepth | ( |  | ) | const

Get the depth of this box.

Definition at line 410 of file OgreCommon.h.

References back, and front.

Referenced by Ogre::LinearResampler_Byte< channels >::scale(), Ogre::LinearResampler_Float32::scale(), Ogre::LinearResampler::scale(), and Ogre::NearestResampler< elemsize >::scale().

## Member Data Documentation

size_t Ogre::Box::left

Definition at line 351 of file OgreCommon.h.

Referenced by Box(), contains(), getWidth(), Ogre::LinearResampler_Byte< channels >::scale(), Ogre::LinearResampler_Float32::scale(), Ogre::LinearResampler::scale(), and Ogre::NearestResampler< elemsize >::scale().

size_t Ogre::Box::top

Definition at line 351 of file OgreCommon.h.

Referenced by Box(), contains(), getHeight(), Ogre::LinearResampler_Byte< channels >::scale(), Ogre::LinearResampler_Float32::scale(), Ogre::LinearResampler::scale(), and Ogre::NearestResampler< elemsize >::scale().

size_t Ogre::Box::right

Definition at line 351 of file OgreCommon.h.

Referenced by Box(), contains(), getWidth(), Ogre::LinearResampler_Byte< channels >::scale(), Ogre::LinearResampler_Float32::scale(), Ogre::LinearResampler::scale(), and Ogre::NearestResampler< elemsize >::scale().

size_t Ogre::Box::bottom

Definition at line 351 of file OgreCommon.h.

Referenced by Box(), contains(), getHeight(), Ogre::LinearResampler_Byte< channels >::scale(), Ogre::LinearResampler_Float32::scale(), Ogre::LinearResampler::scale(), and Ogre::NearestResampler< elemsize >::scale().

size_t Ogre::Box::front

Definition at line 351 of file OgreCommon.h.

Referenced by Box(), contains(), getDepth(), Ogre::LinearResampler_Float32::scale(), Ogre::LinearResampler::scale(), and Ogre::NearestResampler< elemsize >::scale().

size_t Ogre::Box::back

Definition at line 351 of file OgreCommon.h.

Referenced by Box(), contains(), getDepth(), Ogre::LinearResampler_Float32::scale(), Ogre::LinearResampler::scale(), and Ogre::NearestResampler< elemsize >::scale().

The documentation for this struct was generated from the following file:

- OgreCommon.h

Copyright © 2008 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Jul 26 11:32:55 2009