#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 |
Definition at line 88 of file ann2fig.cpp.
Referenced by writeBox(), writeCaption(), writeLine(), and writePoint().
Definition at line 89 of file ann2fig.cpp.
Referenced by writeBox(), writeCaption(), writeLine(), and writePoint().
void Error | ( | char * | msg, | |
ANNerr | level | |||
) |
Definition at line 95 of file ann2fig.cpp.
References ANNabort.
Referenced by doValidation(), generatePts(), getArgs(), main(), readANN(), readPts(), recReadTree(), and Robot::RobotObject::RobotObject().
void getArgs | ( | int | argc, | |
char ** | argv | |||
) |
Definition at line 144 of file ann2fig.cpp.
References ANNabort, ANNfalse, ANNtrue, caption, DEF_SLICE_VAL, dim_x, dim_y, DUMP_SUFFIX, Error(), FIG_SUFFIX, file_name, ifile, in_low_x, in_low_y, in_size, infile_name, MAX_DIM, ofile, outfile_name, pt_size, set_slice_val(), slice_val, u_low_x, u_low_y, u_per_in, and u_size.
Referenced by main().
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 | ( | ) |
Definition at line 512 of file ann2fig.cpp.
References ANNabort, annAllocPts(), dim, dim_x, dim_y, Error(), ANNorthRect::hi, ifile, ANNorthRect::lo, n_pts, offset_x, offset_y, pts, readTree(), scale, STRING_LEN, u_low_x, u_low_y, and u_size.
Referenced by main().
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 | ) |
Definition at line 375 of file ann2fig.cpp.
References ANNabort, ANNwarn, dim, dim_x, dim_y, Error(), ANNorthRect::hi, ifile, ANNorthRect::lo, n_pts, overlap(), ANNorthHalfSpace::project(), pts, STRING_LEN, writeBox(), writeLine(), and writePoint().
Referenced by readTree().
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().
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().
char caption[STRING_LEN] |
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 |
Definition at line 79 of file ann2fig.cpp.
Referenced by getArgs(), main(), overlap(), Gui::View3DInventorViewer::printDimension(), printPt(), readANN(), readPt(), recReadTree(), ANNkd_tree::theDim(), and ANNbruteForce::theDim().
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().
char file_name[STRING_LEN] |
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().
char infile_name[STRING_LEN] |
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 |
Definition at line 80 of file ann2fig.cpp.
Referenced by annReadTree(), ANNkd_tree::nPoints(), ANNbruteForce::nPoints(), readANN(), and recReadTree().
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 65 of file ann2fig.cpp.
Referenced by Raytracing::RayProject::execute(), Drawing::FeaturePage::execute(), getArgs(), writeBox(), writeCaption(), writeHeader(), writeLine(), and writePoint().
char outfile_name[STRING_LEN] |
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().
ANNpointArray pts = NULL |
Definition at line 81 of file ann2fig.cpp.
Referenced by Inspection::Feature::execute(), Mesh::FacetPy::getPoints(), Points::Feature::onChanged(), readANN(), recReadTree(), ANNkd_tree::thePoints(), ANNbruteForce::thePoints(), MeshCore::EarClippingTriangulator::Triangulate(), and InspectionGui::ViewProviderInspection::updateData().
double scale |
Definition at line 83 of file ann2fig.cpp.
Referenced by StdCmdAxisCross::activated(), Gui::NavigationStyle::boxZoom(), KDL::SVD_HH::calculate(), SketcherGui::SoDatumLabel::computeBBox(), SketcherGui::ViewProviderSketch::draw(), Part::Ellipsoid::execute(), SketcherGui::SoDatumLabel::generatePrimitives(), Part::TopoShape::getTransform(), Base::Rotation::getValue(), SketcherGui::SoDatumLabel::GLRender(), Gui::SoShapeScale::GLRender(), Part::Part2DObject::positionBySupport(), projectToDXF(), projectToSVG(), readANN(), Gui::ViewProviderGeometryObject::setEdit(), Base::Rotation::setValue(), MeshCore::MeshSmoothing::Smooth(), Gui::SoShapeScale::SoShapeScale(), PartGui::ViewProviderEllipsoid::updateData(), RotTransDragger::valueChangedCB(), and DrawingGui::SvgView::wheelEvent().
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.
double u_low_y = 1200 |
Definition at line 76 of file ann2fig.cpp.
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.