SpherePackingScenarioGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Attributes | Private Types
algorithms::geometries::Channel Class Reference

#include <Channel.h>

List of all members.

Public Types

enum  BOUNDINGBOXBORDER { LEFT = 0, RIGHT = 1, BOTTOM = 2, TOP = 3 }

Public Member Functions

 Channel ()
 Channel (const double &length, const double &width, const double &positionX, const double &positionY, const double &orientation)
 Channel (const double &length, const double &width, const Vector &center, const double &orientation)
void exchangeVertices (unsigned int i, unsigned j, std::vector< tarch::la::Vector< 2, double > > &vertices) const
tarch::la::Vector< 4, double > getBoundingBox () const
Vector getCenter () const
double getCenterPositionX () const
double getCenterPositionY () const
double getLength () const
double getOrientation () const
std::vector< tarch::la::Vector
< 2, double > > 
getSortedVertices ()
std::vector< VectorgetUnsortedVertices ()
double getWidth () const
void setCenter (const Vector &center)
void setOrientation (const double &orientation)
std::vector< tarch::la::Vector
< 2, double > > & 
sortVertices (std::vector< tarch::la::Vector< 2, double > > &vertices) const
std::ostream & toStream (std::ostream &stream)
std::string toString ()
virtual ~Channel ()

Static Public Member Functions

static std::vector
< algorithms::geometries::Channel * > 
getPtrVectorGeometryChannels (std::vector< algorithms::geometries::Channel > &channels)
static
algorithms::geometries::Channel
rotateChannel (algorithms::geometries::Channel &channelToBeRotated, const double &rotationAngle, const double &sinRotationAngle, const double &cosRotationAngle, const tarch::la::Vector< 2, double > &rotationCenter)

Public Attributes

double _cosOrientation
double _sinOrientation

Protected Attributes

Vector _center
double _length
double _orientation
double _width

Private Types

typedef tarch::la::Vector
< 2, double > 
Vector

Member Typedef Documentation

typedef tarch::la::Vector<2,double> algorithms::geometries::Channel::Vector [private]

Member Enumeration Documentation

Enumerator:
LEFT 
RIGHT 
BOTTOM 
TOP 

Constructor & Destructor Documentation

Channel::Channel ( const double &  length,
const double &  width,
const double &  positionX,
const double &  positionY,
const double &  orientation 
)
Channel::Channel ( const double &  length,
const double &  width,
const Vector center,
const double &  orientation 
)
Channel::~Channel ( ) [virtual]

Member Function Documentation

void algorithms::geometries::Channel::exchangeVertices ( unsigned int  i,
unsigned  j,
std::vector< tarch::la::Vector< 2, double > > &  vertices 
) const [inline]
tarch::la::Vector<4,double> algorithms::geometries::Channel::getBoundingBox ( ) const [inline]

Computes and returns 2D bounding box Vector entries 0: Leftmost point 1: Rightmost 2: Lowermost 3: Uppermost

Quadrants: |-------- | 2 | 1 | |-------- | 3 | 4 | |-------|

double algorithms::geometries::Channel::getLength ( ) const [inline]
std::vector<tarch::la::Vector<2, double> > algorithms::geometries::Channel::getSortedVertices ( ) [inline]
double algorithms::geometries::Channel::getWidth ( ) const [inline]
static algorithms::geometries::Channel& algorithms::geometries::Channel::rotateChannel ( algorithms::geometries::Channel channelToBeRotated,
const double &  rotationAngle,
const double &  sinRotationAngle,
const double &  cosRotationAngle,
const tarch::la::Vector< 2, double > &  rotationCenter 
) [inline, static]

Rotates the Point around the offspring

void algorithms::geometries::Channel::setCenter ( const Vector center) [inline]
void algorithms::geometries::Channel::setOrientation ( const double &  orientation) [inline]
std::vector<tarch::la::Vector<2,double> >& algorithms::geometries::Channel::sortVertices ( std::vector< tarch::la::Vector< 2, double > > &  vertices) const [inline]

Sort vertices such that 0: Leftmost point 1: Rightmost 2: Lowest 3: Uppermost

This order is hard-coded in the enum and used here.

Put edge with smallest y-value to position 2 and edge with largest y-value to position 3

std::ostream& algorithms::geometries::Channel::toStream ( std::ostream &  stream) [inline]

Member Data Documentation


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