|
cgma
|
#include "PartSurfFacetTool.hpp"#include "CubitMessage.hpp"#include "DLIList.hpp"#include "GeometryQueryEngine.hpp"#include "PartitionSurface.hpp"#include "PartitionCurve.hpp"#include "PartitionPoint.hpp"#include "TDVGFacetOwner.hpp"#include "CubitFacetData.hpp"#include "CubitFacetEdgeData.hpp"#include "CubitPointData.hpp"#include "RefVertex.hpp"#include "RefEdge.hpp"#include "GfxDebug.hpp"#include "GMem.hpp"Go to the source code of this file.
Functions | |
| static void | draw_edges (DLIList< CubitFacetEdge * > &edges, int edge_color=0, bool label_edges=false, bool draw_points=false, int point_color=0, bool label_points=false) |
| static void draw_edges | ( | DLIList< CubitFacetEdge * > & | edges, |
| int | edge_color = 0, |
||
| bool | label_edges = false, |
||
| bool | draw_points = false, |
||
| int | point_color = 0, |
||
| bool | label_points = false |
||
| ) | [static] |
Definition at line 500 of file PartSurfFacetTool.cpp.
{
char buffer[2*sizeof(void*)+3];
if (edge_color == 0)
edge_color = CUBIT_WHITE_INDEX;
if (point_color == 0)
point_color = CUBIT_WHITE_INDEX;
for (int i = edges.size(); i--; )
{
CubitFacetEdge* edge = edges.get_and_step();
CubitVector start = edge->point(0)->coordinates();
CubitVector end = edge->point(1)->coordinates();
GfxDebug::draw_line(start, end, edge_color );
if (label_edges)
{
CubitVector mid = 0.5 * (start + end);
sprintf(buffer, "%p", (void*)edge);
float x = (float)mid.x();
float y = (float)mid.y();
float z = (float)mid.z();
GfxDebug::draw_label( buffer, x, y, z, edge_color );
}
for ( int j = 0; j < 2; j++ )
{
CubitPoint* point = edge->point(j);
float x = (float)point->coordinates().x();
float y = (float)point->coordinates().y();
float z = (float)point->coordinates().z();
if (draw_points)
{
GfxDebug::draw_point( x, y, z, point_color );
}
if (label_points)
{
sprintf(buffer, "%p", (void*)point);
GfxDebug::draw_label( buffer, x, y, z, point_color );
}
}
}
GfxDebug::flush();
}