IMP logo
IMP Reference Guide  2.8.0
The Integrative Modeling Platform
IMP::algebra::Segment3D Class Reference

Simple implementation of segments in 3D. More...

#include <IMP/algebra/Segment3D.h>

+ Inheritance diagram for IMP::algebra::Segment3D:

Detailed Description

Simple implementation of segments in 3D.

A line segment is defined by a start and end point (as Vector3D). See geometric primitives for more information.

Definition at line 24 of file Segment3D.h.

Public Member Functions

 Segment3D (const Vector3D &start, const Vector3D &end)
 
Vector3D get_direction () const
 Get a normalized direction vector from get_point(0) to get_point(1). More...
 
double get_length () const
 
Vector3D get_middle_point () const
 
const Vector3Dget_point (unsigned int i) const
 Get the start (i==0) or end (i==1) point of the segment. More...
 
void show (std::ostream &out=std::cout) const
 

Related Functions

(Note that these are not member functions.)

BoundingBoxD< 3 > get_bounding_box (const Segment3D &g)
 
const Segment3Dget_segment_3d_geometry (const Segment3D &g)
 

Member Function Documentation

Vector3D IMP::algebra::Segment3D::get_direction ( ) const

Get a normalized direction vector from get_point(0) to get_point(1).

Definition at line 35 of file Segment3D.h.

const Vector3D& IMP::algebra::Segment3D::get_point ( unsigned int  i) const

Get the start (i==0) or end (i==1) point of the segment.

Definition at line 29 of file Segment3D.h.

Friends And Related Function Documentation

BoundingBoxD< 3 > get_bounding_box ( const Segment3D g)
related

Definition at line 46 of file Segment3D.h.

const Segment3D & get_segment_3d_geometry ( const Segment3D g)
related

Definition at line 46 of file Segment3D.h.


The documentation for this class was generated from the following file: