moab
DrawDual::GVEntity Class Reference

List of all members.

Public Member Functions

 GVEntity ()
void reset (const int index)
int get_index (const EntityHandle dual_surf)

Public Attributes

int numGvizEntities
EntityHandle dualSurfs [3]
EntityHandle moabEntity
int pointPos [3][2]
int vtkEntityIds [4]
vtkActor * myActors [3]
void * gvizPoints [5]
void * gvizEdges [4]

Detailed Description

Definition at line 62 of file DrawDual.hpp.


Constructor & Destructor Documentation

Definition at line 74 of file DrawDual.hpp.

      {
        numGvizEntities = 0;
        dualSurfs[0] = dualSurfs[1] = dualSurfs[2] = 0;
        moabEntity = 0;
        pointPos[0][0] = pointPos[0][1] = pointPos[0][2] = 
          pointPos[1][0] = pointPos[1][1] = pointPos[1][2] = 0;
        vtkEntityIds[0] = vtkEntityIds[1] = vtkEntityIds[2] = vtkEntityIds[3] = -1;
        myActors[0] = myActors[1] = myActors[2] = NULL;
        gvizPoints[0] = gvizPoints[1] = gvizPoints[2] = gvizPoints[3] = 
          gvizPoints[4] = NULL;
        gvizEdges[0] = gvizEdges[1] = gvizEdges[2] = gvizEdges[3] = NULL;
      }

Member Function Documentation

int DrawDual::GVEntity::get_index ( const EntityHandle  dual_surf) [inline]

Definition at line 88 of file DrawDual.hpp.

      {
        if (dual_surf == dualSurfs[0]) return 0;
        else if (dual_surf == dualSurfs[1]) return 1;
        else if (dual_surf == dualSurfs[2]) return 2;
        else if (dualSurfs[0] == 0) return -1;
        else if (dualSurfs[1] == 0) return -2;
        else if (dualSurfs[2] == 0) return -3;
        else return -10;
      }
void DrawDual::GVEntity::reset ( const int  index)

Definition at line 2219 of file DrawDual.cpp.

{
  assert(index >= 0);
  dualSurfs[index] = 0;
  pointPos[index][0] = pointPos[index][1] = 0;
  vtkEntityIds[index] = -1;

  int dim = MBI->dimension_from_handle(moabEntity);
  
    // use gvizEdges to tell whether we're an edge or not
  if (0 == dim) {
    if (gvizPoints[index]) {
      if (useGraphviz)
        free(gvizPoints[index]);
      else 
        MBI->delete_entities((EntityHandle*)&gvizPoints[index], 1);
      gvizPoints[index] = NULL;
    }
  }
  else if (1 == dim) {
    vtkEntityIds[index+2] = -1;
    vtkEntityIds[index+3] = -1;
    if (gvizEdges[index]) {
      if (useGraphviz)
        free(gvizEdges[index]);
      else {
        assert(gvizEdges[index]);
        MBI->delete_entities((EntityHandle*)&gvizEdges[index], 1);
      }
      gvizEdges[index] = NULL;
    }
    if (gvizEdges[index+2]) {
      if (useGraphviz) {
        free(gvizEdges[index+2]);
        if (gvizPoints[index]) free(gvizPoints[index]);
      }
      else {
        assert(gvizEdges[index+2]);
        MBI->delete_entities((EntityHandle*)&gvizEdges[index+2], 1);
        if (gvizPoints[index])
          MBI->delete_entities((EntityHandle*)&gvizPoints[index], 1);
      }
      gvizEdges[index+2] = NULL;
      gvizPoints[index] = NULL;
    }
  }
  
  myActors[index] = NULL;
}

Member Data Documentation

Definition at line 72 of file DrawDual.hpp.

Definition at line 71 of file DrawDual.hpp.

Definition at line 70 of file DrawDual.hpp.

Definition at line 65 of file DrawDual.hpp.

Definition at line 68 of file DrawDual.hpp.

Definition at line 69 of file DrawDual.hpp.


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