ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
rtkQuadricShape.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright RTK Consortium
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * https://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18
19#ifndef rtkQuadricShape_h
20#define rtkQuadricShape_h
21
22#include "RTKExport.h"
23#include <itkPoint.h>
24#include <rtkMacro.h>
25
26#include "rtkConvexShape.h"
27
28namespace rtk
29{
30
45class RTK_EXPORT QuadricShape : public ConvexShape
46{
47public:
53
58
60 itkNewMacro(Self);
61
63 itkOverrideGetNameOfClassMacro(QuadricShape);
64
66 bool
67 IsInside(const PointType & point) const override;
68
70 bool
71 IsInsideQuadric(const PointType & point) const;
72
76 bool
77 IsIntersectedByRay(const PointType & rayOrigin,
78 const VectorType & rayDirection,
79 ScalarType & infDist,
80 ScalarType & supDist) const override;
81
83 void
84 Rescale(const VectorType & r) override;
85
87 void
88 Translate(const VectorType & t) override;
89
91 void
92 Rotate(const RotationMatrixType & r) override;
93
94 itkGetConstMacro(A, ScalarType);
96 itkGetConstMacro(B, ScalarType);
98 itkGetConstMacro(C, ScalarType);
100 itkGetConstMacro(D, ScalarType);
102 itkGetConstMacro(E, ScalarType);
104 itkGetConstMacro(F, ScalarType);
106 itkGetConstMacro(G, ScalarType);
108 itkGetConstMacro(H, ScalarType);
110 itkGetConstMacro(I, ScalarType);
112 itkGetConstMacro(J, ScalarType);
114
115 void
116 SetEllipsoid(const PointType & center, const VectorType & axis, const ScalarType & yangle = 0);
117
119 InternalClone() const override;
120
121private:
123
134};
135
136} // end namespace rtk
137
138#endif
SmartPointer< Self > Pointer
Implements transparent reference counting.
itk::Point< ScalarType, Dimension > PointType
itk::Vector< ScalarType, Dimension > VectorType
itk::Matrix< ScalarType, Dimension, Dimension > RotationMatrixType
void Rotate(const RotationMatrixType &r) override
ConvexShape Superclass
Superclass::PointType PointType
itk::SmartPointer< Self > Pointer
Superclass::ScalarType ScalarType
bool IsIntersectedByRay(const PointType &rayOrigin, const VectorType &rayDirection, ScalarType &infDist, ScalarType &supDist) const override
void Rescale(const VectorType &r) override
itk::SmartPointer< const Self > ConstPointer
bool IsInside(const PointType &point) const override
void Translate(const VectorType &t) override
void SetEllipsoid(const PointType &center, const VectorType &axis, const ScalarType &yangle=0)
bool IsInsideQuadric(const PointType &point) const
itk::LightObject::Pointer InternalClone() const override
Superclass::VectorType VectorType
#define itkSetMacro(name, type)