BREP_SHELL Class Reference

#include <Brep.h>

Collaboration diagram for BREP_SHELL:
Collaboration graph
[legend]

List of all members.

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_SOLIDsolid
BREP_FACET_LIST facets
RBound< double > rbound

Detailed Description

Definition at line 115 of file Brep.h.


Constructor & Destructor Documentation

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 }

Here is the call graph for this function:

~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 }

Here is the call graph for this function:


Member Function Documentation

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 }

Here is the call graph for this function:

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 }

Here is the caller graph for this function:

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 }

Here is the caller graph for this function:


Member Data Documentation

RBound<double> rbound

Definition at line 120 of file Brep.h.

Referenced by BREP_SHELL::BREP_SHELL(), and BREP_SHELL::CloseData().


The documentation for this class was generated from the following files:

Generated on 15 Nov 2023 for JunkBox_Lib++ (for Windows) by  doxygen 1.6.1