#include <Brep.h>
Public Member Functions | |
BREP_SHELL (BREP_SOLID *pr_solid) | |
virtual | ~BREP_SHELL () |
void | CloseData () |
void | ConnectFacet (BREP_FACET *facet) |
void | DisconnectFacet (BREP_FACET *facet) |
Public Attributes | |
BREP_SOLID * | solid |
BREP_FACET_LIST | facets |
RBound< double > | rbound |
Definition at line 115 of file Brep.h.
BREP_SHELL | ( | BREP_SOLID * | pr_solid | ) |
Definition at line 145 of file Brep.cpp.
References BREP_SOLID::ConnectShell(), BREP_SHELL::rbound, RBound< T >::set(), and BREP_SHELL::solid.
00146 { 00147 solid = pr_solid; 00148 rbound.set(HUGE_VALF, -HUGE_VALF, HUGE_VALF, -HUGE_VALF, HUGE_VALF, -HUGE_VALF); 00149 00150 if (solid!=NULL) solid->ConnectShell(this); 00151 }
~BREP_SHELL | ( | ) | [virtual] |
Definition at line 155 of file Brep.cpp.
References BREP_SOLID::counter, BREP_SOLID::DisconnectShell(), BREP_SHELL::facets, CVCounter::GetUsableCounter(), Max, CVCounter::SetMax(), BREP_FACET::shell, BREP_SHELL::solid, and CVCounter::StepIt().
00156 { 00157 CVCounter* counter = NULL; 00158 if (solid!=NULL) { 00159 if (solid->counter!=NULL) { 00160 counter = solid->counter->GetUsableCounter(); 00161 if (counter!=NULL) counter->SetMax(100); 00162 } 00163 solid->DisconnectShell(this); 00164 } 00165 00166 // Facets の破棄 00167 BREP_FACET* pbfc; 00168 BREP_FACET_LIST::iterator ifacet = facets.begin(); 00169 00170 int cnt = 0; 00171 int itv = Max(1, (int)facets.size()/100); 00172 while (ifacet!=facets.end()) { 00173 pbfc = *ifacet; 00174 ifacet = facets.erase(ifacet); 00175 pbfc->shell = NULL; 00176 delete(pbfc); 00177 cnt++; 00178 00179 // カウンタ処理 00180 if (counter!=NULL && cnt%itv==0) counter->StepIt(); 00181 } 00182 }
void CloseData | ( | void | ) |
Definition at line 186 of file Brep.cpp.
References BREP_SHELL::facets, RBound< T >::fusion(), and BREP_SHELL::rbound.
00187 { 00188 BREP_FACET_LIST::iterator ifacet; 00189 for (ifacet=facets.begin(); ifacet!=facets.end(); ifacet++) (*ifacet)->CloseData(); 00190 for (ifacet=facets.begin(); ifacet!=facets.end(); ifacet++) rbound.fusion((*ifacet)->rbound); 00191 }
void ConnectFacet | ( | BREP_FACET * | facet | ) |
Definition at line 196 of file Brep.cpp.
References BREP_SHELL::facets, and BREP_FACET::shell.
Referenced by BREP_FACET::BREP_FACET().
00197 { 00198 if (facet!=NULL) { 00199 facet->shell = this; 00200 facets.push_back(facet); 00201 } 00202 }
void DisconnectFacet | ( | BREP_FACET * | facet | ) |
Definition at line 207 of file Brep.cpp.
References BREP_SHELL::facets, and BREP_FACET::shell.
Referenced by BREP_FACET::~BREP_FACET().
00208 { 00209 if (facet!=NULL) { 00210 BREP_FACET_LIST::iterator ifacet; 00211 ifacet = std::find(facets.begin(), facets.end(), facet); 00212 if (ifacet!=facets.end()) facets.erase(ifacet); 00213 00214 facet->shell = NULL; 00215 } 00216 }
Definition at line 119 of file Brep.h.
Referenced by BREP_SHELL::CloseData(), BREP_SHELL::ConnectFacet(), BREP_SHELL::DisconnectFacet(), jbxl::FastDeleteFacet(), and BREP_SHELL::~BREP_SHELL().
Definition at line 120 of file Brep.h.
Referenced by BREP_SHELL::BREP_SHELL(), and BREP_SHELL::CloseData().
Definition at line 118 of file Brep.h.
Referenced by BREP_SHELL::BREP_SHELL(), BREP_SOLID::ConnectShell(), jbxl::CreateContourByVector(), BREP_SOLID::DisconnectShell(), jbxl::PatchupContour(), and BREP_SHELL::~BREP_SHELL().