ivutils
Loading...
Searching...
No Matches
gnudump.h File Reference

Classes used to record information about vectors / contours / bodies to text files in gnuplot format (for visualization) More...

#include <string>
#include <vector>
#include <utility>
#include "vector_set.h"
#include "region_3.h"
Include dependency graph for gnudump.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  interp_t< num >
 interpolation of num-dimensional body in our model 2D bodies are interpolated by VecContour<2> and 3D bodies are interpolated by array of Polyhedron_3 More...
 
class  RegDumper< N >
 abstract class with Dump and InterpolateRegion functionality More...
 
class  RegionDumper< reg_t >
 implementation of RegDumper for particular body More...
 
class  GnuDumper
 test class to dump bodies More...
 
struct  apDuplConfig
 configuration for setting elementary cell duplication in dumps More...
 

Functions

template<int N>
int Dump (FILE *f, const Vector_Nt< vec_type, N > &p, bool eol=true)
 records vector coordinates in text file
 
template<int N>
int Dump (FILE *f, const std::pair< Vector_Nt< vec_type, N >, Vector_Nt< vec_type, N > > &p)
 records coordinates of two vectors in text file used to plot vectors by gnuplot using option 'w vec'
 
template<class contour_t >
int DumpContour (FILE *f, const contour_t &cnt, int first=0, bool deltas=false)
 records sequence contour vertices to text file first vertex is recorded twice as it is required by gnuplot format if first<>0 records line with text file column description deltas means print delta column to draw with vectors
 
template<class contour_t >
int DumpContours (FILE *f, const std::vector< contour_t > &cnt, int first=0)
 calls DumpContour for each contour if first<>0 records line with text file column description
 
template<class vset_t >
int DumpVectorSet (FILE *f, const vset_t *vset, const VecTransform *trans=NULL, int firstsep=0)
 records sequence of vectors bit flags firstsep : 1- put legend, 2- put single separator at end

 
int DumpDirections (FILE *f, int n, const Vector_3 *origin, const Vector_3 *k, const Box *B=NULL, int first=0)
 records sequence of unit vectors defined by their origins and directions k Box size is used to normalize direction k (if B!=NULL) in order to keep vector inside the box if first<>0 records line with text file column description
 
template<class reg_t >
interp_t< reg_t::dimension > InterpolateRegion (const reg_t *reg)
 interpolates region for dumping by default region is interpolated by nothing
 
template<class reg_t >
interp_t< reg_t::dimension > InterpolateInverse (const reg_t *reg)
 Interpolates inverse part of a region definition for dumping by default returns void interpolation object Currently implemented for Inverse and RegionIntersection in 3D.
 
template<class poly_t , class limiting_t >
bool DumpPolyhedron (const poly_t *reg, std::vector< VecContour<> > &sides, limiting_t *lim, std::vector< int > *redundant_planes=nullptr, int *plane_regids=nullptr, std::vector< int > *side_regids=nullptr)
 records sides of given polyhedron
 
void CutSides (interp_t< 3 > poly, std::vector< VecContour<> > &inpsides, bool inside, std::vector< VecContour<> > &outsides, int i_skip=-1, const std::vector< int > *inp_side_regids=nullptr, std::vector< int > *side_regids=nullptr)
 Cuts the sides leaving parts that are inside/outside the poly union.
 
template<class limiting_t >
void UnionDump (interp_t< 3 > poly, std::vector< VecContour<> > &outsides, limiting_t *lim, std::vector< int > *side_regids=nullptr)
 Dumps polyhedra from poly as union.
 
template<class reg_t , class limiting_t >
bool Dump (const reg_t *reg, std::vector< VecContour<> > &sides, limiting_t *lim, std::vector< int > *side_regids)
 interpolate 3d body as a number of polyhedra and records their sides these sides can be plotted by gnuplot afterwards if lim!=NULL consider intersection between body and lim
 
template<class reg_t , class limiting_t >
bool Dump (const reg_t *reg, std::vector< VecContour< 2 > > &sides, limiting_t *lim, std::vector< int > *side_regids)
 interpolate 2d body as a contour that can be plotted by gnuplot afterwards if lim!=NULL consider intersection between body and lim
 
template<class plane_it , class limiting_t >
bool Dump (const Polyhedron< plane_it > *reg, std::vector< VecContour<> > &sides, limiting_t *lim, std::vector< int > *side_regids)
 specifications of Dump for some specific bodies
 

Variables

IVUTILS_EXPORT int NUM_RADII
 Number of sides of regular polygon used to interpolate circle. Default value is 20.
 

Detailed Description

Classes used to record information about vectors / contours / bodies to text files in gnuplot format (for visualization)