OGRE  13.6
Object-Oriented Graphics Rendering Engine
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:

Public Member Functions

 Box ()
 Parameterless constructor for setting the members manually. More...
 
template<typename T >
 Box (const TRect< T > &r)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
 Box (const Vector3i &size)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 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...
 
 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...
 
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...
 
Vector3i getOrigin () const
 origin (top, left, front) of the box More...
 
Vector3i getSize () const
 size (width, height, depth) of the 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.

Constructor & Destructor Documentation

◆ Box() [1/5]

Ogre::Box::Box ( )
inline

Parameterless constructor for setting the members manually.

◆ Box() [2/5]

Ogre::Box::Box ( uint32  l,
uint32  t,
uint32  r,
uint32  b 
)
inline

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

Parameters
lx value of left edge
ty value of top edge
rx value of right edge
by value of bottom edge
Note
Note that the left, top, and front edges are included but the right, bottom and back ones are not.

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

◆ Box() [3/5]

template<typename T >
Ogre::Box::Box ( const TRect< T > &  r)
inlineexplicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Box() [4/5]

Ogre::Box::Box ( uint32  l,
uint32  t,
uint32  ff,
uint32  r,
uint32  b,
uint32  bb 
)
inline

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

Parameters
lx value of left edge
ty value of top edge
ffz value of front edge
rx value of right edge
by value of bottom edge
bbz value of back edge
Note
Note that the left, top, and front edges are included but the right, bottom and back ones are not.

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

◆ Box() [5/5]

Ogre::Box::Box ( const Vector3i size)
inlineexplicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Member Function Documentation

◆ contains()

bool Ogre::Box::contains ( const Box def) const
inline

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

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

◆ getWidth()

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

Get the width of this box.

References left, and right.

Referenced by getSize().

◆ getHeight()

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

Get the height of this box.

References bottom, and top.

Referenced by getSize().

◆ getDepth()

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

Get the depth of this box.

References back, and front.

Referenced by getSize().

◆ getOrigin()

Vector3i Ogre::Box::getOrigin ( ) const
inline

origin (top, left, front) of the box

References front, left, and top.

◆ getSize()

Vector3i Ogre::Box::getSize ( ) const
inline

size (width, height, depth) of the box

References getDepth(), getHeight(), and getWidth().

Member Data Documentation

◆ left

uint32 Ogre::Box::left

Referenced by Box(), contains(), getOrigin(), and getWidth().

◆ top

uint32 Ogre::Box::top

Referenced by Box(), contains(), getHeight(), and getOrigin().

◆ right

uint32 Ogre::Box::right

Referenced by Box(), contains(), and getWidth().

◆ bottom

uint32 Ogre::Box::bottom

Referenced by Box(), contains(), and getHeight().

◆ front

uint32 Ogre::Box::front

Referenced by Box(), contains(), getDepth(), and getOrigin().

◆ back

uint32 Ogre::Box::back

Referenced by Box(), contains(), and getDepth().


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