Go to the documentation of this file. 1 #ifndef GfxTL__FRAME_HEADER__
2 #define GfxTL__FRAME_HEADER__
10 template <
unsigned int DimT,
class ScalarT>
15 template <
class ScalarT>
35 for (
unsigned int i = 0; i < Dim; ++i)
43 void RotateFrame(ScalarType radians);
47 return reinterpret_cast<PointType*
>(
this);
52 return reinterpret_cast<const PointType*
>(
this);
60 template <
class ScalarT>
64 for (
unsigned int i = 0; i < Dim; ++i)
66 for (
unsigned int j = 0; j < Dim; ++j)
74 template <
class ScalarT>
78 for (
unsigned int i = 0; i < Dim; ++i)
80 (*l)[i] = (*this)[i] * p;
84 template <
class ScalarT>
88 *g = p[0] * (*this)[0];
89 for (
unsigned int i = 1; i < Dim; ++i)
91 *g += p[i] * (*this)[i];
95 template <
class ScalarT>
101 for (
unsigned int i = 0; i < Dim; ++i)
103 (*this)[i] = r * (*this)[i];
107 template <
class ScalarT>
127 for (
unsigned int i = 0; i < Dim; ++i)
132 template <
class GPo
intT,
class LPo
intT>
133 void ToLocal(
const GPointT& p, LPointT* l)
const;
135 ScalarType Height(
const PointType& p)
const;
136 template <
class LPo
intT,
class GPo
intT>
137 void ToGlobal(
const LPointT& p, GPointT* g)
const;
138 void RotateOnNormal(ScalarType radians);
142 return reinterpret_cast<PointType*
>(
this);
147 return reinterpret_cast<const PointType*
>(
this);
155 template <
class ScalarT>
159 for (
unsigned int i = 0; i < Dim; ++i)
161 for (
unsigned int j = 0; j < Dim; ++j)
169 template <
class ScalarT>
170 template <
class GPo
intT,
class LPo
intT>
176 for (
unsigned int i = 0; i < Dim; ++i)
184 for (
unsigned int i = 0; i < Dim; ++i)
192 template <
class ScalarT>
196 for (
unsigned int i = 0; i < Dim - 1; ++i)
198 (*t)[i] = (*this)[i] * p;
202 template <
class ScalarT>
206 return p * (*this)[Dim - 1];
209 template <
class ScalarT>
210 template <
class LPo
intT,
class GPo
intT>
217 for (
unsigned int i = 1; i < Dim; ++i)
226 for (
unsigned int i = 1; i < Dim; ++i)
228 tmp += GPointT(
ScalarType(p[i]) * (*
this)[i]);
234 template <
class ScalarT>
239 ScalarType c = std::cos(radians),
s = std::sin(radians);
240 newDirs[0] =
c * (*this)[0] +
s * (*this)[1];
241 newDirs[1] = -
s * (*this)[0] +
c * (*this)[1];
242 (*this)[0] = newDirs[0];
243 (*this)[1] = newDirs[1];
void FromNormal(const V &v)
void FromNormal(const V &v)
HyperplaneCoordinateSystem< ScalarType, Dim >::PointType PointType
void Rotation(T rad, MatrixXX< 2, 2, T > *a)
double v(double t, double v0, double a0, double j)
HyperplaneCoordinateSystem< ScalarType, Dim >::PointType PointType
double s(double t, double s0, double v0, double a0, double j)