|
cgma
|
#include <OctreeFacetPointData.hpp>
Public Member Functions | |
| OctreeFacetPointData (CubitVector coord, CubitFacet *ptr_facet) | |
| OctreeFacetPointData (CubitVector coord, CubitFacetEdge *ptr_facet_edge) | |
| OctreeFacetPointData (CubitVector coord, CubitPoint *ptr_point) | |
| ~OctreeFacetPointData () | |
| CubitVector | coordinates (void) |
| double | x (void) |
| double | y (void) |
| double | z (void) |
| int | calculate_id (void) |
| int | id (void) |
| void | display (void) |
Static Public Member Functions | |
| static CubitBoolean | generate_facet_point_data_at_slender_facet (CubitFacet *ptr_facet, DLIList< OctreeFacetPointData * > &facet_point_data_list) |
| static CubitBoolean | generate_facet_point_data_based_on_curvature (CubitFacetEdge *ptr_facet_edge, DLIList< OctreeFacetPointData * > &facet_point_data_list) |
Private Attributes | |
| union { | |
| CubitFacet * facetPtr | |
| CubitFacetEdge * facetEdgePtr | |
| CubitPoint * facetPointPtr | |
| }; | |
| int | num |
| CubitVector | xyz |
| OctreeFacetPointDataType | type |
Definition at line 26 of file OctreeFacetPointData.hpp.
| OctreeFacetPointData::OctreeFacetPointData | ( | CubitVector | coord, |
| CubitFacet * | ptr_facet | ||
| ) |
Definition at line 16 of file OctreeFacetPointData.cpp.
{
xyz = coord;
type = CUBIT_FACET_POINT_DATA_FACET;
facetPtr = ptr_facet;
num = calculate_id();
}
| OctreeFacetPointData::OctreeFacetPointData | ( | CubitVector | coord, |
| CubitFacetEdge * | ptr_facet_edge | ||
| ) |
Definition at line 23 of file OctreeFacetPointData.cpp.
{
xyz = coord;
type = CUBIT_FACET_POINT_DATA_EDGE;
facetEdgePtr = ptr_facet_edge;
num = calculate_id();
}
| OctreeFacetPointData::OctreeFacetPointData | ( | CubitVector | coord, |
| CubitPoint * | ptr_point | ||
| ) |
Definition at line 30 of file OctreeFacetPointData.cpp.
{
xyz = coord;
type = CUBIT_FACET_POINT_DATA_POINT;
facetPointPtr = ptr_point;
num = calculate_id();
}
| OctreeFacetPointData::~OctreeFacetPointData | ( | ) | [inline] |
Definition at line 33 of file OctreeFacetPointData.hpp.
{}
| int OctreeFacetPointData::calculate_id | ( | void | ) |
Definition at line 10 of file OctreeFacetPointData.cpp.
{
static int count = -1;
count++;
return count;
}
| CubitVector OctreeFacetPointData::coordinates | ( | void | ) | [inline] |
Definition at line 35 of file OctreeFacetPointData.hpp.
{ return xyz; }
| void OctreeFacetPointData::display | ( | void | ) |
Definition at line 74 of file OctreeFacetPointData.cpp.
{
switch( type ){
case CUBIT_FACET_POINT_DATA_POINT:
//SVDrawTool::draw_point( xyz, CUBIT_BLUE_INDEX );
break;
case CUBIT_FACET_POINT_DATA_EDGE:
//SVDrawTool::draw_point( xyz, CUBIT_YELLOW_INDEX );
break;
case CUBIT_FACET_POINT_DATA_FACET:
//SVDrawTool::draw_point( xyz, CUBIT_GREEN_INDEX );
break;
default:
break;
}
}
| static CubitBoolean OctreeFacetPointData::generate_facet_point_data_at_slender_facet | ( | CubitFacet * | ptr_facet, |
| DLIList< OctreeFacetPointData * > & | facet_point_data_list | ||
| ) | [static] |
| CubitBoolean OctreeFacetPointData::generate_facet_point_data_based_on_curvature | ( | CubitFacetEdge * | ptr_facet_edge, |
| DLIList< OctreeFacetPointData * > & | facet_point_data_list | ||
| ) | [static] |
Definition at line 37 of file OctreeFacetPointData.cpp.
{
CubitFacet *ptr_adj_facet0 = ptr_facet_edge->adj_facet(0);
CubitFacet *ptr_adj_facet1 = ptr_facet_edge->adj_facet(1);
// Find minimum edge length
int i;
double edge_len, min_edge_len = CUBIT_DBL_MAX;
for( i = 0; i < 3; i++ ){
edge_len = ptr_adj_facet0->edge(i)->length();
if( edge_len < min_edge_len ){
min_edge_len = edge_len;
}
}
for( i = 0; i < 3; i++ ){
edge_len = ptr_adj_facet1->edge(i)->length();
if( edge_len < min_edge_len ){
min_edge_len = edge_len;
}
}
int num_seg = (int)(ptr_facet_edge->length() / min_edge_len) + 1;
// For triangles with high aspect ratio the number of segments can be enormous. Limit
// the number of segments.
if(num_seg > 100)
num_seg = 100;
OctreeFacetPointData *facet_point_data;
for( i = 1; i < num_seg; i++ ){
facet_point_data = new OctreeFacetPointData( (ptr_facet_edge->point(0)->coordinates() * (num_seg - i) + ptr_facet_edge->point(1)->coordinates() * (i)) / num_seg , ptr_facet_edge );
facet_point_data_list.push( facet_point_data );
}
return CUBIT_TRUE;
}
| int OctreeFacetPointData::id | ( | void | ) | [inline] |
Definition at line 41 of file OctreeFacetPointData.hpp.
{ return num; }
| double OctreeFacetPointData::x | ( | void | ) | [inline] |
Definition at line 36 of file OctreeFacetPointData.hpp.
| double OctreeFacetPointData::y | ( | void | ) | [inline] |
Definition at line 37 of file OctreeFacetPointData.hpp.
| double OctreeFacetPointData::z | ( | void | ) | [inline] |
Definition at line 38 of file OctreeFacetPointData.hpp.
union { ... } [private] |
Definition at line 54 of file OctreeFacetPointData.hpp.
Definition at line 55 of file OctreeFacetPointData.hpp.
Definition at line 53 of file OctreeFacetPointData.hpp.
int OctreeFacetPointData::num [private] |
Definition at line 58 of file OctreeFacetPointData.hpp.
Definition at line 60 of file OctreeFacetPointData.hpp.
CubitVector OctreeFacetPointData::xyz [private] |
Definition at line 59 of file OctreeFacetPointData.hpp.