Go to the documentation of this file. 1 #ifndef GfxTL__FRAME_HEADER__
2 #define GfxTL__FRAME_HEADER__
10 template<
unsigned int DimT,
class ScalarT >
14 template<
class ScalarT >
28 for (
unsigned int i = 0; i < Dim; ++i)
35 void RotateFrame(ScalarType radians);
38 return reinterpret_cast< PointType*
>(
this);
42 return reinterpret_cast< const PointType*
>(
this);
50 template<
class ScalarT >
53 for (
unsigned int i = 0; i < Dim; ++i)
55 for (
unsigned int j = 0; j < Dim; ++j)
63 template<
class ScalarT >
66 for (
unsigned int i = 0; i < Dim; ++i)
68 (*l)[i] = (*this)[i] * p;
72 template<
class ScalarT >
75 *g = p[0] * (*this)[0];
76 for (
unsigned int i = 1; i < Dim; ++i)
78 *g += p[i] * (*this)[i];
82 template<
class ScalarT >
87 for (
unsigned int i = 0; i < Dim; ++i)
89 (*this)[i] = r * (*this)[i];
93 template<
class ScalarT >
107 for (
unsigned int i = 0; i < Dim; ++i)
112 template<
class GPo
intT,
class LPo
intT >
113 void ToLocal(
const GPointT& p, LPointT* l)
const;
115 ScalarType Height(
const PointType& p)
const;
116 template<
class LPo
intT,
class GPo
intT >
117 void ToGlobal(
const LPointT& p, GPointT* g)
const;
118 void RotateOnNormal(ScalarType radians);
121 return reinterpret_cast< PointType*
>(
this);
125 return reinterpret_cast< const PointType*
>(
this);
133 template<
class ScalarT >
136 for (
unsigned int i = 0; i < Dim; ++i)
138 for (
unsigned int j = 0; j < Dim; ++j)
146 template<
class ScalarT >
147 template<
class GPo
intT,
class LPo
intT >
152 for (
unsigned int i = 0; i < Dim; ++i)
160 for (
unsigned int i = 0; i < Dim; ++i)
168 template<
class ScalarT >
172 for (
unsigned int i = 0; i < Dim - 1; ++i)
174 (*t)[i] = (*this)[i] * p;
178 template<
class ScalarT >
182 return p * (*this)[Dim - 1];
185 template<
class ScalarT >
186 template<
class LPo
intT,
class GPo
intT >
192 for (
unsigned int i = 1; i < Dim; ++i)
201 for (
unsigned int i = 1; i < Dim; ++i)
203 tmp += GPointT(
ScalarType(p[i]) * (*
this)[i]);
209 template<
class ScalarT >
213 ScalarType c = std::cos(radians),
s = std::sin(radians);
214 newDirs[0] =
c * (*this)[0] +
s * (*this)[1];
215 newDirs[1] = -
s * (*this)[0] +
c * (*this)[1];
216 (*this)[0] = newDirs[0];
217 (*this)[1] = newDirs[1];
void FromNormal(const V &v)
HyperplaneCoordinateSystem< ScalarType, Dim >::PointType PointType
void FromNormal(const V &v)
void Rotation(T rad, MatrixXX< 2, 2, T > *a)
double v(double t, double v0, double a0, double j)
double s(double t, double s0, double v0, double a0, double j)
HyperplaneCoordinateSystem< ScalarType, Dim >::PointType PointType