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

Spr::CDQHPlanes< TVtx > Class Template Reference

面のバッファ More...

#include <CDQuickHull3D.h>

List of all members.

Public Member Functions

Public Attributes

Private Member Functions

Classes


Detailed Description

template<class TVtx>
class Spr::CDQHPlanes< TVtx >

面のバッファ

Definition at line 45 of file CDQuickHull3D.h.


Member Function Documentation

template<class TVtx>
unsigned Spr::CDQHPlanes< TVtx >::size  ) 
 

使用済みバッファのサイズ

Definition at line 77 of file CDQuickHull3DImp.h.

References Spr::CDQHPlanes< TVtx >::begin, and Spr::CDQHPlanes< TVtx >::end.

template<class TVtx>
void Spr::CDQHPlanes< TVtx >::CreateConvexHull TVtx **  b,
TVtx **  e
 

bからeまでの頂点から凸包を作る.使用した頂点はbからvtxBegin, 使用しなかった頂点は,vtxBeginからeに移動する. beginからendは頂点を3つ含む面になる.それらの面うち凸包に使われた面 は CDQHPlane::deleted が false になっている.

Definition at line 100 of file CDQuickHull3DImp.h.

References Spr::CDQHPlanes< TVtx >::begin, Spr::CDQHPlanes< TVtx >::buffer, Spr::CDQHPlanes< TVtx >::CreateFirstConvex(), Spr::CDQHPlane< TVtx >::deleted, Spr::CDQHPlane< TVtx >::dist, DSTR, Spr::CDQHPlanes< TVtx >::end, Spr::CDQHPlanes< TVtx >::len, Spr::CDQHPlane< TVtx >::normal, Spr::CDQHPlanes< TVtx >::TreatPlane(), Spr::CDQHPlane< TVtx >::vtx, Spr::CDQHPlanes< TVtx >::vtxBegin, Spr::CDQHPlanes< TVtx >::vtxBeginInput, Spr::CDQHPlanes< TVtx >::vtxEnd, and Spr::CDQHPlanes< TVtx >::vtxEndInput.

template<class TVtx>
void Spr::CDQHPlanes< TVtx >::CreateFirstConvex  )  [private]
 

最初の凸多面体=2枚の三角形(表裏)を作る. できるだけ大きい3角形を作ると効率が良いので,x最大,x最小, 2点が作る直線から一番遠い頂点で3角形を作る. 使用した頂点は,vtxBeginの手前に移動して,頂点リストからはずす.

Definition at line 134 of file CDQuickHull3DImp.h.

References Spr::CDQHPlanes< TVtx >::begin, Spr::CDQHPlane< TVtx >::CalcNormal(), Spr::CDQHPlane< TVtx >::Clear(), Spr::CDQHPlanes< TVtx >::end, Spr::CDQHPlane< TVtx >::neighbor, Spr::CDQHPlanes< TVtx >::nPlanes, Spr::CDQHPlane< TVtx >::Reverse(), PTM::VectorImp< SZ, STR, OD >::square(), PTM::VectorImp< SZ, STR, OD >::unitize(), Spr::CDQHPlane< TVtx >::vtx, Spr::CDQHPlanes< TVtx >::vtxBegin, and Spr::CDQHPlanes< TVtx >::vtxEnd.

Referenced by Spr::CDQHPlanes< TVtx >::CreateConvexHull().

template<class TVtx>
void Spr::CDQHPlanes< TVtx >::FindHorizon TVtx *&  rv,
CDQHPlane cur,
TVtx *  vtx
[private]
 

horizon を作る. cur が穴をあける面,vtx が新しい頂点. rv にhorizonを辺に持つ3角形を1つ返す.

Definition at line 201 of file CDQuickHull3DImp.h.

References Spr::CDQHPlane< TVtx >::deleted, Spr::CDQHPlane< TVtx >::neighbor, Spr::CDQHPlanes< TVtx >::nPlanes, Spr::CDQHPlane< TVtx >::Visible(), and Spr::CDQHPlane< TVtx >::vtx.

template<class TVtx>
void Spr::CDQHPlanes< TVtx >::CreateCone TVtx *  firstVtx,
TVtx *  top
[private]
 

頂点とhorizonの間にコーンを作る.

Definition at line 236 of file CDQuickHull3DImp.h.

References Spr::CDQHPlanes< TVtx >::begin, Spr::CDQHPlane< TVtx >::CalcNormal(), Spr::CDQHPlane< TVtx >::Clear(), DSTR, Spr::CDQHPlanes< TVtx >::end, Spr::CDQHPlane< TVtx >::GetVtxID(), Spr::CDQHPlanes< TVtx >::len, Spr::CDQHPlane< TVtx >::neighbor, Spr::CDQHPlanes< TVtx >::nPlanes, Spr::CDQHPlane< TVtx >::vtx, Spr::CDQHPlanes< TVtx >::vtxBeginInput, and Spr::CDQHPlanes< TVtx >::vtxEndInput.

template<class TVtx>
bool Spr::CDQHPlanes< TVtx >::FindFarthest CDQHPlane plane  )  [private]
 

一番遠くの頂点を見つける.見つけたらそれを頂点リストからはずす

Definition at line 322 of file CDQuickHull3DImp.h.

References Spr::CDQHPlane< TVtx >::CalcDist(), DSTR, Spr::CDQHPlane< TVtx >::vtx, Spr::CDQHPlanes< TVtx >::vtxBegin, and Spr::CDQHPlanes< TVtx >::vtxEnd.

Referenced by Spr::CDQHPlanes< TVtx >::TreatPlane().

template<class TVtx>
void Spr::CDQHPlanes< TVtx >::TreatPlane CDQHPlane cur  )  [private]
 

一つの面に対する処理を行う.一番遠くの頂点を見つけ, 地平線を調べ,コーンを作り,内部の頂点をはずす.

Definition at line 388 of file CDQuickHull3DImp.h.

References DSTR, Spr::CDQHPlanes< TVtx >::FindFarthest(), and Spr::CDQHPlanes< TVtx >::vtxBegin.

Referenced by Spr::CDQHPlanes< TVtx >::CreateConvexHull().


Member Data Documentation

template<class TVtx>
TVtx** Spr::CDQHPlanes< TVtx >::vtxBeginInput
 

残っている頂点の先頭

Definition at line 47 of file CDQuickHull3D.h.

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

template<class TVtx>
TVtx** Spr::CDQHPlanes< TVtx >::vtxEndInput
 

残っている頂点の最後の次

Definition at line 48 of file CDQuickHull3D.h.

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

template<class TVtx>
CDQHPlane* Spr::CDQHPlanes< TVtx >::buffer
 

バッファへのポインタ new する.

Definition at line 60 of file CDQuickHull3D.h.

Referenced by Spr::CDQHPlanes< TVtx >::CreateConvexHull().

template<class TVtx>
int Spr::CDQHPlanes< TVtx >::len
 

バッファの長さ

Definition at line 61 of file CDQuickHull3D.h.

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

template<class TVtx>
CDQHPlane* Spr::CDQHPlanes< TVtx >::begin
 

最初の面

Definition at line 62 of file CDQuickHull3D.h.

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

template<class TVtx>
CDQHPlane* Spr::CDQHPlanes< TVtx >::end
 

最後の面の次

Definition at line 63 of file CDQuickHull3D.h.

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

template<class TVtx>
TVtx** Spr::CDQHPlanes< TVtx >::vtxBegin
 

残っている頂点の先頭

Definition at line 64 of file CDQuickHull3D.h.

Referenced by Spr::CDQHPlanes< TVtx >::CreateConvexHull(), Spr::CDQHPlanes< TVtx >::CreateFirstConvex(), Spr::CDQHPlanes< TVtx >::FindFarthest(), and Spr::CDQHPlanes< TVtx >::TreatPlane().

template<class TVtx>
TVtx** Spr::CDQHPlanes< TVtx >::vtxEnd
 

残っている頂点の最後の次

Definition at line 65 of file CDQuickHull3D.h.

Referenced by Spr::CDQHPlanes< TVtx >::CreateConvexHull(), Spr::CDQHPlanes< TVtx >::CreateFirstConvex(), and Spr::CDQHPlanes< TVtx >::FindFarthest().

template<class TVtx>
int Spr::CDQHPlanes< TVtx >::nPlanes
 

面の数

Definition at line 66 of file CDQuickHull3D.h.

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


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