![]() |
CMGDK r49-rc2
|
XY 2D顶点坐标类模板 更多...
#include <Vertex2.H>
公有成员 | |
Vertex2 () | |
本类构造函数 | |
Vertex2 (T nx, T ny) | |
本类构造函数 | |
template<typename N > | |
Vertex2 (const Vertex2< N > &v) | |
本类构造函数 | |
void | Zero () |
将x和y全清为0 | |
void | One () |
将x和y全清为1 | |
void | Set (float nx, float ny) |
设置坐标值为nx,ny | |
void | Flip (float vx, float vy) |
对应vx,vy做翻转 | |
template<typename N > | |
void | Flip (const Vertex2< N > &v) |
对应v做翻转 | |
void | FlipX () |
对应X轴翻转 | |
void | FlipY () |
对应Y轴翻转 | |
void | FlipX (float v) |
对应指定X轴做翻转 | |
void | FlipY (float v) |
对应指定Y轴做翻转 | |
void | Scale (double, double, double) |
相对某一点做缩放 | |
void | Scale (double, double, double, double) |
相对某一点做缩放 | |
template<typename N > | |
void | Scale (const Vertex2< N > &, double) |
相对某一点做缩放 | |
template<typename N > | |
void | Scale (const Vertex2< N > &, double, double) |
相对某一点做指定比例的缩放 | |
void | Rotate (double, double, double) |
绕指定坐标旋转指定角度 | |
template<typename N > | |
void | Rotate (const Vertex2< N > &v, double ang) |
绕指定坐标旋转指定角度 | |
void | Move (float vx, float vy) |
移动 | |
template<typename N1 , typename N2 > | |
void | Scale (const Vertex2< N1 > &v, const Vertex2< N2 > &l) |
相对某一点做指定比例的缩放 | |
float | Length () const |
计算当前点与零点之间的距离 | |
float | Length (float vx, float vy) const |
计算当前点与指定点之间的距离 | |
float | Angle (float vx, float vy) const |
计算当前点与指定点之间的角度 | |
template<typename N > | |
float | Length (const Vertex2< N > &v) const |
计算当前点与指定点之间的距离 | |
template<typename N > | |
float | Angle (const Vertex2< N > &v) const |
计算当前点与指定点之间的角度 | |
void | Normalize () |
template<typename N > | |
Vertex2< T > | ResizeLength (const Vertex2< N > &, double) const |
调整这个方向上两点的距离 | |
template<typename N > | |
Vertex2< T > | ToLength (const Vertex2< N > &, double) const |
按这个方向将两点的距离调到指定长度 | |
template<typename N > | |
Vertex2< T > | To (const Vertex2< N > &, double) const |
template<typename N > | |
bool | operator== (const Vertex2< N > &v) const |
template<typename N > | |
bool | operator!= (const Vertex2< N > &v) const |
Vertex2< T > & | operator= (const float *v) |
template<typename N > | |
Vertex2< T > & | operator+= (const Vertex2< N > &v) |
template<typename N > | |
Vertex2< T > & | operator-= (const Vertex2< N > &v) |
template<typename N > | |
Vertex2< T > & | operator*= (const Vertex2< N > &v) |
template<typename N > | |
Vertex2< T > & | operator/= (const Vertex2< N > &v) |
Vertex2< T > & | operator*= (const float v) |
Vertex2< T > & | operator/= (const float v) |
template<typename N > | |
Vertex2< T > | operator+ (const Vertex2< N > &v) const |
template<typename N > | |
Vertex2< T > | operator- (const Vertex2< N > &v) const |
template<typename N > | |
Vertex2< T > | operator* (const Vertex2< N > &v) const |
template<typename N > | |
Vertex2< T > | operator/ (const Vertex2< N > &v) const |
Vertex2< T > | operator* (const float v) const |
Vertex2< T > | operator/ (const float v) const |
Vertex2< T > | operator- () const |
operator T * () const | |
使得本类可以直接当做T *使用 | |
operator const T * () const | |
使得本类可以直接当做const T *使用 | |
公有属性 | |
T | x |
T | y |
坐标值 |
XY 2D顶点坐标类模板
2D顶点坐标类模板
hgl::Vertex2< T >::Vertex2 | ( | ) | [inline] |
本类构造函数
hgl::Vertex2< T >::Vertex2 | ( | T | nx, |
T | ny | ||
) | [inline] |
本类构造函数
hgl::Vertex2< T >::Vertex2 | ( | const Vertex2< N > & | v | ) | [inline] |
本类构造函数
float hgl::Vertex2< T >::Angle | ( | float | vx, |
float | vy | ||
) | const |
计算当前点与指定点之间的角度
float hgl::Vertex2< T >::Angle | ( | const Vertex2< N > & | v | ) | const [inline] |
计算当前点与指定点之间的角度
void hgl::Vertex2< T >::Flip | ( | float | vx, |
float | vy | ||
) | [inline] |
对应vx,vy做翻转
void hgl::Vertex2< T >::Flip | ( | const Vertex2< N > & | v | ) | [inline] |
对应v做翻转
void hgl::Vertex2< T >::FlipX | ( | float | v | ) | [inline] |
对应指定X轴做翻转
void hgl::Vertex2< T >::FlipX | ( | ) | [inline] |
对应X轴翻转
void hgl::Vertex2< T >::FlipY | ( | float | v | ) | [inline] |
对应指定Y轴做翻转
void hgl::Vertex2< T >::FlipY | ( | ) | [inline] |
对应Y轴翻转
float hgl::Vertex2< T >::Length | ( | ) | const |
计算当前点与零点之间的距离
float hgl::Vertex2< T >::Length | ( | float | vx, |
float | vy | ||
) | const |
计算当前点与指定点之间的距离
float hgl::Vertex2< T >::Length | ( | const Vertex2< N > & | v | ) | const [inline] |
计算当前点与指定点之间的距离
void hgl::Vertex2< T >::Move | ( | float | vx, |
float | vy | ||
) | [inline] |
移动
void hgl::Vertex2< T >::Normalize | ( | ) |
void hgl::Vertex2< T >::One | ( | ) | [inline] |
将x和y全清为1
hgl::Vertex2< T >::operator const T * | ( | ) | const [inline] |
使得本类可以直接当做const T *使用
hgl::Vertex2< T >::operator T * | ( | ) | const [inline] |
使得本类可以直接当做T *使用
bool hgl::Vertex2< T >::operator!= | ( | const Vertex2< N > & | v | ) | const [inline] |
Vertex2<T> hgl::Vertex2< T >::operator* | ( | const Vertex2< N > & | v | ) | const [inline] |
Vertex2<T> hgl::Vertex2< T >::operator* | ( | const float | v | ) | const [inline] |
Vertex2<T>& hgl::Vertex2< T >::operator*= | ( | const Vertex2< N > & | v | ) | [inline] |
Vertex2<T>& hgl::Vertex2< T >::operator*= | ( | const float | v | ) | [inline] |
Vertex2<T> hgl::Vertex2< T >::operator+ | ( | const Vertex2< N > & | v | ) | const [inline] |
Vertex2<T>& hgl::Vertex2< T >::operator+= | ( | const Vertex2< N > & | v | ) | [inline] |
Vertex2<T> hgl::Vertex2< T >::operator- | ( | const Vertex2< N > & | v | ) | const [inline] |
Vertex2<T> hgl::Vertex2< T >::operator- | ( | ) | const [inline] |
Vertex2<T>& hgl::Vertex2< T >::operator-= | ( | const Vertex2< N > & | v | ) | [inline] |
Vertex2<T> hgl::Vertex2< T >::operator/ | ( | const Vertex2< N > & | v | ) | const [inline] |
Vertex2<T> hgl::Vertex2< T >::operator/ | ( | const float | v | ) | const [inline] |
Vertex2<T>& hgl::Vertex2< T >::operator/= | ( | const float | v | ) | [inline] |
Vertex2<T>& hgl::Vertex2< T >::operator/= | ( | const Vertex2< N > & | v | ) | [inline] |
Vertex2<T>& hgl::Vertex2< T >::operator= | ( | const float * | v | ) | [inline] |
bool hgl::Vertex2< T >::operator== | ( | const Vertex2< N > & | v | ) | const [inline] |
Vertex2< T > hgl::Vertex2< T >::ResizeLength | ( | const Vertex2< N > & | target, |
double | scale | ||
) | const |
调整这个方向上两点的距离
void hgl::Vertex2< T >::Rotate | ( | const Vertex2< N > & | v, |
double | ang | ||
) | [inline] |
绕指定坐标旋转指定角度
void hgl::Vertex2< T >::Rotate | ( | double | vx, |
double | vy, | ||
double | ang | ||
) |
绕指定坐标旋转指定角度
void hgl::Vertex2< T >::Scale | ( | const Vertex2< N > & | v, |
double | sx, | ||
double | sy | ||
) |
相对某一点做指定比例的缩放
void hgl::Vertex2< T >::Scale | ( | const Vertex2< N1 > & | v, |
const Vertex2< N2 > & | l | ||
) | [inline] |
相对某一点做指定比例的缩放
void hgl::Vertex2< T >::Scale | ( | double | vx, |
double | vy, | ||
double | scale | ||
) |
相对某一点做缩放
void hgl::Vertex2< T >::Scale | ( | double | vx, |
double | vy, | ||
double | sx, | ||
double | sy | ||
) |
相对某一点做缩放
void hgl::Vertex2< T >::Scale | ( | const Vertex2< N > & | v, |
double | scale | ||
) |
相对某一点做缩放
void hgl::Vertex2< T >::Set | ( | float | nx, |
float | ny | ||
) | [inline] |
设置坐标值为nx,ny
Vertex2< T > hgl::Vertex2< T >::To | ( | const Vertex2< N > & | target, |
double | pos | ||
) | const |
Vertex2< T > hgl::Vertex2< T >::ToLength | ( | const Vertex2< N > & | target, |
double | new_length | ||
) | const |
按这个方向将两点的距离调到指定长度
void hgl::Vertex2< T >::Zero | ( | ) | [inline] |
将x和y全清为0
T hgl::Vertex2< T >::x |
T hgl::Vertex2< T >::y |
坐标值