Fade2.5D Documentation pages v1.90
Delaunay Features
testDataGenerators.h
Go to the documentation of this file.
1 // Copyright (C) Geom Software e.U, Bernhard Kornberger, Graz/Austria
2 //
3 // This file is part of the Fade2D library. The student license is free
4 // of charge and covers personal non-commercial research. Licensees
5 // holding a commercial license may use this file in accordance with
6 // the Commercial License Agreement.
7 //
8 // This software is provided AS IS with NO WARRANTY OF ANY KIND,
9 // INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS
10 // FOR A PARTICULAR PURPOSE.
11 //
12 // Please contact the author if any conditions of this licensing are
13 // not clear to you.
14 //
15 // Author: Bernhard Kornberger, bkorn (at) geom.at
16 // http://www.geom.at
17 
19 #pragma once
20 #include "Point2.h"
21 #include "Segment2.h"
22 #include <vector>
23 
24 
25 
26 
27 #if GEOM_PSEUDO3D==GEOM_TRUE
28  namespace GEOM_FADE25D {
29 #elif GEOM_PSEUDO3D==GEOM_FALSE
30  namespace GEOM_FADE2D {
31 #else
32  #error GEOM_PSEUDO3D is not defined
33 #endif
34 
35 
79 FUNC_DECLSPEC
80 void generateRandomNumbers( size_t num,
81  double min,
82  double max,
83  std::vector<double>& vRandomNumbersOut,
84  unsigned int seed=0
85  );
86 
102 FUNC_DECLSPEC
103 void generateRandomPoints( size_t numRandomPoints,
104  double min,
105  double max,
106  std::vector<Point2>& vRandomPointsOut,
107  unsigned int seed=0
108  );
109 
110 #if GEOM_PSEUDO3D==GEOM_TRUE
126 FUNC_DECLSPEC
127 void generateRandomPoints3D(size_t numRandomPoints,
128  double min,
129  double max,
130  std::vector<Point2>& vRandomPointsOut,
131  unsigned int seed=0
132  );
133 
134 #endif
135 
149 FUNC_DECLSPEC
150 void generateRandomPolygon( size_t numSegments,
151  double min,
152  double max,
153  std::vector<Segment2>& vPolygonOut,
154  unsigned int seed=0
155  );
156 
172 FUNC_DECLSPEC
173 void generateRandomSegments(size_t numSegments,
174  double min,
175  double max,
176  double maxLen,
177  std::vector<Segment2>& vSegmentsOut,
178  unsigned int seed);
179 
194 FUNC_DECLSPEC
196  int numSegments,
197  int numPeriods,
198  double xOffset,
199  double yOffset,
200  double xFactor,
201  double yFactor, // 0 causes absolute values
202  bool bSwapXY,
203  std::vector<Segment2>& vSineSegmentsOut
204  );
205 
206 
211 #if GEOM_PSEUDO3D==GEOM_TRUE
212 FUNC_DECLSPEC
214  int numPoints,
215  double x,
216  double y,
217  double z,
218  double radiusX,
219  double radiusY,
220  std::vector<Point2>& vCirclePointsOut
221  );
222 #else
223 FUNC_DECLSPEC
224 void generateCircle(
225  int numPoints,
226  double x,
227  double y,
228  double radiusX,
229  double radiusY,
230  std::vector<Point2>& vCirclePointsOut
231  );
232 #endif
233 
234 
235 
236 #if GEOM_PSEUDO3D==GEOM_TRUE
247 FUNC_DECLSPEC
249  size_t numX,
250  size_t numY,
251  size_t numCenters,
252  double xmin,double ymin,double zmin,double xmax,double ymax,double zmax,
253  std::vector<Point2>& vSurfacePointsOut,
254  unsigned int seed
255  );
256 
257 #endif
258 
259 FUNC_DECLSPEC
260 void shear( std::vector<Point2>& vPointsInOut,double shearX,double shearY );
261 
262 
264 } // Namespace
FUNC_DECLSPEC void generateCircle(int numPoints, double x, double y, double z, double radiusX, double radiusY, std::vector< Point2 > &vCirclePointsOut)
Generate a circle.
FUNC_DECLSPEC void generateSineSegments(int numSegments, int numPeriods, double xOffset, double yOffset, double xFactor, double yFactor, bool bSwapXY, std::vector< Segment2 > &vSineSegmentsOut)
Generate segments from a sine function.
FUNC_DECLSPEC void generateRandomPoints(size_t numRandomPoints, double min, double max, std::vector< Point2 > &vRandomPointsOut, unsigned int seed=0)
Generate random points.
FUNC_DECLSPEC void generateRandomSurfacePoints(size_t numX, size_t numY, size_t numCenters, double xmin, double ymin, double zmin, double xmax, double ymax, double zmax, std::vector< Point2 > &vSurfacePointsOut, unsigned int seed)
Generate a random surface.
FUNC_DECLSPEC void generateRandomSegments(size_t numSegments, double min, double max, double maxLen, std::vector< Segment2 > &vSegmentsOut, unsigned int seed)
Generate random line segments.
FUNC_DECLSPEC void generateRandomPoints3D(size_t numRandomPoints, double min, double max, std::vector< Point2 > &vRandomPointsOut, unsigned int seed=0)
Generate random points with height.
FUNC_DECLSPEC void generateRandomNumbers(size_t num, double min, double max, std::vector< double > &vRandomNumbersOut, unsigned int seed=0)
Generate random numbers.
FUNC_DECLSPEC void generateRandomPolygon(size_t numSegments, double min, double max, std::vector< Segment2 > &vPolygonOut, unsigned int seed=0)
Generate a random simple polygon.