JunkBox_Lib++ (for Windows) 1.10.1
Loading...
Searching...
No Matches
BREP_EDGE Class Reference

#include <Brep.h>

Collaboration diagram for BREP_EDGE:

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

Constructor & Destructor Documentation

◆ BREP_EDGE()

BREP_EDGE ( BREP_VERTEX * vertex1,
BREP_VERTEX * vertex2 )

Definition at line 521 of file Brep.cpp.

522{
523 wing1 = new BREP_WING(vertex1);
524 wing2 = new BREP_WING(vertex2);
525 wing1->edge = wing2->edge = this;
526
527 center = (vertex1->point + vertex2->point)/2.;
528 edge_list = NULL;
529 complete = false;
531}
Vector< double > center
Definition Brep.h:236
BREP_EDGE_LIST * edge_list
多重エッジのリストへのポインタ
Definition Brep.h:237
BREP_WING * wing2
Definition Brep.h:234
double tolerance
Definition Brep.h:240
BREP_WING * wing1
Definition Brep.h:233
bool complete
完全なエッジ.2つの Wingは共に使用されている.
Definition Brep.h:239
Vector< double > point
頂点の座標.
Definition Brep.h:260
BREP_EDGE * edge
Definition Brep.h:214
double Edge_Tolerance
Definition Tolerance.cpp:16
class DllExport BREP_WING
Definition Brep.h:37

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.

◆ ~BREP_EDGE()

~BREP_EDGE ( )
virtual

Definition at line 534 of file Brep.cpp.

535{
536 // BREP_EDGE: この Edge はまだ Contourで使われている!!
537 if (wing1->contour || wing2->contour) {
538 DEBUG_MODE PRINT_MESG("~BREP_EDGE: This Edge is still used!!\n");
539 }
540
541 delete wing1;
542 delete wing2;
543
544 if (edge_list!=NULL) {
545 BREP_EDGE_LIST::iterator iedge = std::find(edge_list->begin(), edge_list->end(), this);
546 if (iedge!=edge_list->end()) {
547 edge_list->erase(iedge);
548 }
549 if (edge_list->size()==1) {
550 (*(edge_list->begin()))->edge_list = NULL;
551 delete(edge_list);
552 }
553 }
554}
BREP_CONTOUR * contour
Definition Brep.h:215
#define PRINT_MESG(...)
環境依存用の出力関数.MS Windows用は未実装
Definition tools.h:469
#define DEBUG_MODE
Definition tools.h:502

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

Member Function Documentation

◆ CloseData()

void CloseData ( )

Definition at line 557 of file Brep.cpp.

558{
559 // M.Segal, SIGGRAPH '90 p105
560 double e = (wing1->vertex)->tolerance;
561 e = Max(e, (wing2->vertex)->tolerance);
562 tolerance = Max(e, tolerance);
563}
BREP_VERTEX * vertex
Start of Vertex.
Definition Brep.h:210
#define Max(x, y)
Definition common.h:247

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

Referenced by jbxl::CreateEdge().

Here is the caller graph for this function:

Member Data Documentation

◆ center

Vector<double> center

Definition at line 236 of file Brep.h.

Referenced by BREP_EDGE::BREP_EDGE().

◆ complete

◆ edge_list

◆ tolerance

double tolerance

Definition at line 240 of file Brep.h.

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

◆ wing1

◆ wing2


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