3dpcp/.svn/pristine/4f/4f62740a6597ec57c04b055b3478477d9e1e0614.svn-base
2012-09-16 14:33:11 +02:00

62 lines
1.2 KiB
Text

#ifndef __LINE_H_
#define __LINE_H_
#include "grid/gridPoint.h"
/**
* Class represents a line object starting at the gridPoint "start"
* and ending at the gridPoint "end"
*
* @author Sebastian Stock, Uwe Hebbelmann, Andre Schemschat
* @date 25.02.2008
*/
class line
{
private:
/** The starting point of the line */
gridPoint* start;
/** The ending point of the line */
gridPoint* end;
public:
/** @brief CTor */
line(gridPoint* start, gridPoint* end);
/** @brief Returns the length of the line */
double getLength();
/**
* Getter for the start x-coordinate
* @return the start x-coordinate
*/
inline long getStartX() const{
return start->getX();
}
/**
* Getter for the start z-coordinate
* @return the start z-coordinate
*/
inline long getStartZ() const{
return start->getZ();
}
/**
* Getter for the end x-coordinate
* @return the end x-coordinate
*/
inline long getEndX() const{
return end->getX();
}
/**
* Getter for the end z-coordinate
* @return the end z-coordinate
*/
inline long getEndZ() const{
return end->getZ();
}
};
#endif