TBTK
Need a break? Support the development by playing Polarity Puzzles
ParametrizedLine3d.h
1 /* Copyright 2017 Kristofer Björnson
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
17 
24 #ifndef COM_DAFER45_TBTK_PARAMETRIZED_LINE_3D
25 #define COM_DAFER45_TBTK_PARAMETRIZED_LINE_3D
26 
27 #include "TBTK/Field.h"
28 #include "TBTK/Vector3d.h"
29 
30 #include <initializer_list>
31 
32 namespace TBTK{
33 
38 class ParametrizedLine3d : public Field<Vector3d, double>{
39 public:
41  ParametrizedLine3d(const Vector3d &start, const Vector3d &direction);
42 
44  virtual Vector3d operator()(std::initializer_list<double> lambda) const;
45 
47  const Vector3d operator()(double lambda) const;
48 private:
50  Vector3d start;
51 
53  Vector3d direction;
54 };
55 
56 inline const Vector3d ParametrizedLine3d::operator()(double lambda) const{
57  return ParametrizedLine3d::operator()({lambda});
58 }
59 
60 }; //End namespace TBTK
61 
62 #endif
63 
Three-dimensional vector with components of double type.
Definition: Boolean.h:32