cgma
PST_Point Class Reference

#include <PST_Data.hpp>

Inheritance diagram for PST_Point:
CubitVector PST_Entity

List of all members.

Public Member Functions

 PST_Point (const CubitVector &position)
 ~PST_Point ()
PST_Edgeedge ()
PST_Edgenext (PST_Edge *prev)
PST_Edgecommon (PST_Point *pt)
int faces (DLIList< PST_Face * > *list=0)
void debug_draw (int color=1, bool flush=true)
int validate (CubitBoolean print=CUBIT_FALSE)
void print ()

Static Public Member Functions

static void debug_draw_points (DLIList< PST_Point * > &list, int color, bool flush=true)

Public Attributes

int mark
int sequence

Private Attributes

cBit private_mark_: 1
PST_Edgeedge_

Friends

class PST_Edge

Detailed Description

Definition at line 68 of file PST_Data.hpp.


Constructor & Destructor Documentation

PST_Point::PST_Point ( const CubitVector position) [inline]

Definition at line 74 of file PST_Data.hpp.

      : CubitVector( position ),
        mark(0), private_mark_(false), edge_(0)
      { }

Definition at line 18 of file PST_Data.cpp.

{
  while( edge_ )
    delete edge_;
}

Member Function Documentation

Definition at line 24 of file PST_Data.cpp.

{
  if( edge_ )
  {
#ifndef NDEBUG
    int debug = 0;
#endif
    
    PST_Edge* e = edge_;
    do
    {
      if( e->other(pt) == this )
        return e;
      e = next( e );  
    
#ifndef NDEBUG
      assert( ++debug < PST_MAX_LIST_LEN );
#endif
    } while( e && e != edge_ );
  }
  return 0;
}
void PST_Point::debug_draw ( int  color = 1,
bool  flush = true 
)

Definition at line 613 of file PST_Data.cpp.

{
  GfxDebug::draw_point( float(x()), float(y()), float(z()), color );
  if( flush ) 
    GfxDebug::flush();
}
void PST_Point::debug_draw_points ( DLIList< PST_Point * > &  list,
int  color,
bool  flush = true 
) [static]

Definition at line 718 of file PST_Data.cpp.

{
  for( int p = point_list.size(); p--; )
    point_list.get_and_step()->debug_draw(color, false);
  if( flush ) GfxDebug::flush();
}
PST_Edge* PST_Point::edge ( ) [inline]

Definition at line 83 of file PST_Data.hpp.

      { return edge_; }
int PST_Point::faces ( DLIList< PST_Face * > *  list = 0)

Definition at line 48 of file PST_Data.cpp.

{
  int count = 0;
  if( edge() )
  {
    PST_Edge* e = edge();
    do
    {
      if (e->forward()->face())
        e->forward()->face()->private_mark_ = true;
      if (e->reverse()->face())
        e->reverse()->face()->private_mark_ = true;
      e = e->next(this);
    } while( e != edge() );
    
    do
    {
      if( e->forward()->face() && e->forward()->face()->private_mark_ )
      {
        count++;
        e->forward()->face()->private_mark_ = false;
        if( list ) list->append(e->forward()->face());
      }
      if( e->reverse()->face() && e->reverse()->face()->private_mark_ )
      {
        count++;
        e->reverse()->face()->private_mark_ = false;
        if( list ) list->append(e->reverse()->face());
      }
      e = e->next(this);
    } while( e != edge() );
  }      
  
  return count;
}
PST_Edge * PST_Point::next ( PST_Edge prev) [inline]

Definition at line 462 of file PST_Data.hpp.

{ 
  return prev->next(this);
}
void PST_Point::print ( )

Definition at line 1239 of file PST_Data.cpp.

{
  PRINT_INFO("Point %p : ( %f, %f, %f )", (void*)this , x(), y(), z() );
  
  if( edge_ )
  {
    PRINT_INFO("  Edges:");
    int count = 0;
    PST_Edge* edge = edge_;
    do 
    {
      if( count )
      {
        PRINT_INFO("\t%8p", (void*)edge);
      }
      else
      {
        PRINT_INFO("\n\t%8p", (void*)edge);
      }
      
      count = (count + 1) % 4;
      edge = edge->next(this);
    
    } while( edge && edge != edge_ );
    
  }
  PRINT_INFO("\n");
}

Definition at line 1016 of file PST_Data.cpp.

{
  if( edge_ && !edge_->other(this) )
  {
    if( print )
    {
      PRINT_INFO("Bad point->edge link.  Point %p, Edge %p.\n", (void*)this, (void*)edge_);
    }
    return 1;
  }
  return 0;
}

Friends And Related Function Documentation

friend class PST_Edge [friend]

Definition at line 70 of file PST_Data.hpp.


Member Data Documentation

Definition at line 109 of file PST_Data.hpp.

Definition at line 102 of file PST_Data.hpp.

Definition at line 107 of file PST_Data.hpp.

Definition at line 104 of file PST_Data.hpp.


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