BREP_VERTEX Class Reference

#include <Brep.h>

Collaboration diagram for BREP_VERTEX:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 BREP_VERTEX ()
virtual ~BREP_VERTEX ()
void CloseData ()
void DisconnectWing (BREP_WING *wing)
void ComputeNormal ()
void ComputeTolerance ()

Public Attributes

BREP_WING_LIST wing_list
Vector< double > point
 頂点の座標.
Vector< double > normal
 法線ベクトル.周りの Contour の法線ベクトルの平均.
UVMap< double > uvmap
 曲面のUV座標
long int index
 シーケンシャルに増加する一意的な番号.Octree に格納されるときに設定される.
bool calc_normal
 normal を計算するか? しない場合は入力値を使用する.
double distance2
double tolerance
BREP_VERTEX_LISTforbidden_list
 お互いに Edgeを張ることを禁止された Vertexの List

Detailed Description

Definition at line 257 of file Brep.h.


Constructor & Destructor Documentation

BREP_VERTEX (  ) 

Definition at line 605 of file Brep.cpp.

References jbxl::Abs_Vertex_Tolerance, BREP_VERTEX::calc_normal, BREP_VERTEX::distance2, BREP_VERTEX::forbidden_list, BREP_VERTEX::index, and BREP_VERTEX::tolerance.

00606 {
00607     // Vector類は宣言された時に,既に初期化されている.
00608 
00609     index           = -1;
00610     calc_normal     = true;
00611     tolerance       = Abs_Vertex_Tolerance;
00612 
00613     forbidden_list  = NULL;
00614     distance2       = HUGE_VALF;
00615 }

~BREP_VERTEX (  )  [virtual]

Definition at line 619 of file Brep.cpp.

References DEBUG_MODE, BREP_VERTEX::forbidden_list, PRINT_MESG, and BREP_VERTEX::wing_list.

00620 {
00621     // Wingリストがまだ空でない!!
00622     if (!wing_list.empty()) {
00623         DEBUG_MODE PRINT_MESG("~BREP_VERTEX:  List of Wing is not empty!!\n");
00624     }
00625 
00626     if (forbidden_list!=NULL) {
00627         forbidden_list->clear();
00628         delete(forbidden_list);
00629     }
00630 }


Member Function Documentation

void CloseData ( void   ) 

Definition at line 683 of file Brep.cpp.

References BREP_VERTEX::ComputeTolerance().

Referenced by jbxl::CreateContourByVector().

00684 {
00685     ComputeTolerance();
00686 }

Here is the call graph for this function:

Here is the caller graph for this function:

void ComputeNormal (  ) 

void BREP_VERTEX::ComputeNormal()

Vertexの法線ベクトルを計算する.
Vertexの周りの Contourの法線ベクトルの加算平均を計算する

Definition at line 657 of file Brep.cpp.

References BREP_WING::contour, BREP_CONTOUR::facet, BREP_VERTEX::normal, Vector< T >::normalize(), and BREP_VERTEX::wing_list.

Referenced by OctreeNode::ComputeVerticesNormal().

00658 {
00659     normal = Vector<double>(0.0, 0.0, 0.0);
00660 
00661     BREP_WING_LIST::iterator iwing;
00662     for (iwing=wing_list.begin(); iwing!=wing_list.end(); iwing++) {
00663         BREP_WING* wing = *iwing;
00664         normal = normal + (wing->contour->facet)->normal;
00665     }
00666     normal.normalize();
00667 }

Here is the call graph for this function:

Here is the caller graph for this function:

void ComputeTolerance (  ) 

Definition at line 671 of file Brep.cpp.

References jbxl::Abs_Vertex_Tolerance, Max, BREP_VERTEX::point, BREP_VERTEX::tolerance, jbxl::Vertex_Tolerance, Vector< T >::x, Xabs, Vector< T >::y, and Vector< T >::z.

Referenced by BREP_VERTEX::CloseData().

00672 {
00673     double max = Xabs(point.x);
00674     max = Max(max, Xabs(point.y));
00675     max = Max(max, Xabs(point.z));
00676 
00677     tolerance = Vertex_Tolerance * max;                  // 相対
00678     tolerance = Max(tolerance, Abs_Vertex_Tolerance);    // 絶対
00679 }

Here is the caller graph for this function:

void DisconnectWing ( BREP_WING wing  ) 

Definition at line 635 of file Brep.cpp.

References DEBUG_MODE, PRINT_MESG, and BREP_VERTEX::wing_list.

Referenced by jbxl::DestroyWing().

00636 {
00637     BREP_WING_LIST::iterator iwing;
00638     //
00639     iwing = std::find(wing_list.begin(), wing_list.end(), wing);
00640     if (iwing==wing_list.end()) {
00641         // この Wingは Vertexと接続していません!!
00642         DEBUG_MODE PRINT_MESG("DisconnectWing: This Wing does not connect with Vertex!!\n");
00643         return;
00644     }
00645 
00646     wing_list.erase(iwing);
00647 }

Here is the caller graph for this function:


Member Data Documentation

double distance2
long int index
Vector<double> normal
Vector<double> point
double tolerance
UVMap<double> uvmap

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