ann2fig.cpp File Reference

#include <cstdio>
#include <fstream>
#include <string>
#include <ANN/ANNx.h>

Go to the source code of this file.

Defines

#define TRANS_X(p)   (offset_x + scale*(p[dim_x]))
#define TRANS_Y(p)   (offset_y - scale*(p[dim_y]))

Functions

void Error (char *msg, ANNerr level)
void getArgs (int argc, char **argv)
int main (int argc, char **argv)
ANNbool overlap (const ANNorthRect &box)
void readANN ()
void readTree (ANNorthRect &bnd_box)
void recReadTree (ANNorthRect &box)
void set_slice_val (double val)
void writeBox (const ANNorthRect &r)
void writeCaption (const ANNorthRect &bnd_box, char *caption)
void writeHeader ()
void writeLine (ANNpoint p0, ANNpoint p1)
void writePoint (ANNpoint p)

Variables

char caption [STRING_LEN]
const double DEF_SLICE_VAL = 0
int dim
int dim_x = 0
int dim_y = 1
const char DUMP_SUFFIX [] = {".dmp"}
const char FIG_HEAD [] = {"#FIG 3.1"}
const char FIG_SUFFIX [] = {".fig"}
char file_name [STRING_LEN]
ifstream ifile
double in_low_x = 1
double in_low_y = 1
double in_size = 5
char infile_name [STRING_LEN]
const int MAX_DIM = 1000
int n_pts
double offset_x
double offset_y
ofstream ofile
char outfile_name [STRING_LEN]
int pt_size = 10
ANNpointArray pts = NULL
double scale
double slice_val [MAX_DIM]
const int STRING_LEN = 500
double u_low_x = 1200
double u_low_y = 1200
double u_per_in = 1200
double u_size = 6000

Define Documentation

#define TRANS_X (  )     (offset_x + scale*(p[dim_x]))

Definition at line 88 of file ann2fig.cpp.

Referenced by writeBox(), writeCaption(), writeLine(), and writePoint().

#define TRANS_Y (  )     (offset_y - scale*(p[dim_y]))

Definition at line 89 of file ann2fig.cpp.

Referenced by writeBox(), writeCaption(), writeLine(), and writePoint().


Function Documentation

void Error ( char *  msg,
ANNerr  level 
)
void getArgs ( int  argc,
char **  argv 
)
int main ( int  argc,
char **  argv 
)

Definition at line 581 of file ann2fig.cpp.

References getArgs(), and readANN().

Referenced by Gui::PythonOnlineHelp::loadResource().

ANNbool overlap ( const ANNorthRect box  ) 

Definition at line 330 of file ann2fig.cpp.

References ANNfalse, ANNtrue, dim, dim_x, dim_y, ANNorthRect::hi, ANNorthRect::lo, and slice_val.

Referenced by recReadTree().

void readANN (  ) 
void readTree ( ANNorthRect bnd_box  ) 

Definition at line 462 of file ann2fig.cpp.

References caption, recReadTree(), writeBox(), writeCaption(), and writeHeader().

Referenced by readANN().

void recReadTree ( ANNorthRect box  ) 
void set_slice_val ( double  val  ) 

Definition at line 110 of file ann2fig.cpp.

References MAX_DIM, and slice_val.

Referenced by getArgs().

void writeBox ( const ANNorthRect r  ) 

Definition at line 275 of file ann2fig.cpp.

References ANNorthRect::hi, Py::int, ANNorthRect::lo, ofile, TRANS_X, and TRANS_Y.

Referenced by readTree(), and recReadTree().

void writeCaption ( const ANNorthRect bnd_box,
char *  caption 
)

Definition at line 306 of file ann2fig.cpp.

References Py::int, ANNorthRect::lo, ofile, px, TRANS_X, TRANS_Y, and u_per_in.

Referenced by readTree().

void writeHeader (  ) 

Definition at line 254 of file ann2fig.cpp.

References FIG_HEAD, Py::int, ofile, and u_per_in.

Referenced by readTree(), and MeshGui::SoFCMeshNode::write().

void writeLine ( ANNpoint  p0,
ANNpoint  p1 
)

Definition at line 292 of file ann2fig.cpp.

References Py::int, ofile, TRANS_X, and TRANS_Y.

Referenced by recReadTree().

void writePoint ( ANNpoint  p  ) 

Definition at line 263 of file ann2fig.cpp.

References Py::int, ofile, pt_size, TRANS_X, and TRANS_Y.

Referenced by recReadTree().


Variable Documentation

Definition at line 64 of file ann2fig.cpp.

Referenced by getArgs(), and readTree().

const double DEF_SLICE_VAL = 0

Definition at line 56 of file ann2fig.cpp.

Referenced by getArgs().

int dim
int dim_x = 0

Definition at line 67 of file ann2fig.cpp.

Referenced by getArgs(), overlap(), readANN(), and recReadTree().

int dim_y = 1

Definition at line 68 of file ann2fig.cpp.

Referenced by getArgs(), overlap(), readANN(), and recReadTree().

const char DUMP_SUFFIX[] = {".dmp"}

Definition at line 58 of file ann2fig.cpp.

Referenced by getArgs().

const char FIG_HEAD[] = {"#FIG 3.1"}

Definition at line 57 of file ann2fig.cpp.

Referenced by writeHeader().

const char FIG_SUFFIX[] = {".fig"}

Definition at line 59 of file ann2fig.cpp.

Referenced by getArgs().

Definition at line 61 of file ann2fig.cpp.

Referenced by getArgs().

ifstream ifile

Definition at line 66 of file ann2fig.cpp.

Referenced by getArgs(), readANN(), and recReadTree().

double in_low_x = 1

Definition at line 72 of file ann2fig.cpp.

Referenced by getArgs().

double in_low_y = 1

Definition at line 73 of file ann2fig.cpp.

Referenced by getArgs().

double in_size = 5

Definition at line 71 of file ann2fig.cpp.

Referenced by getArgs().

Definition at line 62 of file ann2fig.cpp.

Referenced by getArgs().

const int MAX_DIM = 1000

Definition at line 55 of file ann2fig.cpp.

Referenced by getArgs(), and set_slice_val().

int n_pts
double offset_x

Definition at line 84 of file ann2fig.cpp.

Referenced by readANN().

double offset_y

Definition at line 85 of file ann2fig.cpp.

Referenced by readANN().

ofstream ofile

Definition at line 63 of file ann2fig.cpp.

Referenced by getArgs().

int pt_size = 10

Definition at line 77 of file ann2fig.cpp.

Referenced by getArgs(), and writePoint().

double scale
double slice_val[MAX_DIM]

Definition at line 69 of file ann2fig.cpp.

Referenced by getArgs(), overlap(), and set_slice_val().

const int STRING_LEN = 500

Definition at line 54 of file ann2fig.cpp.

Referenced by annReadDump(), annReadTree(), main(), readANN(), and recReadTree().

double u_low_x = 1200

Definition at line 75 of file ann2fig.cpp.

Referenced by getArgs(), and readANN().

double u_low_y = 1200

Definition at line 76 of file ann2fig.cpp.

Referenced by getArgs(), and readANN().

double u_per_in = 1200

Definition at line 70 of file ann2fig.cpp.

Referenced by getArgs(), writeCaption(), and writeHeader().

double u_size = 6000

Definition at line 74 of file ann2fig.cpp.

Referenced by getArgs(), and readANN().


Generated on Wed Nov 23 19:01:12 2011 for FreeCAD by  doxygen 1.6.1