BREP_SOLID Class Reference

#include <Brep.h>

Collaboration diagram for BREP_SOLID:
Collaboration graph
[legend]

List of all members.

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
OctreeNodeoctree
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
CVCountercounter
 仮想計量カウンタ
bool freed
 開放済み確認フラグ

Detailed Description

Definition at line 73 of file Brep.h.


Constructor & Destructor Documentation

BREP_SOLID (  ) 

BREP_SOLID::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 }

Here is the call graph for this function:

~BREP_SOLID (  )  [virtual]

BREP_SOLID::~BREP_SOLID()

ディストラクタ

Definition at line 48 of file Brep.cpp.

References BREP_SOLID::freed, and BREP_SOLID::FreeData().

00049 {
00050     if (!freed) FreeData();
00051 }

Here is the call graph for this function:


Member Function Documentation

void CloseData ( void   ) 

void BREP_SOLID::CloseData()

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 }

Here is the call graph for this function:

Here is the caller graph for this function:

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 }

Here is the caller graph for this function:

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 }

Here is the caller graph for this function:

void FreeData ( void   ) 

void BREP_SOLID::FreeData()

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 }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

unsigned int facetno
bool freed

Definition at line 94 of file Brep.h.

Referenced by BREP_SOLID::BREP_SOLID(), BREP_SOLID::FreeData(), and BREP_SOLID::~BREP_SOLID().

std::string name

Definition at line 91 of file Brep.h.

RBound<double> rbound

Definition at line 83 of file Brep.h.

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

int vcount

Definition at line 79 of file Brep.h.

Referenced by BREP_SOLID::BREP_SOLID(), and jbxl::CloseTriSolid().

unsigned int vertexid
unsigned int vertexno

Definition at line 77 of file Brep.h.

Referenced by jbxl::AddVertex2Octree(), BREP_SOLID::BREP_SOLID(), and OctreeNode::~OctreeNode().


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