BREP_EDGE Class Reference

#include <Brep.h>

Collaboration diagram for BREP_EDGE:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 BREP_EDGE (BREP_VERTEX *vertex1, BREP_VERTEX *vertex2)
virtual ~BREP_EDGE ()
void CloseData ()

Public Attributes

BREP_WINGwing1
BREP_WINGwing2
Vector< double > center
BREP_EDGE_LISTedge_list
 多重エッジのリストへのポインタ
bool complete
 完全なエッジ.2つの Wingは共に使用されている.
double tolerance

Detailed Description

Definition at line 232 of file Brep.h.


Constructor & Destructor Documentation

BREP_EDGE ( BREP_VERTEX vertex1,
BREP_VERTEX vertex2 
)

Definition at line 552 of file Brep.cpp.

References jbxl::BREP_WING, BREP_EDGE::center, BREP_EDGE::complete, BREP_WING::edge, BREP_EDGE::edge_list, jbxl::Edge_Tolerance, BREP_VERTEX::point, BREP_EDGE::tolerance, BREP_EDGE::wing1, and BREP_EDGE::wing2.

00553 {
00554     wing1 = new BREP_WING(vertex1);
00555     wing2 = new BREP_WING(vertex2);
00556     wing1->edge = wing2->edge = this;
00557 
00558     center    = (vertex1->point + vertex2->point)/2.;
00559     edge_list = NULL;
00560     complete  = false;
00561     tolerance = Edge_Tolerance;
00562 }

~BREP_EDGE (  )  [virtual]

Definition at line 566 of file Brep.cpp.

References BREP_WING::contour, DEBUG_MODE, BREP_EDGE::edge_list, PRINT_MESG, BREP_EDGE::wing1, and BREP_EDGE::wing2.

00567 {
00568     // BREP_EDGE: この Edge はまだ Contourで使われている!!
00569     if (wing1->contour || wing2->contour) {
00570         DEBUG_MODE PRINT_MESG("~BREP_EDGE: This Edge is still used!!\n");
00571     }
00572 
00573     delete wing1;
00574     delete wing2;
00575 
00576     if (edge_list!=NULL) {
00577         BREP_EDGE_LIST::iterator iedge = std::find(edge_list->begin(), edge_list->end(), this);
00578         if (iedge!=edge_list->end()) {
00579             edge_list->erase(iedge);
00580         }
00581         if (edge_list->size()==1) {
00582             (*(edge_list->begin()))->edge_list = NULL;
00583             delete(edge_list);
00584         }
00585     }
00586 }


Member Function Documentation

void CloseData ( void   ) 

Definition at line 590 of file Brep.cpp.

References Max, BREP_EDGE::tolerance, BREP_WING::vertex, BREP_EDGE::wing1, and BREP_EDGE::wing2.

Referenced by jbxl::CreateEdge().

00591 {
00592     // M.Segal, SIGGRAPH '90 p105
00593     double e = (wing1->vertex)->tolerance;
00594     e = Max(e, (wing2->vertex)->tolerance);
00595     tolerance = Max(e, tolerance);
00596 }

Here is the caller graph for this function:


Member Data Documentation

Vector<double> center

Definition at line 238 of file Brep.h.

Referenced by BREP_EDGE::BREP_EDGE().

bool complete
double tolerance

Definition at line 242 of file Brep.h.

Referenced by BREP_EDGE::BREP_EDGE(), and BREP_EDGE::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