Ogre::Box Struct Reference
Core » General

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

`#include <OgreCommon.h>`

Inheritance diagram for Ogre::Box:
[legend]

## Public Member Functions

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

## Public Attributes

uint32 | back
uint32 | bottom
uint32 | front
uint32 | left
uint32 | right
uint32 | top

## 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 659 of file OgreCommon.h.

## Constructor & Destructor Documentation

## Box() [1/3]

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

Parameterless constructor for setting the members manually.

Definition at line 663 of file OgreCommon.h.

## Box() [2/3]

Ogre::Box::Box | ( | uint32 | l,
|  | uint32 | t,
|  | uint32 | r,
|  | uint32 | 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 676 of file OgreCommon.h.

## Box() [3/3]

Ogre::Box::Box | ( | uint32 | l,
|  | uint32 | t,
|  | uint32 | ff,
|  | uint32 | r,
|  | uint32 | b,
|  | uint32 | 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 697 of file OgreCommon.h.

## Member Function Documentation

## contains()

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

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

Definition at line 709 of file OgreCommon.h.

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

## getDepth()

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

Get the depth of this box.

Definition at line 720 of file OgreCommon.h.

References _OgreExport, Ogre::findCommandLineOpts(), and Ogre::HashedVector< T >::front().

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

## getHeight()

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

Get the height of this box.

Definition at line 718 of file OgreCommon.h.

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

## getWidth()

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

Get the width of this box.

Definition at line 716 of file OgreCommon.h.

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

## Member Data Documentation

## back

uint32 Ogre::Box::back

Definition at line 661 of file OgreCommon.h.

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

## bottom

uint32 Ogre::Box::bottom

Definition at line 661 of file OgreCommon.h.

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

## front

uint32 Ogre::Box::front

Definition at line 661 of file OgreCommon.h.

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

## left

uint32 Ogre::Box::left

Definition at line 661 of file OgreCommon.h.

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

## right

uint32 Ogre::Box::right

Definition at line 661 of file OgreCommon.h.

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

## top

uint32 Ogre::Box::top

Definition at line 661 of file OgreCommon.h.

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

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

- OgreCommon.h

Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.