SpikeStream Library  0.2
spikestream::Box Class Reference

#include <Box.h>

List of all members.

Public Member Functions

 Box ()
 Box (float x1, float y1, float z1, float x2, float y2, float z2)
 Box (const Box &box)
Boxoperator= (const Box &rhs)
bool operator== (const Box &rhs)
 ~Box ()
Point3D centre () const
bool contains (const Point3D &point) const
float getX1 () const
float getX2 () const
float getY1 () const
float getY2 () const
float getZ1 () const
float getZ2 () const
float getWidth () const
float getLength () const
float getHeight () const
void expand_percent (float percent)
bool intersects (const Box &box) const
void setCoordinates (float x1, float y1, float z1, float x2, float y2, float z2)
QString toString () const
void translate (float dx, float dy, float dz)

Static Public Member Functions

static Box getEnclosingBox (const QList< Box > &boxList)
static Box getEnclosingBox (const QList< Point3D > &pointList)
static Box getEnclosingBox (const QList< Box > &boxList, const QList< Point3D > &pointList)

Public Attributes

float x1
float y1
float z1
float x2
float y2
float z2

Detailed Description

Holds information about a three dimensional box with a few basic manipulation functions.

Definition at line 14 of file Box.h.


Constructor & Destructor Documentation

Box::Box ( )

Default constructor

Definition at line 8 of file Box.cpp.

Box::Box ( float  x1,
float  y1,
float  z1,
float  x2,
float  y2,
float  z2 
)

Standard constructor

Definition at line 19 of file Box.cpp.

Box::Box ( const Box box)

Copy constructor

Definition at line 30 of file Box.cpp.

Box::~Box ( )

Destructor

Definition at line 41 of file Box.cpp.


Member Function Documentation

Point3D Box::centre ( ) const

Returns the point at the centre of the box .

Definition at line 79 of file Box.cpp.

bool Box::contains ( const Point3D point) const

Returns true if the box contains the point. Points on the border of the box are considered to be within the box.

Definition at line 91 of file Box.cpp.

void Box::expand_percent ( float  percent)

Expands the box by the specified percentage

Definition at line 100 of file Box.cpp.

Box Box::getEnclosingBox ( const QList< Box > &  boxList) [static]

Returns a box enclosing the boxes in the list

Definition at line 120 of file Box.cpp.

Box Box::getEnclosingBox ( const QList< Point3D > &  pointList) [static]

Returns a box enclosing the boxes in the list

Definition at line 150 of file Box.cpp.

Box Box::getEnclosingBox ( const QList< Box > &  boxList,
const QList< Point3D > &  pointList 
) [static]

Returns a box enclosing the boxes and points in the list

Definition at line 181 of file Box.cpp.

float Box::getHeight ( ) const

Returns the height of the box.

Definition at line 212 of file Box.cpp.

float Box::getLength ( ) const

Returns the length of the box

Definition at line 204 of file Box.cpp.

float Box::getWidth ( ) const

Returns the width of the box

Definition at line 196 of file Box.cpp.

float spikestream::Box::getX1 ( ) const [inline]

Definition at line 27 of file Box.h.

float spikestream::Box::getX2 ( ) const [inline]

Definition at line 28 of file Box.h.

float spikestream::Box::getY1 ( ) const [inline]

Definition at line 29 of file Box.h.

float spikestream::Box::getY2 ( ) const [inline]

Definition at line 30 of file Box.h.

float spikestream::Box::getZ1 ( ) const [inline]

Definition at line 31 of file Box.h.

float spikestream::Box::getZ2 ( ) const [inline]

Definition at line 32 of file Box.h.

bool Box::intersects ( const Box box) const

Returns true if there is an overlap between this box and the box in the argument.

Definition at line 220 of file Box.cpp.

Box & Box::operator= ( const Box rhs)

Assignment operator

Definition at line 50 of file Box.cpp.

bool Box::operator== ( const Box rhs)

Equality operator

Definition at line 66 of file Box.cpp.

void Box::setCoordinates ( float  x1,
float  y1,
float  z1,
float  x2,
float  y2,
float  z2 
)

Sets the coordinates of the box

Definition at line 233 of file Box.cpp.

QString Box::toString ( ) const

Returns a string describing the box

Definition at line 255 of file Box.cpp.

void Box::translate ( float  dx,
float  dy,
float  dz 
)

Moves box by the specified distance

Definition at line 244 of file Box.cpp.


Member Data Documentation

Definition at line 42 of file Box.h.

Definition at line 45 of file Box.h.

Definition at line 43 of file Box.h.

Definition at line 46 of file Box.h.

Definition at line 44 of file Box.h.

Definition at line 47 of file Box.h.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Defines