8 #ifndef IMPALGEBRA_LINE_3D_H
9 #define IMPALGEBRA_LINE_3D_H
11 #include <IMP/algebra/algebra_config.h>
17 #include <boost/serialization/access.hpp>
19 IMPALGEBRA_BEGIN_NAMESPACE
32 friend class boost::serialization::access;
34 template<
class Archive>
void serialize(Archive &ar,
const unsigned int) {
59 double get_reciprocal_product(
const Line3D &l)
const;
71 { out <<
"[" << l_ <<
" ; " << m_ <<
"]"; });
75 Vector3D pop = g.get_point_on_line();
76 return BoundingBoxD<3>(pop) +
104 IMPALGEBRA_END_NAMESPACE
algebra::Segment3D get_projected(const Line3D &l, const algebra::Segment3D &s)
Project a segment onto a line.
Base class for geometric types.
Simple implementation of lines in 3D.
#define IMP_SHOWABLE_INLINE(Name, how_to_show)
Declare the methods needed by an object that can be printed.
#define IMP_LINEAR_GEOMETRY_METHODS(Name, name, bounding_box)
Implement the needed namespace methods for a geometry type.
Line3D get_opposite() const
Get the line in the opposite direction.
Vector3D get_point_on_line() const
Get the point on the line closest to the origin.
double get_angle(const Line3D &a, const Line3D &b)
Get angle in radians between two lines around their closest points.
Simple implementation of segments in 3D.
double get_distance(const Line3D &a, const Line3D &b)
Get the closest distance between two lines.
Vector3D get_moment() const
Get the moment of the line about the origin.
Base class for geometric types.
Vector3D get_vector_product(const Vector3D &p1, const Vector3D &p2)
Return the vector product (cross product) of two vectors.
A bounding box in D dimensions.
Simple implementation of segments in 3D.
const Vector3D & get_direction() const
Get the unit vector in the direction of the line.
algebra::Segment3D get_segment_connecting_first_to_second(const Line3D &a, const Line3D &b)
Get shortest possible segment from the first line to the second.
Vector3D get_moment(const Vector3D &v) const
Get the moment of the line about a point.