IMP logo
IMP Reference Guide  2.9.0
The Integrative Modeling Platform
IMP::algebra::Line3D Class Reference

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

#include <IMP/algebra/Line3D.h>

+ Inheritance diagram for IMP::algebra::Line3D:

Detailed Description

Simple implementation of lines in 3D.

A line is defined by a direction and any point on the line. Internally, Plucker coordinates are used, where the line is defined by a direction and an orthogonal moment about the origin whose magnitude is the distance from the origin. See geometric primitives for more information.

See Also
Segment3D

Definition at line 28 of file Line3D.h.

Public Member Functions

 Line3D (const Vector3D &direction, const Vector3D &point_on_line)
 
 Line3D (const algebra::Segment3D &s)
 Create line along segment. More...
 
const Vector3Dget_direction () const
 Get the unit vector in the direction of the line. More...
 
Vector3D get_moment () const
 Get the moment of the line about the origin. More...
 
Vector3D get_moment (const Vector3D &v) const
 Get the moment of the line about a point. More...
 
Line3D get_opposite () const
 Get the line in the opposite direction. More...
 
Vector3D get_point_on_line () const
 Get the point on the line closest to the origin. More...
 
double get_reciprocal_product (const Line3D &l) const
 Get reciprocal (or virtual) product, the moment of either line about the other. More...
 
algebra::Segment3D get_segment_starting_at (const Vector3D &v, double d) const
 Get segment of a given length starting at a point. More...
 
void show (std::ostream &out=std::cout) const
 

Related Functions

(Note that these are not member functions.)

BoundingBoxD< 3 > get_bounding_box (const Line3D &g)
 
const Line3Dget_line_3d_geometry (const Line3D &g)
 

Constructor & Destructor Documentation

IMP::algebra::Line3D::Line3D ( const algebra::Segment3D s)

Create line along segment.

Member Function Documentation

const Vector3D& IMP::algebra::Line3D::get_direction ( ) const

Get the unit vector in the direction of the line.

Definition at line 38 of file Line3D.h.

Vector3D IMP::algebra::Line3D::get_moment ( ) const

Get the moment of the line about the origin.

Definition at line 44 of file Line3D.h.

Vector3D IMP::algebra::Line3D::get_moment ( const Vector3D v) const

Get the moment of the line about a point.

Definition at line 47 of file Line3D.h.

+ Here is the call graph for this function:

Line3D IMP::algebra::Line3D::get_opposite ( ) const

Get the line in the opposite direction.

Definition at line 55 of file Line3D.h.

Vector3D IMP::algebra::Line3D::get_point_on_line ( ) const

Get the point on the line closest to the origin.

Definition at line 41 of file Line3D.h.

+ Here is the call graph for this function:

double IMP::algebra::Line3D::get_reciprocal_product ( const Line3D l) const

Get reciprocal (or virtual) product, the moment of either line about the other.

algebra::Segment3D IMP::algebra::Line3D::get_segment_starting_at ( const Vector3D v,
double  d 
) const

Get segment of a given length starting at a point.

Note
The point is not assumed to be on the line and is therefore projected onto the line to construct the segment.

Friends And Related Function Documentation

BoundingBoxD< 3 > get_bounding_box ( const Line3D g)
related

Definition at line 70 of file Line3D.h.

const Line3D & get_line_3d_geometry ( const Line3D g)
related

Definition at line 70 of file Line3D.h.


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