cgma
FaceterPointData Class Reference

#include <FaceterPointData.hpp>

Inheritance diagram for FaceterPointData:
CubitPoint FacetEntity ToolDataUser

List of all members.

Public Member Functions

 FaceterPointData (double x_val, double y_val, double z_val)
 FaceterPointData (const CubitVector &new_point)
 ~FaceterPointData ()
 SetDynamicMemoryAllocation (memoryManager) int id()
void set_interior_angle (double angle)
double get_interior_angle ()
void set_prev (FaceterPointData *prev)
FaceterPointDataget_prev ()
void set_next (FaceterPointData *next)
FaceterPointDataget_next ()
double x ()
double y ()
double z ()
void set (const CubitVector &pos)
void marked (int marked)
int marked ()
CubitVector coordinates () const
void coordinates (double point_array[3])
void owner (RefEntity *my_owner)
RefEntityowner ()
void add_facet (CubitFacet *facet)
void remove_facet (CubitFacet *facet)
int num_adj_facets ()
void facets (DLIList< CubitFacet * > &facet_list)
void edges (DLIList< CubitFacetEdge * > &edge_list)
void points (DLIList< CubitPoint * > &point_list)
void compute_avg_normal ()

Static Public Member Functions

static int sort_by_angle (FaceterPointData *&pt_1, FaceterPointData *&pt_2)

Private Attributes

CubitVector coords
DLIList< CubitFacet * > * attachedFacets
RefEntitymyOwner
FaceterPointDatamNext
FaceterPointDatamPrev
double myInteriorAngle
int entityId

Static Private Attributes

static MemoryManager memoryManager

Detailed Description

Definition at line 34 of file FaceterPointData.hpp.


Constructor & Destructor Documentation

FaceterPointData::FaceterPointData ( double  x_val,
double  y_val,
double  z_val 
)

Definition at line 19 of file FaceterPointData.cpp.

  : coords( x_val, y_val, z_val )
{
  attachedFacets = NULL;
  point_counter++;
  entityId = point_counter;
  myOwner = NULL;
  myInteriorAngle = CUBIT_DBL_MAX;
  mPrev = NULL;
  mNext = NULL;
}

Definition at line 39 of file FaceterPointData.cpp.

  : coords( new_point )
{
  attachedFacets = NULL;
  point_counter++;
  entityId = point_counter;
  myOwner = NULL;
  myInteriorAngle = CUBIT_DBL_MAX;
  mPrev = NULL;
  mNext = NULL;
}

Definition at line 59 of file FaceterPointData.cpp.

{
  delete attachedFacets;
}

Member Function Documentation

void FaceterPointData::add_facet ( CubitFacet facet) [virtual]

Implements CubitPoint.

Definition at line 87 of file FaceterPointData.cpp.

{
  if ( attachedFacets == NULL )
    attachedFacets = new DLIList<CubitFacet*>(8);
  attachedFacets->append(facet);
  return;
}

Reimplemented from CubitPoint.

CubitVector FaceterPointData::coordinates ( void  ) const [inline, virtual]

Implements CubitPoint.

Definition at line 88 of file FaceterPointData.hpp.

{ return coords; }
void FaceterPointData::coordinates ( double  point_array[3]) [virtual]

Implements CubitPoint.

Definition at line 72 of file FaceterPointData.cpp.

{
  point_array[0] = coords.x();
  point_array[1] = coords.y();
  point_array[2] = coords.z();
}
void FaceterPointData::edges ( DLIList< CubitFacetEdge * > &  edge_list) [virtual]

Implements CubitPoint.

Definition at line 119 of file FaceterPointData.cpp.

{
  int ii, jj, kk;
  CubitFacet *facet_ptr;
  CubitFacetEdge *edge_ptr, *check_edge_ptr;
  for (ii=0; ii<attachedFacets->size(); ii++)
  {
    facet_ptr = attachedFacets->get_and_step();
    for (jj=0; jj<3; jj++)
    {
      edge_ptr = facet_ptr->edge( jj );
      if (edge_ptr)
      {
        if (edge_ptr->point(0) == this ||
          edge_ptr->point(1) == this)
        {
          int found = 0;
          for (kk=0; kk<edge_list.size() && !found; kk++)
          {
            check_edge_ptr = edge_list.get_and_step();
            if (check_edge_ptr == edge_ptr)
              found = 1;
          }
          if (!found)
          {
            edge_list.append( edge_ptr );
          }
        }
      }
    }
  }
  
  return;
}
void FaceterPointData::facets ( DLIList< CubitFacet * > &  facet_list) [inline, virtual]

Implements CubitPoint.

Definition at line 98 of file FaceterPointData.hpp.

    { if (attachedFacets) facet_list += *attachedFacets; }

Definition at line 66 of file FaceterPointData.hpp.

    {return myInteriorAngle;}

Definition at line 74 of file FaceterPointData.hpp.

    {return mNext;}

Definition at line 70 of file FaceterPointData.hpp.

    {return mPrev;}
void FaceterPointData::marked ( int  marked) [inline, virtual]

Reimplemented from CubitPoint.

Definition at line 84 of file FaceterPointData.hpp.

int FaceterPointData::marked ( ) [inline, virtual]

Reimplemented from CubitPoint.

Definition at line 85 of file FaceterPointData.hpp.

{return markedFlag;}

Implements CubitPoint.

Definition at line 162 of file FaceterPointData.cpp.

{ 
  if (attachedFacets == NULL)
    return 0;
  else
    return attachedFacets->size(); 
}
void FaceterPointData::owner ( RefEntity my_owner) [inline]

Definition at line 90 of file FaceterPointData.hpp.

    {myOwner = my_owner;}

Definition at line 92 of file FaceterPointData.hpp.

    {return myOwner;}
void FaceterPointData::points ( DLIList< CubitPoint * > &  point_list) [inline, virtual]

Implements CubitPoint.

Definition at line 101 of file FaceterPointData.hpp.

    { point_list.append( this ); }
void FaceterPointData::remove_facet ( CubitFacet facet) [virtual]

Implements CubitPoint.

Definition at line 103 of file FaceterPointData.cpp.

{
  if ( attachedFacets == NULL )
    return;
  attachedFacets->remove(facet);
  return;
}
void FaceterPointData::set ( const CubitVector pos) [inline, virtual]

Implements CubitPoint.

Definition at line 82 of file FaceterPointData.hpp.

{ coords = pos; }
void FaceterPointData::set_interior_angle ( double  angle) [inline]

Definition at line 64 of file FaceterPointData.hpp.

    {myInteriorAngle = angle;}
void FaceterPointData::set_next ( FaceterPointData next) [inline]

Definition at line 72 of file FaceterPointData.hpp.

    {mNext = next;}
void FaceterPointData::set_prev ( FaceterPointData prev) [inline]

Definition at line 68 of file FaceterPointData.hpp.

    {mPrev = prev;}

Definition at line 55 of file FaceterPointData.hpp.

          { return entityId;}
int FaceterPointData::sort_by_angle ( FaceterPointData *&  pt_1,
FaceterPointData *&  pt_2 
) [static]

Definition at line 170 of file FaceterPointData.cpp.

{
  if ( (pt_1->get_interior_angle() > pt_2->get_interior_angle() ) )
    return -1;
  if ( (pt_2->get_interior_angle() < pt_2->get_interior_angle() ) )
    return 1;
  else
    return 0;
}
double FaceterPointData::x ( void  ) [inline, virtual]

Implements CubitPoint.

Definition at line 79 of file FaceterPointData.hpp.

{return coords.x();}
double FaceterPointData::y ( void  ) [inline, virtual]

Implements CubitPoint.

Definition at line 80 of file FaceterPointData.hpp.

{return coords.y();}
double FaceterPointData::z ( void  ) [inline, virtual]

Implements CubitPoint.

Definition at line 81 of file FaceterPointData.hpp.

{return coords.z();}

Member Data Documentation

Definition at line 38 of file FaceterPointData.hpp.

Definition at line 47 of file FaceterPointData.hpp.

Definition at line 44 of file FaceterPointData.hpp.

Definition at line 41 of file FaceterPointData.hpp.

Definition at line 41 of file FaceterPointData.hpp.

Definition at line 42 of file FaceterPointData.hpp.

Definition at line 40 of file FaceterPointData.hpp.


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