JunkBox_Lib++ (for Windows) 1.10.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BREP_SOLID Class Reference

#include <Brep.h>

Collaboration diagram for BREP_SOLID:

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 71 of file Brep.h.

Constructor & Destructor Documentation

◆ BREP_SOLID()

BREP_SOLID::BREP_SOLID()

空の Solidを作る

Definition at line 25 of file Brep.cpp.

26{
27 freed = false;
28
29 facetno = 0;
30 vertexno = 0;
31 vertexid = 0;
32 vcount = 0; // 不定または未定
33 //
34 counter = NULL;
35 octree = new OctreeNode(NULL, this);
36 rbound.set(HUGE_VALF, -HUGE_VALF, HUGE_VALF, -HUGE_VALF, HUGE_VALF, -HUGE_VALF);
37}
OctreeNode * octree
Definition Brep.h:80
unsigned int vertexno
頂点の数
Definition Brep.h:75
CVCounter * counter
仮想計量カウンタ
Definition Brep.h:90
bool freed
開放済み確認フラグ
Definition Brep.h:92
unsigned int facetno
面の数
Definition Brep.h:74
RBound< double > rbound
Definition Brep.h:81
int vcount
1面あたりの頂点数
Definition Brep.h:77
unsigned int vertexid
頂点のカウンタ.Vertex のIDを決める際に使用
Definition Brep.h:76
void set(T XMin=(T) 0, T XMax=(T) 0, T YMin=(T) 0, T YMax=(T) 0, T ZMin=(T) 0, T ZMax=(T) 0, T TMin=(T) 0, T TMax=(T) 0)
Definition Vector.h:444
class DllExport OctreeNode
Definition Brep.h:39

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.

Here is the call graph for this function:

◆ ~BREP_SOLID()

~BREP_SOLID ( )
virtual

BREP_SOLID::~BREP_SOLID()

ディストラクタ

Definition at line 45 of file Brep.cpp.

46{
47 if (!freed) FreeData();
48}
void FreeData(void)
Definition Brep.cpp:56

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

Here is the call graph for this function:

Member Function Documentation

◆ CloseData()

void CloseData ( void )

void BREP_SOLID::CloseData()

Definition at line 92 of file Brep.cpp.

93{
94 BREP_SHELL_LIST::iterator ishell;
95 for (ishell=shells.begin(); ishell!=shells.end(); ishell++) (*ishell)->CloseData();
96 for (ishell=shells.begin(); ishell!=shells.end(); ishell++) rbound.fusion((*ishell)->rbound);
97
99}
BREP_SHELL_LIST shells
Definition Brep.h:79
void ComputeVerticesNormal(void)
Definition Brep.cpp:779
void fusion(RBound< T > bound)
境界構造体 bound と融合させる
Definition Vector.h:483

References OctreeNode::ComputeVerticesNormal(), RBound< T >::fusion(), BREP_SOLID::octree, BREP_SOLID::rbound, and BREP_SOLID::shells.

Referenced by jbxl::CloseTriSolid().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ConnectShell()

void ConnectShell ( BREP_SHELL * shell)

void BREP_SOLID::ConnectShell(BREP_SHELL* shell)

Solidに指定したShellを結合する.

Definition at line 107 of file Brep.cpp.

108{
109 if (shell!=NULL) {
110 shell->solid = this;
111 shells.push_back(shell);
112 }
113}
BREP_SOLID * solid
Definition Brep.h:116

References BREP_SOLID::shells, and BREP_SHELL::solid.

Referenced by BREP_SHELL::BREP_SHELL().

Here is the caller graph for this function:

◆ DisconnectShell()

void DisconnectShell ( BREP_SHELL * shell)

void BREP_SOLID::DisconnectShell(BREP_SHELL* shell)

Solidから指定したShellを削除する.

Definition at line 121 of file Brep.cpp.

122{
123 if (shell!=NULL) {
124 BREP_SHELL_LIST::iterator ishell;
125 ishell = std::find(shells.begin(), shells.end(), shell);
126 if (ishell!=shells.end()) shells.erase(ishell);
127 shell->solid = NULL;
128 }
129}

References BREP_SOLID::shells, and BREP_SHELL::solid.

Referenced by BREP_SHELL::~BREP_SHELL().

Here is the caller graph for this function:

◆ FreeData()

void FreeData ( void )

void BREP_SOLID::FreeData()

Solid が持つ Shell以下のオブジェクトとVertex の Octreeを全て削除

Definition at line 56 of file Brep.cpp.

57{
58 if (freed) return;
59
60 BREP_SHELL* pbsh;
61 BREP_SHELL_LIST::iterator ishell = shells.begin();
62
63 CVCounter* cnt = NULL;
64 if (counter!=NULL) {
66 if (cnt!=NULL) cnt->SetMax(100);
67 }
68
69 int shn = (int)shells.size();
70 while (ishell!=shells.end()) {
71 if (cnt!=NULL) cnt->MakeChildCounter(100/shn);
72 pbsh = *ishell;
73 ishell = shells.erase(ishell); // Shellの数は多くないはずなので,counter処理のために
74 delete pbsh; // eraseの空処理を Shellに行わせる
75 if (cnt!=NULL) cnt->DeleteChildCounter();
76 }
77
78 contours.clear();
79 wings.clear();
80 shortage_wings.clear();
81 surplus_contours.clear();
82
83 delete octree;
84 //
85 freed = true;
86}
BREP_CONTOUR_LIST contours
Contours リスト
Definition Brep.h:83
BREP_WING_LIST wings
Wings リスト
Definition Brep.h:84
BREP_WING_LIST shortage_wings
不足 Wings リスト
Definition Brep.h:87
BREP_CONTOUR_LIST surplus_contours
過剰 Contours リスト
Definition Brep.h:86
virtual void SetMax(int m)
カウンタの最大値(最終目標)を設定
Definition ClassBox.h:161
virtual void DeleteChildCounter()
子カウンタの削除(有効領域の無効化)
Definition ClassBox.h:179
virtual CVCounter * GetUsableCounter()
現在使用可能な目盛りの有効領域を確保
Definition ClassBox.h:177
virtual CVCounter * MakeChildCounter(int n)
子カウンタの作成(有効領域を再定義)
Definition ClassBox.h:178

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().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ contours

◆ counter

◆ facetno

◆ freed

bool freed

Definition at line 92 of file Brep.h.

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

◆ name

std::string name

Definition at line 89 of file Brep.h.

◆ octree

◆ rbound

RBound<double> rbound

Definition at line 81 of file Brep.h.

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

◆ shells

◆ shortage_wings

◆ surplus_contours

BREP_CONTOUR_LIST surplus_contours

◆ vcount

int vcount

Definition at line 77 of file Brep.h.

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

◆ vertexid

unsigned int vertexid

◆ vertexno

unsigned int vertexno

Definition at line 75 of file Brep.h.

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

◆ wings


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