#include <Brep.h>

| Public Member Functions | |
| BREP_SOLID () | |
| virtual | ~BREP_SOLID () | 
| void | FreeData (void) | 
| void | CloseData (void) | 
| void | ConnectShell (BREP_SHELL *shell) | 
| void | DisconnectShell (BREP_SHELL *shell) | 
| Public Attributes | |
| unsigned int | facetno | 
| 面の数 | |
| unsigned int | vertexno | 
| 頂点の数 | |
| unsigned int | vertexid | 
| 頂点のカウンタ.Vertex のIDを決める際に使用 | |
| int | vcount | 
| 1面あたりの頂点数 | |
| BREP_SHELL_LIST | shells | 
| OctreeNode * | octree | 
| RBound< double > | rbound | 
| BREP_CONTOUR_LIST | contours | 
| Contours リスト. | |
| BREP_WING_LIST | wings | 
| Wings リスト. | |
| BREP_CONTOUR_LIST | surplus_contours | 
| 過剰 Contours リスト | |
| BREP_WING_LIST | shortage_wings | 
| 不足 Wings リスト | |
| std::string | name | 
| CVCounter * | counter | 
| 仮想計量カウンタ | |
| bool | freed | 
| 開放済み確認フラグ | |
Definition at line 73 of file Brep.h.
| BREP_SOLID | ( | ) | 
空の Solidを作る
Definition at line 27 of file Brep.cpp.
References BREP_SOLID::counter, BREP_SOLID::facetno, BREP_SOLID::freed, BREP_SOLID::octree, jbxl::OctreeNode, BREP_SOLID::rbound, RBound< T >::set(), BREP_SOLID::vcount, BREP_SOLID::vertexid, and BREP_SOLID::vertexno.
00028 { 00029 freed = false; 00030 00031 facetno = 0; 00032 vertexno = 0; 00033 vertexid = 0; 00034 vcount = 0; // 不定または未定 00035 // 00036 counter = NULL; 00037 octree = new OctreeNode(NULL, this); 00038 rbound.set(HUGE_VALF, -HUGE_VALF, HUGE_VALF, -HUGE_VALF, HUGE_VALF, -HUGE_VALF); 00039 }

| ~BREP_SOLID | ( | ) |  [virtual] | 
ディストラクタ
Definition at line 48 of file Brep.cpp.
References BREP_SOLID::freed, and BREP_SOLID::FreeData().

| void CloseData | ( | void | ) | 
Definition at line 97 of file Brep.cpp.
References OctreeNode::ComputeVerticesNormal(), RBound< T >::fusion(), BREP_SOLID::octree, BREP_SOLID::rbound, and BREP_SOLID::shells.
Referenced by jbxl::CloseTriSolid().
00098 { 00099 BREP_SHELL_LIST::iterator ishell; 00100 for (ishell=shells.begin(); ishell!=shells.end(); ishell++) (*ishell)->CloseData(); 00101 for (ishell=shells.begin(); ishell!=shells.end(); ishell++) rbound.fusion((*ishell)->rbound); 00102 00103 octree->ComputeVerticesNormal(); 00104 }


| void ConnectShell | ( | BREP_SHELL * | shell | ) | 
void BREP_SOLID::ConnectShell(BREP_SHELL* shell)
Solidに指定したShellを結合する.
Definition at line 113 of file Brep.cpp.
References BREP_SOLID::shells, and BREP_SHELL::solid.
Referenced by BREP_SHELL::BREP_SHELL().
00114 { 00115 if (shell!=NULL) { 00116 shell->solid = this; 00117 shells.push_back(shell); 00118 } 00119 }

| void DisconnectShell | ( | BREP_SHELL * | shell | ) | 
void BREP_SOLID::DisconnectShell(BREP_SHELL* shell)
Solidから指定したShellを削除する.
Definition at line 128 of file Brep.cpp.
References BREP_SOLID::shells, and BREP_SHELL::solid.
Referenced by BREP_SHELL::~BREP_SHELL().
00129 { 00130 if (shell!=NULL) { 00131 BREP_SHELL_LIST::iterator ishell; 00132 ishell = std::find(shells.begin(), shells.end(), shell); 00133 if (ishell!=shells.end()) shells.erase(ishell); 00134 shell->solid = NULL; 00135 } 00136 }

| void FreeData | ( | void | ) | 
Solid が持つ Shell以下のオブジェクトとVertex の Octreeを全て削除
Definition at line 60 of file Brep.cpp.
References BREP_SOLID::contours, BREP_SOLID::counter, CVCounter::DeleteChildCounter(), BREP_SOLID::freed, CVCounter::GetUsableCounter(), CVCounter::MakeChildCounter(), BREP_SOLID::octree, CVCounter::SetMax(), BREP_SOLID::shells, BREP_SOLID::shortage_wings, BREP_SOLID::surplus_contours, and BREP_SOLID::wings.
Referenced by jbxl::freeBrepSolid(), and BREP_SOLID::~BREP_SOLID().
00061 { 00062 if (freed) return; 00063 00064 BREP_SHELL* pbsh; 00065 BREP_SHELL_LIST::iterator ishell = shells.begin(); 00066 00067 CVCounter* cnt = NULL; 00068 if (counter!=NULL) { 00069 cnt = counter->GetUsableCounter(); 00070 if (cnt!=NULL) cnt->SetMax(100); 00071 } 00072 00073 int shn = (int)shells.size(); 00074 while (ishell!=shells.end()) { 00075 if (cnt!=NULL) cnt->MakeChildCounter(100/shn); 00076 pbsh = *ishell; 00077 ishell = shells.erase(ishell); // Shellの数は多くないはずなので,counter処理のために 00078 delete pbsh; // eraseの空処理を Shellに行わせる 00079 if (cnt!=NULL) cnt->DeleteChildCounter(); 00080 } 00081 00082 contours.clear(); 00083 wings.clear(); 00084 shortage_wings.clear(); 00085 surplus_contours.clear(); 00086 00087 delete octree; 00088 // 00089 freed = true; 00090 }


Definition at line 85 of file Brep.h.
Referenced by BrepSolidList::addSolid(), jbxl::AddVector2TriSolid(), jbxl::CloseTriSolid(), MeshObjectNode::computeVertexByBREP(), jbxl::CreateContoursList(), jbxl::CreateSurplusContoursList(), jbxl::CreateTriSolidFromSTL(), jbxl::CreateTriSolidFromVector(), jbxl::CreateWingsList(), BREP_SOLID::FreeData(), BrepSolidList::getMerge(), jbxl::IsCollisionContours(), jbxl::PatchupContour(), jbxl::WriteSTLFileA(), and jbxl::WriteSTLFileB().
Definition at line 92 of file Brep.h.
Referenced by BREP_SOLID::BREP_SOLID(), jbxl::CreateTriSolidFromSTL(), jbxl::CreateTriSolidFromVector(), jbxl::DeleteShortageWings(), jbxl::DeleteStraightEdges(), jbxl::DeleteSurplusContours(), jbxl::FillShortageWings(), BREP_SOLID::FreeData(), jbxl::PatchupContour(), and BREP_SHELL::~BREP_SHELL().
| unsigned int facetno | 
Definition at line 76 of file Brep.h.
Referenced by BrepSolidList::addSolid(), BREP_SOLID::BREP_SOLID(), MeshObjectNode::computeVertexByBREP(), jbxl::CreateContoursList(), and BrepSolidList::getMerge().
| bool freed | 
Definition at line 94 of file Brep.h.
Referenced by BREP_SOLID::BREP_SOLID(), BREP_SOLID::FreeData(), and BREP_SOLID::~BREP_SOLID().
Definition at line 82 of file Brep.h.
Referenced by BrepSolidList::addSolid(), jbxl::AddVector2TriSolid(), BREP_SOLID::BREP_SOLID(), BREP_SOLID::CloseData(), MeshObjectNode::computeVertexByBREP(), jbxl::CreateContourByVector(), jbxl::CreateTriSolidFromSTL(), jbxl::CreateTriSolidFromVector(), and BREP_SOLID::FreeData().
Definition at line 83 of file Brep.h.
Referenced by BREP_SOLID::BREP_SOLID(), and BREP_SOLID::CloseData().
Definition at line 81 of file Brep.h.
Referenced by BREP_SOLID::CloseData(), BREP_SOLID::ConnectShell(), jbxl::CreateContoursList(), BREP_SOLID::DisconnectShell(), BREP_SOLID::FreeData(), and jbxl::ReverseContours().
Definition at line 89 of file Brep.h.
Referenced by jbxl::CreateShortageWingsList(), jbxl::DeleteShortageWings(), jbxl::DeleteStraightEdges(), jbxl::FillShortageWings(), jbxl::FillShortageWings_Near(), jbxl::FillShortageWings_Next(), BREP_SOLID::FreeData(), and jbxl::JoinShortageWings().
Definition at line 88 of file Brep.h.
Referenced by jbxl::CreateSurplusContoursList(), jbxl::DeleteSurplusContours(), and BREP_SOLID::FreeData().
| int vcount | 
Definition at line 79 of file Brep.h.
Referenced by BREP_SOLID::BREP_SOLID(), and jbxl::CloseTriSolid().
| unsigned int vertexid | 
Definition at line 78 of file Brep.h.
Referenced by OctreeNode::AddWithDuplicates(), OctreeNode::AddWithUnique(), BREP_SOLID::BREP_SOLID(), and OctreeNode::OctreeNode().
| unsigned int vertexno | 
Definition at line 77 of file Brep.h.
Referenced by jbxl::AddVertex2Octree(), BREP_SOLID::BREP_SOLID(), and OctreeNode::~OctreeNode().
Definition at line 86 of file Brep.h.
Referenced by jbxl::CreateShortageWingsList(), jbxl::CreateWingsList(), and BREP_SOLID::FreeData().
 1.6.1
 1.6.1