[ GAMB | Source | Keywords | Summary | Ancestors | All Members | Descendants ]
public: | |
// Constructors. | |
Segment() ; | |
Segment(const Vector3& p1, const Vector3& p2) ; | |
// Inspection. | |
bool | empty() const ; |
const Vector3& | getFirstPoint() const ; |
const Vector3& | getSecondPoint() const ; |
const float | length() const ; |
Vector3 | midPoint() const; |
float | midPointDistance(const Segment* segment) const ; |
Line | getLine() const; |
Vector3 | getDirection() const ; |
void | transform(const RigidTrans3& transformation) ; |
bool | isParallel(const Segment& segment) const; |
bool | areCollinear(const Segment& segment) const; |
friend ostream& | operator<<(ostream& s, const Segment& segment); |
void | outputPDB(ostream& output, unsigned int firstIndex, unsigned int secondIndex) const; |
protected: |
Copyright: SAMBA group, Tel-Aviv Univ. Israel, 2002.
Constructs an empty segment
Segment() ;
Function is currently defined inline.
Segment(const Vector3& p1, const Vector3& p2) ;
Constructs the 3D line segment between the two given 3D points
Segment(const Vector3& p1, const Vector3& p2) ;
Function is currently defined inline.
bool empty() const ;
Function is currently defined inline.
const Vector3& getFirstPoint() const ;
Returns the first endpoint of the segment
inline const Vector3& getFirstPoint() const ;
Function is currently defined inline.
const Vector3& getSecondPoint() const ;
Returns the second endpoint of the segment
inline const Vector3& getSecondPoint() const ;
Function is currently defined inline.
Returns the length of the segment
inline const float length() const ;
Function is currently defined inline.
Returns the 3D midpoint of the segment
Vector3 midPoint() const;
float midPointDistance(const Segment* segment) const ;
Returns the distance between the midpoints of the two segments
float midPointDistance(const Segment* segment) const ;
Function is currently defined inline.
Returns the line on which the segment is located. The direction of the line is from the first point of the segment to the second one.
Line getLine() const;
Vector3 getDirection() const ;
Returns the direction of the segment (normilized).
The segment's direction is defined from the first point of the
segment to the second one.
Vector3 getDirection() const ;
Function is currently defined inline.
void transform(const RigidTrans3& transformation) ;
Apply the given transformation to the two points of the segment
void transform(const RigidTrans3& transformation) ;
Function is currently defined inline.
bool isParallel(const Segment& segment) const;
Returns true if the two segments are parallel
inline bool isParallel(const Segment& segment) const;
Function is currently defined inline.
bool areCollinear(const Segment& segment) const;
Returns true if the two segments are located on the same line
bool areCollinear(const Segment& segment) const;
friend ostream& operator<<(ostream& s, const Segment& segment);
Outputs the coordinates of the two segment's endpoints
friend ostream& operator<<(ostream& s, const Segment& segment);
void outputPDB(ostream& output, unsigned int firstIndex, unsigned int secondIndex) const;
Adds to the given output stream three PDB records that specify the segment. Specifically, the two segment's points are described in ATOM records and the connectivity between them is specified in a CONECT record.
void outputPDB(ostream& output, unsigned int firstIndex, unsigned int secondIndex) const;
public: | ||
---|---|---|
// Inspection. | ||
bool | empty() const ; | |
const Vector3& | getFirstPoint() const ; | |
const Vector3& | getSecondPoint() const ; | |
const float | length() const ; | |
Vector3 | midPoint() const; | |
float | midPointDistance(const Segment* segment) const ; | |
Line | getLine() const; | |
Vector3 | getDirection() const ; | |
void | transform(const RigidTrans3& transformation) ; | |
bool | isParallel(const Segment& segment) const; | |
bool | areCollinear(const Segment& segment) const; | |
friend ostream& | operator<<(ostream& s, const Segment& segment); | |
void | outputPDB(ostream& output, unsigned int firstIndex, unsigned int secondIndex) const; | |
protected: |
Report problems to jkotula@unimax.com