CMGDK r49-rc2
公有成员 | 公有属性
hgl::Vertex2< T >模板类参考

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 *使用

公有属性

x
y
 坐标值

详细描述

template<typename T>
class hgl::Vertex2< T >

XY 2D顶点坐标类模板

2D顶点坐标类模板


构造及析构函数文档

template<typename T>
hgl::Vertex2< T >::Vertex2 ( ) [inline]

本类构造函数

template<typename T>
hgl::Vertex2< T >::Vertex2 ( nx,
ny 
) [inline]

本类构造函数

template<typename T>
template<typename N >
hgl::Vertex2< T >::Vertex2 ( const Vertex2< N > &  v) [inline]

本类构造函数


成员函数文档

template<typename T >
float hgl::Vertex2< T >::Angle ( float  vx,
float  vy 
) const

计算当前点与指定点之间的角度

template<typename T>
template<typename N >
float hgl::Vertex2< T >::Angle ( const Vertex2< N > &  v) const [inline]

计算当前点与指定点之间的角度

template<typename T>
void hgl::Vertex2< T >::Flip ( float  vx,
float  vy 
) [inline]

对应vx,vy做翻转

template<typename T>
template<typename N >
void hgl::Vertex2< T >::Flip ( const Vertex2< N > &  v) [inline]

对应v做翻转

template<typename T>
void hgl::Vertex2< T >::FlipX ( float  v) [inline]

对应指定X轴做翻转

template<typename T>
void hgl::Vertex2< T >::FlipX ( ) [inline]

对应X轴翻转

template<typename T>
void hgl::Vertex2< T >::FlipY ( float  v) [inline]

对应指定Y轴做翻转

template<typename T>
void hgl::Vertex2< T >::FlipY ( ) [inline]

对应Y轴翻转

template<typename T >
float hgl::Vertex2< T >::Length ( ) const

计算当前点与零点之间的距离

template<typename T >
float hgl::Vertex2< T >::Length ( float  vx,
float  vy 
) const

计算当前点与指定点之间的距离

template<typename T>
template<typename N >
float hgl::Vertex2< T >::Length ( const Vertex2< N > &  v) const [inline]

计算当前点与指定点之间的距离

template<typename T>
void hgl::Vertex2< T >::Move ( float  vx,
float  vy 
) [inline]

移动

template<typename T >
void hgl::Vertex2< T >::Normalize ( )
template<typename T>
void hgl::Vertex2< T >::One ( ) [inline]

将x和y全清为1

template<typename T>
hgl::Vertex2< T >::operator const T * ( ) const [inline]

使得本类可以直接当做const T *使用

template<typename T>
hgl::Vertex2< T >::operator T * ( ) const [inline]

使得本类可以直接当做T *使用

template<typename T>
template<typename N >
bool hgl::Vertex2< T >::operator!= ( const Vertex2< N > &  v) const [inline]
template<typename T>
template<typename N >
Vertex2<T> hgl::Vertex2< T >::operator* ( const Vertex2< N > &  v) const [inline]
template<typename T>
Vertex2<T> hgl::Vertex2< T >::operator* ( const float  v) const [inline]
template<typename T>
template<typename N >
Vertex2<T>& hgl::Vertex2< T >::operator*= ( const Vertex2< N > &  v) [inline]
template<typename T>
Vertex2<T>& hgl::Vertex2< T >::operator*= ( const float  v) [inline]
template<typename T>
template<typename N >
Vertex2<T> hgl::Vertex2< T >::operator+ ( const Vertex2< N > &  v) const [inline]
template<typename T>
template<typename N >
Vertex2<T>& hgl::Vertex2< T >::operator+= ( const Vertex2< N > &  v) [inline]
template<typename T>
template<typename N >
Vertex2<T> hgl::Vertex2< T >::operator- ( const Vertex2< N > &  v) const [inline]
template<typename T>
Vertex2<T> hgl::Vertex2< T >::operator- ( ) const [inline]
template<typename T>
template<typename N >
Vertex2<T>& hgl::Vertex2< T >::operator-= ( const Vertex2< N > &  v) [inline]
template<typename T>
template<typename N >
Vertex2<T> hgl::Vertex2< T >::operator/ ( const Vertex2< N > &  v) const [inline]
template<typename T>
Vertex2<T> hgl::Vertex2< T >::operator/ ( const float  v) const [inline]
template<typename T>
Vertex2<T>& hgl::Vertex2< T >::operator/= ( const float  v) [inline]
template<typename T>
template<typename N >
Vertex2<T>& hgl::Vertex2< T >::operator/= ( const Vertex2< N > &  v) [inline]
template<typename T>
Vertex2<T>& hgl::Vertex2< T >::operator= ( const float *  v) [inline]
template<typename T>
template<typename N >
bool hgl::Vertex2< T >::operator== ( const Vertex2< N > &  v) const [inline]
template<typename T >
template<typename N >
Vertex2< T > hgl::Vertex2< T >::ResizeLength ( const Vertex2< N > &  target,
double  scale 
) const

调整这个方向上两点的距离

template<typename T>
template<typename N >
void hgl::Vertex2< T >::Rotate ( const Vertex2< N > &  v,
double  ang 
) [inline]

绕指定坐标旋转指定角度

template<typename T >
void hgl::Vertex2< T >::Rotate ( double  vx,
double  vy,
double  ang 
)

绕指定坐标旋转指定角度

template<typename T >
template<typename N >
void hgl::Vertex2< T >::Scale ( const Vertex2< N > &  v,
double  sx,
double  sy 
)

相对某一点做指定比例的缩放

template<typename T>
template<typename N1 , typename N2 >
void hgl::Vertex2< T >::Scale ( const Vertex2< N1 > &  v,
const Vertex2< N2 > &  l 
) [inline]

相对某一点做指定比例的缩放

template<typename T >
void hgl::Vertex2< T >::Scale ( double  vx,
double  vy,
double  scale 
)

相对某一点做缩放

template<typename T >
void hgl::Vertex2< T >::Scale ( double  vx,
double  vy,
double  sx,
double  sy 
)

相对某一点做缩放

template<typename T >
template<typename N >
void hgl::Vertex2< T >::Scale ( const Vertex2< N > &  v,
double  scale 
)

相对某一点做缩放

template<typename T>
void hgl::Vertex2< T >::Set ( float  nx,
float  ny 
) [inline]

设置坐标值为nx,ny

template<typename T >
template<typename N >
Vertex2< T > hgl::Vertex2< T >::To ( const Vertex2< N > &  target,
double  pos 
) const
template<typename T >
template<typename N >
Vertex2< T > hgl::Vertex2< T >::ToLength ( const Vertex2< N > &  target,
double  new_length 
) const

按这个方向将两点的距离调到指定长度

template<typename T>
void hgl::Vertex2< T >::Zero ( ) [inline]

将x和y全清为0


成员数据文档

template<typename T>
T hgl::Vertex2< T >::x
template<typename T>
T hgl::Vertex2< T >::y

坐标值


该类的文档由以下文件生成:
 全部  名字空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义