TBTK
ParametrizedLine3d.h
Go to the documentation of this file.
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 
23 #ifndef COM_DAFER45_TBTK_PARAMETRIZED_LINE_3D
24 #define COM_DAFER45_TBTK_PARAMETRIZED_LINE_3D
25 
26 #include "TBTK/Field.h"
27 #include "TBTK/Vector3d.h"
28 
29 #include <initializer_list>
30 
31 namespace TBTK{
32 
37 class ParametrizedLine3d : public Field<Vector3d, double>{
38 public:
40  ParametrizedLine3d(const Vector3d &start, const Vector3d &direction);
41 
43  virtual Vector3d operator()(std::initializer_list<double> lambda) const;
44 
46  const Vector3d operator()(double lambda) const;
47 private:
49  Vector3d start;
50 
52  Vector3d direction;
53 };
54 
55 inline const Vector3d ParametrizedLine3d::operator()(double lambda) const{
56  return ParametrizedLine3d::operator()({lambda});
57 }
58 
59 }; //End namespace TBTK
60 
61 #endif
virtual Vector3d operator()(std::initializer_list< double > lambda) const
Definition: ParametrizedLine3d.h:37
Three-dimensional vector with components of double type.
Definition: Field.h:34
Definition: Vector3d.h:33
Definition: ModelFactory.h:35
Abstract base class for fields.
ParametrizedLine3d(const Vector3d &start, const Vector3d &direction)