cgma
OctreeFacetPointData Class Reference

#include <OctreeFacetPointData.hpp>

List of all members.

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

Detailed Description

Definition at line 26 of file OctreeFacetPointData.hpp.


Constructor & Destructor Documentation

Definition at line 16 of file OctreeFacetPointData.cpp.

                                                                                    {
  xyz = coord;
  type = CUBIT_FACET_POINT_DATA_FACET;
  facetPtr = ptr_facet;
  num = calculate_id();
}

Definition at line 23 of file OctreeFacetPointData.cpp.

                                                                                             {
  xyz = coord;
  type = CUBIT_FACET_POINT_DATA_EDGE;
  facetEdgePtr = ptr_facet_edge;
  num = calculate_id();
}

Definition at line 30 of file OctreeFacetPointData.cpp.

Definition at line 33 of file OctreeFacetPointData.hpp.

{}

Member Function Documentation

Definition at line 10 of file OctreeFacetPointData.cpp.

                                            {
  static int count = -1;
  count++;
  return count;
}

Definition at line 35 of file OctreeFacetPointData.hpp.

{ return xyz; }

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;
  }

}

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.

{ return xyz.x(); }
double OctreeFacetPointData::y ( void  ) [inline]

Definition at line 37 of file OctreeFacetPointData.hpp.

{ return xyz.y(); }
double OctreeFacetPointData::z ( void  ) [inline]

Definition at line 38 of file OctreeFacetPointData.hpp.

{ return xyz.z(); }

Member Data Documentation

union { ... } [private]

Definition at line 58 of file OctreeFacetPointData.hpp.

Definition at line 59 of file OctreeFacetPointData.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines