source: ThirdParty/LinearAlgebra/src/LinearAlgebra/Line.hpp@ 4ecb2d

Action_Thermostats Add_AtomRandomPerturbation Add_RotateAroundBondAction Add_SelectAtomByNameAction Adding_Graph_to_ChangeBondActions Adding_MD_integration_tests Adding_StructOpt_integration_tests Automaking_mpqc_open AutomationFragmentation_failures Candidate_v1.6.0 Candidate_v1.6.1 ChangeBugEmailaddress ChangingTestPorts ChemicalSpaceEvaluator Combining_Subpackages Debian_Package_split Debian_package_split_molecuildergui_only Disabling_MemDebug Docu_Python_wait EmpiricalPotential_contain_HomologyGraph_documentation Enable_parallel_make_install Enhance_userguide Enhanced_StructuralOptimization Enhanced_StructuralOptimization_continued Example_ManyWaysToTranslateAtom Exclude_Hydrogens_annealWithBondGraph FitPartialCharges_GlobalError Fix_ChronosMutex Fix_StatusMsg Fix_StepWorldTime_single_argument Fix_Verbose_Codepatterns ForceAnnealing_goodresults ForceAnnealing_oldresults ForceAnnealing_tocheck ForceAnnealing_with_BondGraph ForceAnnealing_with_BondGraph_continued ForceAnnealing_with_BondGraph_continued_betteresults ForceAnnealing_with_BondGraph_contraction-expansion GeometryObjects Gui_displays_atomic_force_velocity IndependentFragmentGrids_IntegrationTest JobMarket_RobustOnKillsSegFaults JobMarket_StableWorkerPool JobMarket_unresolvable_hostname_fix ODR_violation_mpqc_open PartialCharges_OrthogonalSummation PythonUI_with_named_parameters QtGui_reactivate_TimeChanged_changes Recreated_GuiChecks RotateToPrincipalAxisSystem_UndoRedo StoppableMakroAction Subpackage_CodePatterns Subpackage_JobMarket Subpackage_LinearAlgebra Subpackage_levmar Subpackage_mpqc_open Subpackage_vmg ThirdParty_MPQC_rebuilt_buildsystem TremoloParser_IncreasedPrecision TremoloParser_MultipleTimesteps Ubuntu_1604_changes stable
Last change on this file since 4ecb2d was 4ecb2d, checked in by Frederik Heber <heber@…>, 8 years ago

Moved LinearAlgebra sub-package into ThirdParty folder.

  • needed to adapt location of libLinearAlgebra.la in all Makefile.am's.
  • relinked m4 subfolder, relinked am_doxygen_include.am. Both point to those present in molecuilder parent folder.
  • adapted configure.ac's:
  • Property mode set to 100644
File size: 1.8 KB
Line 
1/*
2 * Line.hpp
3 *
4 * Created on: Apr 30, 2010
5 * Author: crueger
6 */
7
8#ifndef LINE_HPP_
9#define LINE_HPP_
10
11// include config.h
12#ifdef HAVE_CONFIG_H
13#include <config.h>
14#endif
15
16
17#include "Space.hpp"
18
19#include <iosfwd>
20#include <memory>
21#include <vector>
22
23class Vector;
24class Plane;
25class LinePoint;
26class RealSpaceMatrix;
27
28/** This class represents a line in space stretching to infinity.
29 *
30 * It is defined by its origin and a direction.
31 *
32 * \sa LinePoint and LineSegment
33 */
34class Line : public Space
35{
36 friend bool operator==(const Line&,const Line&);
37 friend class LinePoint;
38public:
39 Line(const Vector &_origin, const Vector &_direction);
40 Line(const Line& _src);
41 virtual ~Line();
42
43 Line &operator=(const Line& rhs);
44
45 virtual double distance(const Vector &point) const;
46 virtual Vector getClosestPoint(const Vector &point) const;
47
48 Vector getDirection() const;
49 Vector getOrigin() const;
50
51 std::vector<Vector> getPointsOnLine() const;
52
53 Vector getIntersection(const Line& otherLine) const;
54
55 Vector rotateVector(const Vector &rhs, double alpha) const;
56 Line rotateLine(const Line &rhs, double alpha) const;
57 Plane rotatePlane(const Plane &rhs, double alpha) const;
58 RealSpaceMatrix getRotationMatrix(double alpha) const;
59
60 Plane getOrthogonalPlane(const Vector &origin) const;
61
62 std::vector<Vector> getSphereIntersections() const;
63
64 LinePoint getLinePoint(const Vector&) const;
65 LinePoint posEndpoint() const;
66 LinePoint negEndpoint() const;
67
68
69
70private:
71 std::auto_ptr<Vector> origin;
72 std::auto_ptr<Vector> direction;
73};
74
75bool operator==(const Line&,const Line&);
76
77std::ostream & operator << (std::ostream& ost, const Line &m);
78
79/**
80 * Named constructor to make a line through two points
81 */
82Line makeLineThrough(const Vector &x1, const Vector &x2);
83
84#endif /* LINE_HPP_ */
Note: See TracBrowser for help on using the repository browser.