iso::math::Rectangle< Type > Class Template Reference

template rectangle class More...

#include <iso_math_rectangle.h>

List of all members.

Public Member Functions

 Rectangle (unsigned int pDim)
 create rectangle
 Rectangle (const Vector< Type > &pMinPos, const Vector< Type > &pMaxPos) throw (MathException)
 create rectangle
 Rectangle (const Rectangle< Type > &pRect)
 create rectangle
 ~Rectangle ()
 destructor
const Rectangle< Type > & operator= (const Rectangle< Type > &pRect)
 assignment operator
unsigned int dim () const
 return dimension
const Vector< Type > & minPos () const
 return minimum position
Vector< Type > & minPos ()
 return minimum position
const Vector< Type > & maxPos () const
 return maximum position
Vector< Type > & maxPos ()
 return maximum position
Vector< Type > size () const
 return size
void setMinPos (Type pValue) throw (MathException)
 set minimum position
void setMinPos (const Vector< Type > &pMinPos) throw (MathException)
 set minimum position
void setMinPos (const Type *pValues) throw (MathException)
 set minimum position
void setMaxPos (Type pValue) throw (MathException)
 set maximum position
void setMaxPos (const Vector< Type > &pMaxPos) throw (MathException)
 set maximum position
void setMaxPos (const Type *pValues) throw (MathException)
 set maximum position
void set (const Vector< Type > &pMinPos, const Vector< Type > &pMaxPos) throw (MathException)
 set minimum and maximum positions
void set (const Type *pMinValues, const Type *pMaxValues) throw (MathException)
 set minimum and maximum positions
bool operator== (const Rectangle< Type > &pRect) const
 rect == rect
bool operator!= (const Rectangle< Type > &pRect) const
 vector != vector
base::String info () const
 print vector information

Protected Member Functions

 Rectangle ()

Protected Attributes

unsigned int mDim
Vector< Type > mMinPos
Vector< Type > mMaxPos

Friends

std::ostream & operator<< (std::ostream &pOstream, const Rectangle< Type > &pRect)
 print rectangle information


Detailed Description

template<class Type>
class iso::math::Rectangle< Type >

template rectangle class

class

Created by Daniel Bisig on 5/10/07.


Constructor & Destructor Documentation

template<class Type>
iso::math::Rectangle< Type >::Rectangle ( unsigned int  pDim  ) 

create rectangle

Parameters:
pDim dimension

template<class Type>
iso::math::Rectangle< Type >::Rectangle ( const Vector< Type > &  pMinPos,
const Vector< Type > &  pMaxPos 
) throw (MathException)

create rectangle

Parameters:
pMinPos minimum position
pMaxPos maximum position
Exceptions:
MathException if dimension of minimum and maximum position differs or if maximum position is smaller than minimum position

template<class Type>
iso::math::Rectangle< Type >::Rectangle ( const Rectangle< Type > &  pRect  ) 

create rectangle

Parameters:
pRect rectangle

template<class Type>
iso::math::Rectangle< Type >::~Rectangle (  ) 

destructor

template<class Type>
iso::math::Rectangle< Type >::Rectangle (  )  [protected]


Member Function Documentation

template<class Type>
const Rectangle< Type > & iso::math::Rectangle< Type >::operator= ( const Rectangle< Type > &  pRect  ) 

assignment operator

Parameters:
pRect rectangle
Returns:
rectangle

template<class Type>
unsigned int iso::math::Rectangle< Type >::dim (  )  const

return dimension

Returns:
dimension

template<class Type>
const Vector< Type > & iso::math::Rectangle< Type >::minPos (  )  const

return minimum position

template<class Type>
Vector< Type > & iso::math::Rectangle< Type >::minPos (  ) 

return minimum position

template<class Type>
const Vector< Type > & iso::math::Rectangle< Type >::maxPos (  )  const

return maximum position

template<class Type>
Vector< Type > & iso::math::Rectangle< Type >::maxPos (  ) 

return maximum position

template<class Type>
Vector< Type > iso::math::Rectangle< Type >::size (  )  const

return size

Returns:
size

template<class Type>
void iso::math::Rectangle< Type >::setMinPos ( Type  pValue  )  throw (MathException)

set minimum position

Parameters:
pValue minimum position value
Exceptions:
MathException if position is bigger than maximum position

template<class Type>
void iso::math::Rectangle< Type >::setMinPos ( const Vector< Type > &  pMinPos  )  throw (MathException)

set minimum position

Parameters:
pMinPos minimum position
Exceptions:
MathException if dimension of position is wrong or position is bigger than maximum position

template<class Type>
void iso::math::Rectangle< Type >::setMinPos ( const Type *  pValues  )  throw (MathException)

set minimum position

Parameters:
pValues array of minimum position values
Exceptions:
MathException if position is bigger than maximum position

template<class Type>
void iso::math::Rectangle< Type >::setMaxPos ( Type  pValue  )  throw (MathException)

set maximum position

Parameters:
pValue maximum position value
Exceptions:
MathException if position is smaller than minimum position

template<class Type>
void iso::math::Rectangle< Type >::setMaxPos ( const Vector< Type > &  pMaxPos  )  throw (MathException)

set maximum position

Parameters:
pMaxPos maximum position
Exceptions:
MathException if dimension of position is wrong or position is smaller than minimum position

template<class Type>
void iso::math::Rectangle< Type >::setMaxPos ( const Type *  pValues  )  throw (MathException)

set maximum position

Parameters:
pValues array of maximum position values
Exceptions:
MathException if position is smaller than minimum position

template<class Type>
void iso::math::Rectangle< Type >::set ( const Vector< Type > &  pMinPos,
const Vector< Type > &  pMaxPos 
) throw (MathException)

set minimum and maximum positions

Parameters:
pMinPos minimum position
pMaxPos maximum position
Exceptions:
MathException if dimension of one position is wrong or minimum position is bigger than maximum position

template<class Type>
void iso::math::Rectangle< Type >::set ( const Type *  pMinValues,
const Type *  pMaxValues 
) throw (MathException)

set minimum and maximum positions

Parameters:
pMinValues array of minimum position values
pMaxValues arary of maximum position values
Exceptions:
MathException if minimum position is bigger than maximum position

template<class Type>
bool iso::math::Rectangle< Type >::operator== ( const Rectangle< Type > &  pRect  )  const

rect == rect

Parameters:
pRect rect to compare
Returns:
true if min and max positions of both rect's are equal

template<class Type>
bool iso::math::Rectangle< Type >::operator!= ( const Rectangle< Type > &  pRect  )  const

vector != vector

Parameters:
pRect rect to compare
Returns:
true if min or max positions of both rect's are not equal

template<class Type>
base::String iso::math::Rectangle< Type >::info (  )  const

print vector information


Friends And Related Function Documentation

template<class Type>
std::ostream& operator<< ( std::ostream &  pOstream,
const Rectangle< Type > &  pRect 
) [friend]

print rectangle information

Parameters:
pOstream output stream
pRect rect
Returns:
output stream


Member Data Documentation

template<class Type>
unsigned int iso::math::Rectangle< Type >::mDim [protected]

template<class Type>
Vector<Type> iso::math::Rectangle< Type >::mMinPos [protected]

template<class Type>
Vector<Type> iso::math::Rectangle< Type >::mMaxPos [protected]


The documentation for this class was generated from the following file:
Generated on Fri Feb 25 14:04:07 2011 for iso_math by  doxygen 1.5.1