Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Spr::CDQHLine< TVtx > Class Template Reference

QuickHullで作られる面. More...

#include <CDQuickHull2D.h>

Collaboration diagram for Spr::CDQHLine< TVtx >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

Public Attributes


Detailed Description

template<class TVtx>
class Spr::CDQHLine< TVtx >

QuickHullで作られる面.

Definition at line 19 of file CDQuickHull2D.h.


Member Function Documentation

template<class TVtx>
void Spr::CDQHLine< TVtx >::Clear  ) 
 

メモリクリア.使う前に呼ぶ.

< メモリクリア.使う前に呼ぶ.

Definition at line 13 of file CDQuickHull2DImp.h.

References Spr::CDQHLine< TVtx >::deleted.

Referenced by Spr::CDQHLines< TVtx >::CreateCone(), Spr::CDQHLines< TVtx >::CreateConvexHull(), and Spr::CDQHLines< TVtx >::CreateFirstConvex().

template<class TVtx>
void Spr::CDQHLine< TVtx >::Reverse  ) 
 

辺の裏表をひっくり返す.

Definition at line 76 of file CDQuickHull2DImp.h.

References Spr::CDQHLine< TVtx >::dist, Spr::CDQHLine< TVtx >::normal, and Spr::CDQHLine< TVtx >::vtx.

Referenced by Spr::CDQHLines< TVtx >::CreateFirstConvex().

template<class TVtx>
bool Spr::CDQHLine< TVtx >::Visible TVtx *  p  ) 
 

頂点 v から表側が見えるかどうか

Definition at line 17 of file CDQuickHull2DImp.h.

References Spr::CDQHLine< TVtx >::dist, and Spr::CDQHLine< TVtx >::normal.

Referenced by Spr::CDQHLines< TVtx >::CreateCone().

template<class TVtx>
int Spr::CDQHLine< TVtx >::GetVtxID TVtx *  v  ) 
 

vの頂点番号を返す(0..1を返す).見つからなければ3を返す.

Definition at line 22 of file CDQuickHull2DImp.h.

References Spr::CDQHLine< TVtx >::vtx.

template<class TVtx>
void Spr::CDQHLine< TVtx >::CalcNormal  ) 
 

法線ベクトルと距離を計算する.

Definition at line 28 of file CDQuickHull2DImp.h.

References Spr::CDQHLine< TVtx >::dist, PTM::VectorImp< SZ, STR, OD >::norm(), Spr::CDQHLine< TVtx >::normal, PTM::VectorImp< SZ, STR, OD >::unitize(), Spr::CDQHLine< TVtx >::vtx, Spr::TVec2< T >::x, and Spr::TVec2< T >::y.

Referenced by Spr::CDQHLines< TVtx >::CreateCone(), and Spr::CDQHLines< TVtx >::CreateFirstConvex().

template<class TVtx>
double Spr::CDQHLine< TVtx >::CalcDist TVtx *  v  ) 
 

点との距離を計算する.精度を考慮して一番近い点で計算する.

Definition at line 38 of file CDQuickHull2DImp.h.

References Spr::CDQHLine< TVtx >::normal, and Spr::CDQHLine< TVtx >::vtx.

Referenced by Spr::CDQHLines< TVtx >::FindFarthest().

template<class TVtx>
void Spr::CDQHLine< TVtx >::Print std::ostream &  os  )  const
 

デバッグ用表示

Definition at line 44 of file CDQuickHull2DImp.h.

References Spr::CDQHLine< TVtx >::deleted, Spr::CDQHLine< TVtx >::dist, Spr::CDQHLine< TVtx >::normal, and Spr::CDQHLine< TVtx >::vtx.


Member Data Documentation

template<class TVtx>
Vec2d Spr::CDQHLine< TVtx >::normal
 

面の法線

Definition at line 21 of file CDQuickHull2D.h.

Referenced by Spr::CDQHLine< TVtx >::CalcDist(), Spr::CDQHLine< TVtx >::CalcNormal(), Spr::CDQHLines< TVtx >::CreateConvexHull(), Spr::CDQHLine< TVtx >::Print(), Spr::CDQHLine< TVtx >::Reverse(), and Spr::CDQHLine< TVtx >::Visible().

template<class TVtx>
double Spr::CDQHLine< TVtx >::dist
 

面の原点からの距離

Definition at line 22 of file CDQuickHull2D.h.

Referenced by Spr::CDQHLine< TVtx >::CalcNormal(), Spr::CDQHLines< TVtx >::CreateConvexHull(), Spr::CDQHLine< TVtx >::Print(), Spr::CDQHLine< TVtx >::Reverse(), and Spr::CDQHLine< TVtx >::Visible().

template<class TVtx>
TVtx* Spr::CDQHLine< TVtx >::vtx[2]
 

面を構成する頂点

Definition at line 24 of file CDQuickHull2D.h.

Referenced by Spr::CDQHLine< TVtx >::CalcDist(), Spr::CDQHLine< TVtx >::CalcNormal(), Spr::CDQHLines< TVtx >::CreateCone(), Spr::CDQHLines< TVtx >::CreateConvexHull(), Spr::CDQHLines< TVtx >::CreateFirstConvex(), Spr::CDQHLines< TVtx >::FindFarthest(), Spr::CDQHLine< TVtx >::GetVtxID(), Spr::CDQHLine< TVtx >::Print(), and Spr::CDQHLine< TVtx >::Reverse().

template<class TVtx>
CDQHLine* Spr::CDQHLine< TVtx >::neighbor[2]
 

隣の面 vtx[0] の隣が neighbor[0]

Definition at line 25 of file CDQuickHull2D.h.

Referenced by Spr::CDQHLines< TVtx >::CreateCone(), Spr::CDQHLines< TVtx >::CreateConvexHull(), and Spr::CDQHLines< TVtx >::CreateFirstConvex().

template<class TVtx>
bool Spr::CDQHLine< TVtx >::deleted
 

削除された面はtrue

Definition at line 26 of file CDQuickHull2D.h.

Referenced by Spr::CDQHLine< TVtx >::Clear(), Spr::CDQHLines< TVtx >::CreateCone(), Spr::CDQHLines< TVtx >::CreateConvexHull(), and Spr::CDQHLine< TVtx >::Print().


The documentation for this class was generated from the following files:
Generated on Sun Apr 16 02:08:34 2006 for Springhead by  doxygen 1.4.1