GeomApi.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------------------+
2 |
3 | Supplied under applicable software license agreement.
4 |
5 | Copyright (c) 2018 Bentley Systems, Incorporated. All rights reserved.
6 |
7 +---------------------------------------------------------------------------------------*/
8 #pragma once
9 #include <Bentley/Bentley.h>
11 #define BEGIN_BENTLEY_GEOMETRY_INTERNAL_NAMESPACE namespace Bentley { namespace Geom {
12 #define END_BENTLEY_GEOMETRY_INTERNAL_NAMESPACE }}
13 #define BENTLEY_GEOMETRY_INTERNAL_NAMESPACE_NAME Bentley::Geom
14 #define USING_NAMESPACE_BENTLEY_GEOMETRY_INTERNAL using namespace BENTLEY_GEOMETRY_INTERNAL_NAMESPACE_NAME;
15 #define GEOMAPI_PRINTF BeConsole::Printf
16 #define BENTLEYGEOMETRY_MakeGeoPoint2dPublic
17 // make initial appearance of virtual signature unambiguous
18 #define GEOMAPI_VIRTUAL virtual
19 
20 #ifdef jmdlgeom_internal
21 #include <Bentley/BeConsole.h>
22 #endif
23 
24 #include <float.h>
25 #include <math.h>
26 #include <string.h>
27 #include <Bentley/bvector.h>
28 #include <Bentley/WString.h>
29 #include <algorithm>
30 #include "msgeomstructs_typedefs.h"
31 #include "GeomApi.r.h"
32 #include <Bentley/RefCounted.h>
34 #include <Bentley/ScopedArray.h>
37 #include <Geom/counters.h>
39 
40 
41 
42 
43 
44 
45 
46 /*----------------------------------------------------------------------+
47 | |
48 | Constants |
49 | |
50 +----------------------------------------------------------------------*/
51 #ifndef msGeomConst_pi
52 #define msGeomConst_piOver4 7.85398163397448280000e-001
53 #define msGeomConst_piOver2 1.57079632679489660000e+000
54 #define msGeomConst_pi 3.14159265358979310000e+000
55 #define msGeomConst_2pi 6.28318530717958620000e+000
56 #define msGeomConst_degreesPerRadian (45.0 / msGeomConst_piOver4)
57 #define msGeomConst_radiansPerDegree (msGeomConst_piOver4 / 45.0)
58 #endif
59 
60 #ifndef PI
61 #define PI 3.1415926535897932384626433
62 #endif
63 
64 /* Constants from DGN / MGDS code */
65 #define mgds_fc_iang_to_rad (msGeomConst_degreesPerRadian/360000.0)
66 #define mgds_fc_rad_to_iang (msGeomConst_radiansPerDegree*360000.0)
67 #define mgds_fc_miang_to_rad (-1.0*msGeomConst_degreesPerRadian/360000.0)
68 #define mgds_fc_nearZero 1.0e-14 /* verging on zero - from mgds days*/
69 #define mgds_fc_condition 1.0e-12 /* matrix condition number - from mgds days */
70 #define mgds_fc_epsilon 0.00001 /* A reasonable epsilon for DGN / MGDS */
71 
76 #define DISCONNECT (1.7976931348623157e308)
77 
79 struct Rounding
80 {
81 private:
83  Rounding ();
84 public:
87  {
88  RoundingMode_Round = 0,
89  RoundingMode_Up = 1,
90  RoundingMode_Down = 2
91  };
98  static GEOMDLLIMPEXP double Round (double value, RoundingMode mode, double lowerValue, double upperValue);
99 };
100 
102 
104 struct TaggedPolygon;
105 typedef bvector <TaggedPolygon> TaggedPolygonVector;
110 
115 
118 
121 
124 
126 
127 #ifdef CompileZeroInit
128 // REMARK --- zero init has problems on older compilers
129 //=======================================================================================
132 //=======================================================================================
133 template<typename T> struct ZeroInit
134 {
135  ZeroInit() { std::memset(this, 0, sizeof(T)); }
136  ZeroInit(ZeroInit const&) { std::memset(this, 0, sizeof(T)); }
137  ZeroInit(ZeroInit&&) { std::memset(this, 0, sizeof(T)); }
138  ZeroInit& operator=(ZeroInit const&) = default;
139  ZeroInit& operator=(ZeroInit&&) = default;
140 };
141 #endif
142 //=======================================================================================
145 //=======================================================================================
146 template <typename T>
148 {
149 protected:
151 size_t m_tagA;
152 size_t m_tagB;
153 
154 public:
155 
157 ValueSizeSize (T const & value, size_t tagA, size_t tagB) :
158  m_value (value),
159  m_tagA (tagA),
160  m_tagB (tagB)
161  {
162  }
164 size_t GetTagA () const {return m_tagA;}
166 size_t GetTagB () const {return m_tagB;}
167 
169 size_t GetTag (bool tagA) const {return tagA ? m_tagA : m_tagB;}
171 void SetTagA (ptrdiff_t tag) {m_tagA = tag;}
173 void SetTagB (ptrdiff_t tag) {m_tagB = tag;}
174 
175 
176 
178 T Get () const { return m_value;}
179 T const & GetCR () const { return m_value;}
180 void Set (T const &value) { m_value = value;}
181 
182 // Sort callback for std::sort
183 static bool cbCompareTagATagB_LT (const ValueSizeSize<T> &dataA, const ValueSizeSize<T> &dataB)
184  {
185  if (dataA.m_tagA < dataB.m_tagA)
186  return true;
187  if (dataA.m_tagA > dataB.m_tagA)
188  return false;
189  if (dataA.m_tagB < dataB.m_tagB)
190  return true;
191  if (dataA.m_tagB > dataB.m_tagB)
192  return false;
193  // All equal ...
194  return false;
195  }
196 
197 // Sort callback for std::sort
198 static bool cbCompareTagBTagA_LT (const ValueSizeSize<T> &dataA, const ValueSizeSize<T> &dataB)
199  {
200  if (dataA.m_tagB < dataB.m_tagB)
201  return true;
202  if (dataA.m_tagB > dataB.m_tagB)
203  return false;
204  if (dataA.m_tagA < dataB.m_tagA)
205  return true;
206  if (dataA.m_tagA > dataB.m_tagA)
207  return false;
208  // All equal ...
209  return false;
210  }
211 
213 static void SortTagATagB (bvector <ValueSizeSize <T> > &data)
214  {
215  std::sort (data.begin (), data.end (), cbCompareTagATagB_LT);
216  }
217 
219 static void SortTagBTagA (bvector <ValueSizeSize <T> > &data)
220  {
221  std::sort (data.begin (), data.end (), cbCompareTagBTagA_LT);
222  }
223 
225 static void SortByTags (bvector <ValueSizeSize <T> > &data, bool sortAFirst)
226  {
227  if (sortAFirst)
228  SortTagATagB (data);
229  else
230  SortTagBTagA (data);
231  }
232 
233 void SwapTags ()
234  {
235  std::swap (m_tagA, m_tagB);
236  }
237 };
238 
239 //=======================================================================================
242 //=======================================================================================
243 template <typename T>
245 {
246 OrderedValueSizeSize (T const & value, ptrdiff_t tagA, ptrdiff_t tagB)
247  : ValueSizeSize <T> (value, tagA, tagB)
248  {}
249 
250 // Sort callback for std::sort
252  {
253  if (dataA.m_value < dataB.m_value)
254  return true;
255  if (dataA.m_value > dataB.m_value)
256  return false;
257  if (dataA.m_tagA < dataB.m_tagA)
258  return true;
259  if (dataA.m_tagA > dataB.m_tagA)
260  return false;
261  if (dataA.m_tagB < dataB.m_tagB)
262  return true;
263  if (dataA.m_tagB > dataB.m_tagB)
264  return false;
265  // All equal ...
266  return false;
267  }
268 
269 // Sort callback for std::sort
271  {
272  if (dataA.m_tagA < dataB.m_tagA)
273  return true;
274  if (dataA.m_tagA > dataB.m_tagA)
275  return false;
276  if (dataA.m_value < dataB.m_value)
277  return true;
278  if (dataA.m_value > dataB.m_value)
279  return false;
280  if (dataA.m_tagB < dataB.m_tagB)
281  return true;
282  if (dataA.m_tagB > dataB.m_tagB)
283  return false;
284  // All equal ...
285  return false;
286  }
287 
288 // Sort callback for std::sort
289 static bool cbCompareValue_LT (const OrderedValueSizeSize<T> &dataA, const OrderedValueSizeSize<T> &dataB)
290  {
291  return dataA.m_value < dataB.m_value;
292  }
293 
294 // Sort callback for std::sort
295 static bool cbCompareValue_GT (const OrderedValueSizeSize<T> &dataA, const OrderedValueSizeSize<T> &dataB)
296  {
297  return dataA.m_value > dataB.m_value;
298  }
299 
301 static void SortValueTagATagB (bvector <OrderedValueSizeSize <T> > &data)
302  {
303  std::sort (data.begin (), data.end (), cbCompareValueTagATagB_LT);
304  }
305 
307 static void SortTagAValueTagB (bvector <OrderedValueSizeSize <T> > &data)
308  {
309  std::sort (data.begin (), data.end (), cbCompareTagAValueTagB_LT);
310  }
311 };
315 
318 template<typename T>
320  {
321  private:
322  T m_value;
323  bool m_isValid;
324  public:
326  ValidatedValue() : m_value(), m_isValid(false){}
328  ValidatedValue(T const &value) : m_value(value), m_isValid(true){}
330  ValidatedValue(T const &value, bool isValid) : m_value(value), m_isValid(isValid){}
332  T const &Value() const { return m_value; }
333  T &Value() { return m_value; }
335  bool IsValid() const { return m_isValid; }
337  bool IsValid(T &value) const { value = m_value; return m_isValid; }
339  void SetIsValid (bool value){m_isValid = value;}
341  operator T (){ return m_value; }
342  };
343 
351 
354 
358 
367 
368 template<typename T>
369 void CompressDuplicates (bvector<T> &data, bool (*SameMember)(T const &memberA, T const &memberB))
370  {
371  size_t numTotal = data.size ();
372  if (numTotal > 1)
373  {
374  size_t numAccept = 0;
375  for (size_t candidate = 1; candidate < numTotal; candidate++)
376  {
377  if (!SameMember (data[numAccept], data[candidate]))
378  {
379  numAccept++;
380  if (candidate > numAccept)
381  data[numAccept] = data[candidate];
382  }
383  }
384  data.resize (numAccept);
385  }
386  }
387 
388 
389 
390 //=======================================================================================
394 //=======================================================================================
396 {
397 public:
398 
399 enum class GeometryType
400  {
401  CurvePrimitive = 1,
402  CurveVector = 2,
403  SolidPrimitive = 3,
404  BsplineSurface = 4,
405  Polyface = 5,
406  };
407 
408 friend struct OrderedIGeometryPtr;
409 private:
410  virtual void MakeClassAbstract() = 0;
411 public:
412 public:
413 
414 GEOMDLLIMPEXP GeometryType GetGeometryType () const;
415 
416 GEOMDLLIMPEXP ICurvePrimitivePtr GetAsICurvePrimitive () const;
417 GEOMDLLIMPEXP CurveVectorPtr GetAsCurveVector () const;
418 GEOMDLLIMPEXP ISolidPrimitivePtr GetAsISolidPrimitive () const;
419 GEOMDLLIMPEXP MSBsplineSurfacePtr GetAsMSBsplineSurface () const;
420 GEOMDLLIMPEXP PolyfaceHeaderPtr GetAsPolyfaceHeader () const;
421 
422 GEOMDLLIMPEXP bool TryGetRange (DRange3dR range) const;
423 GEOMDLLIMPEXP bool TryTransformInPlace (TransformCR transform);
424 GEOMDLLIMPEXP bool IsSameStructureAndGeometry (IGeometryCR other, double tolerance = 0.0) const;
425 GEOMDLLIMPEXP static IGeometryPtr Create (ICurvePrimitivePtr const& source);
426 GEOMDLLIMPEXP static IGeometryPtr Create (CurveVectorPtr const& source);
427 GEOMDLLIMPEXP static IGeometryPtr Create (ISolidPrimitivePtr const& source);
428 GEOMDLLIMPEXP static IGeometryPtr Create (MSBsplineSurfacePtr const& source);
429 GEOMDLLIMPEXP static IGeometryPtr Create (PolyfaceHeaderPtr const& source);
430 
431 }; // IGeometry
432 
433 
436 {
438 OrderedIGeometryPtr (IGeometryPtr const &target){m_geometry = target;}
441  {
442  ICurvePrimitivePtr myPtr (const_cast <ICurvePrimitiveP>(&target));
443  m_geometry = IGeometry::Create (myPtr);
444  }
445 
447  {
448  CurveVectorPtr myPtr (const_cast <CurveVectorP>(&target));
449  m_geometry = IGeometry::Create (myPtr);
450  }
451 
453  {
454  PolyfaceHeaderPtr myPtr (const_cast <PolyfaceHeaderP>(&target));
455  m_geometry = IGeometry::Create (myPtr);
456  }
457 
459  {
460  ISolidPrimitivePtr myPtr (const_cast <ISolidPrimitiveP>(&target));
461  m_geometry = IGeometry::Create (myPtr);
462  }
463 
464 OrderedIGeometryPtr (ICurvePrimitivePtr const &target) {m_geometry = IGeometry::Create (target);}
465 OrderedIGeometryPtr (CurveVectorPtr const &target) {m_geometry = IGeometry::Create (target);}
466 OrderedIGeometryPtr (ISolidPrimitivePtr const &target) {m_geometry = IGeometry::Create (target);}
467 OrderedIGeometryPtr (PolyfaceHeaderPtr const &target) {m_geometry = IGeometry::Create (target);}
468 OrderedIGeometryPtr (MSBsplineSurfacePtr const &target) {m_geometry = IGeometry::Create (target);}
469 
470 GEOMDLLIMPEXP bool operator < (OrderedIGeometryPtr const &other) const;
471 };
472 
473 
474 
476 
477 #include "dpoint2d.h"
478 #include "dpoint3d.h"
479 #include "dpoint4d.h"
480 #include "GraphicsPoint.h"
481 #include "GeoPoint.h"
482 #include "dvec2d.h"
483 #include "dvec3d.h"
484 #include "DRange1d.h"
485 #include "drange2d.h"
486 #include "drange3d.h"
487 #include "dmatrix4d.h"
488 #include "dmap4d.h"
489 #include "dplane3d.h"
490 #include "dray3d.h"
491 #include "DSegment1d.h"
492 #include "dsegment3d.h"
493 #include "dellipse3d.h"
494 #include "rotmatrix.h"
495 #include "transform.h"
496 #include "BsplineStructs.h"
497 #include <Geom/CurveDetails.h>
498 #include "OperatorOverload.h"
499 
500 #include "MSBsplineCurve.h"
501 #include "MSInterpolationCurve.h"
502 #include "MSBsplineSurface.h"
503 #include "Angle.h"
504 
505 #include "DPoint3dOps.h"
506 
508 //=======================================================================================
511 //=======================================================================================
513  {
514  Utf8String m_description; //<! name of error condtion tested
515  size_t m_pass; //<! number of times passed
516  size_t m_fail; //<! number of times failed
517  bvector<std::pair<size_t, ptrdiff_t>> m_indices;
518  bvector<std::pair<size_t, DPoint3d>> m_xyz;
519 
520  MeshAnnotation (Utf8CP name) : m_description (name), m_pass (0), m_fail (0) {}
521 
522  void IncrementPass () {m_pass++;}
523  void IncrementFail () {m_fail++;}
524  void Record (size_t index, size_t tag) { m_indices.push_back (std::pair<size_t, ptrdiff_t> (index, (ptrdiff_t)tag)); }
525  void Record (size_t index, DPoint3dCR tag) { m_xyz.push_back (std::pair<size_t, DPoint3d> (index, tag)); }
526  void Record (size_t index, int tag) { m_indices.push_back (std::pair<size_t, ptrdiff_t> (index, (ptrdiff_t)tag)); }
527  };
528 //=======================================================================================
530 //=======================================================================================
531 struct MeshAnnotationVector : bvector<MeshAnnotation>
532 {
533 private:
534 bool m_recordAllTestDescriptions;
535 size_t m_totalPass;
536 size_t m_totalFail;
537 public:
539  MeshAnnotationVector (bool recordAllTestDescriptions) : m_recordAllTestDescriptions (recordAllTestDescriptions), m_totalPass (0), m_totalFail (0)
540  { }
542 size_t GetTotalPass () { return m_totalPass;}
544 size_t GetTotalFail () { return m_totalFail;}
547  size_t Find (Utf8CP key);
549  size_t FindOrAdd (Utf8CP key);
551  size_t Assert (bool condition, Utf8CP key);
553  void Assert (bool condition, Utf8CP key, size_t index, size_t tag);
555  void Assert (bool condition, Utf8CP key, size_t index, DPoint3dCR tag);
557  void Assert (bool condition, Utf8CP key, size_t index, int tag);
558 };
560 
561 #include <Geom/ClipPlane.h>
562 #include <Geom/ClipPlaneSet.h>
563 #include <Geom/CompoundDrawState.h>
564 #include <Geom/CurvePrimitiveId.h>
565 #include <Geom/CurvePrimitive.h>
566 #include <Geom/CurveVector.h>
567 #include <Geom/SolidPrimitive.h>
568 #include <Geom/CurveTopologyId.h>
569 #include <Geom/Polyface.h>
570 
571 
573 
574 typedef struct pointList
575  {
578  } PointList;
579 
Contains a UTF-8 encoded string.
Definition: WString.h:275
2d point with x,y coordinates as public members: Bentley::DPoint2d
GeometryType
Definition: GeomApi.h:399
static void SortValueTagATagB(bvector< OrderedValueSizeSize< T > > &data)
Lexical sort on Value, then TagA, then TagB.
Definition: GeomApi.h:301
void SetIsValid(bool value)
update the validit member
Definition: GeomApi.h:339
T const & GetCR() const
Definition: GeomApi.h:179
MSBsplineSurface with IRefCounted support for smart pointers.
Definition: MSBsplineSurface.h:768
Utf8String m_description
Definition: GeomApi.h:514
TaggedPolygonVector * TaggedPolygonVectorP
Definition: GeomApi.h:108
OrderedIGeometryPtr(IGeometryPtr const &target)
Definition: GeomApi.h:438
ValidatedValue(T const &value)
Specified value, marked valid.
Definition: GeomApi.h:328
void Record(size_t index, size_t tag)
Definition: GeomApi.h:524
Forward and inverse 4x4 matrices of an invertible perspective transformation: DMap4d.
static bool cbCompareValue_GT(const OrderedValueSizeSize< T > &dataA, const OrderedValueSizeSize< T > &dataB)
Definition: GeomApi.h:295
size_t GetTag(bool tagA) const
Get selected tag ..
Definition: GeomApi.h:169
RefCountedPtr< struct ICurvePrimitive > ICurvePrimitivePtr
Definition: GeomApi.h:112
ValidatedValue< size_t > ValidatedSize
Definition: GeomApi.h:362
TaggedPolygonVector const & TaggedPolygonVectorCR
Definition: GeomApi.h:107
Geographic Point: Geopoint, Geopoint2d.
size_t m_tagB
Definition: GeomApi.h:152
ValidatedValue< CurveLocationDetail > ValidatedCurveLocationDetail
Definition: GeomApi.h:357
int32_t numPoints
Definition: GeomApi.h:576
ValidatedValue(T const &value, bool isValid)
Specified value, with validity indicated by caller.
Definition: GeomApi.h:330
void Set(T const &value)
Definition: GeomApi.h:180
static bool cbCompareTagATagB_LT(const ValueSizeSize< T > &dataA, const ValueSizeSize< T > &dataB)
Definition: GeomApi.h:183
OrderedIGeometryPtr()
Definition: GeomApi.h:439
Inlinable template for an ordered value of type T with two size_t tags named TagA and TagB...
Definition: GeomApi.h:244
TaggedPolygonVector & TaggedPolygonVectorR
Definition: GeomApi.h:106
Provides Bentley specific Console functions (Bentley/BeConsole.h).
An abstract type implemented by multiple types of parametric curves: ICurvePrimitive.
#define END_BENTLEY_GEOMETRY_NAMESPACE
Definition: Bentley.r.h:30
void SwapTags()
Definition: GeomApi.h:233
size_t GetTagB() const
Install TagB value.
Definition: GeomApi.h:166
An integer 2d point, useful for screen pixel references, but not for real geometry: Point...
ValidatedValue< struct DVec3d > ValidatedDVec3d
Definition: GeomApi.h:344
OrderedIGeometryPtr(CurveVectorPtr const &target)
Definition: GeomApi.h:465
OrderedIGeometryPtr(ISolidPrimitiveCR target)
Definition: GeomApi.h:458
RefCountedPtr< RefCountedMSBsplineCurve > MSBsplineCurvePtr
Definition: GeomApi.h:116
bvector< TaggedPolygon > TaggedPolygonVector
Definition: GeomApi.h:104
OrderedIGeometryPtr(ISolidPrimitivePtr const &target)
Definition: GeomApi.h:466
static class for rounding methods.
Definition: GeomApi.h:79
Start point and direction (NOT necessarily unit) for a 3D ray: DRay3d.
ValidatedValue< DrapeSegment > ValidatedDrapeSegment
Definition: GeomApi.h:361
faceId, edgeId, vertexId, FloatRGB, RgbFactor
RefCountedPtr< struct CurveVector > CurveVectorPtr
Definition: GeomApi.h:113
void swap(basic_string< _CharT, _Traits, _Allocator > &__a, basic_string< _CharT, _Traits, _Allocator > &__b)
Definition: basic_string.h:1396
struct CurveVector const & CurveVectorCR
Definition: msgeomstructs_typedefs.h:172
bvector< std::pair< size_t, DPoint3d > > m_xyz
array of pairs for error occurances.
Definition: GeomApi.h:518
Inlinable template for a value of type T with two size_t tags named TagA and TagB.
Definition: GeomApi.h:147
int int32_t
Definition: Bentley.r.h:92
Class wrapper for static utiliity functions on data structures built around DPoint2d: VectorOps...
ValidatedValue< struct DPlane3d > ValidatedDPlane3d
Definition: GeomApi.h:352
ValueSizeSize()
Definition: GeomApi.h:156
ValidatedValue< double > ValidatedDouble
Definition: GeomApi.h:353
ValidatedValue< struct RotMatrix > ValidatedRotMatrix
Definition: GeomApi.h:346
ValueSizeSize(T const &value, size_t tagA, size_t tagB)
Definition: GeomApi.h:157
A collection of curve primitives: CurveVector, CurveCurve, PathLocationDetail, CurveVectorWithDistanc...
ValidatedValue< struct DVec2d > ValidatedDVec2d
Definition: GeomApi.h:345
size_t GetTotalPass()
Query the total number of tests passed.
Definition: GeomApi.h:542
T & Value()
Definition: GeomApi.h:333
bstdmap & operator=(const bstdmap &__rhs)
Definition: stdcxx/bstdmap.h:170
T m_value
Definition: GeomApi.h:150
OrderedIGeometryPtr(PolyfaceHeaderPtr const &target)
Definition: GeomApi.h:467
RoundingMode
Enumeration of rounding options.
Definition: GeomApi.h:86
RefCountedPtr< ISolidPrimitive > ISolidPrimitivePtr
Definition: SolidPrimitive.h:50
IGeometryPtr m_geometry
Definition: GeomApi.h:437
3d point coordinates: Bentley::DPoint3d
T const & Value() const
explicty query for the "the value", without regard for the validity flag.
Definition: GeomApi.h:332
ValidatedValue< LocalRange > ValidatedLocalRange
Definition: GeomApi.h:364
TaggedPolygonVector const * TaggedPolygonVectorCP
Definition: GeomApi.h:109
bool operator<(const basic_string< _CharT, _Traits, _Allocator > &__lhs, const basic_string< _CharT, _Traits, _Allocator > &__rhs)
Definition: basic_string.h:1326
Templatized type carrying a value type with a boolean indicating if the value is considered valid...
Definition: GeomApi.h:319
Declares the NonCopyableClass.
Structure to record name and other data describing error tests.
Definition: GeomApi.h:512
A 2d low and high corner pair for range boxes: DRange2d.
void Record(size_t index, int tag)
Definition: GeomApi.h:526
void SetTagA(ptrdiff_t tag)
Replace TagA.
Definition: GeomApi.h:171
Detail data for an interval of a parent curve: PartialCurveDetail, CurveLocationDetail, CurveLocationDetailPair, SolidLocationDetail, ICurvePrimitiveInfo, CurveOffsetOptions, CurveGapOptions, BlendDetail, CurvePrimitivePtrPair.
A class that identifies the source of a curvePrimitive: CurvePrimitiveId.
ValidatedValue()
Default value, marked not valid.
Definition: GeomApi.h:326
RefCountedPtr< struct CurveVectorWithDistanceIndex > CurveVectorWithDistanceIndexPtr
Definition: GeomApi.h:114
ValidatedValue< DSegment1d > ValidatedDSegment1d
Definition: GeomApi.h:355
3d point coordinates.
Definition: dpoint3d.h:19
size_t m_tagA
Definition: GeomApi.h:151
Vector of MeshAnnotation structures.
Definition: GeomApi.h:531
bool IsValid(T &value) const
return the validity flag, copy value to parameter.
Definition: GeomApi.h:337
OrderedIGeometryPtr(MSBsplineSurfacePtr const &target)
Definition: GeomApi.h:468
ValidatedValue< struct DRange3d > ValidatedDRange3d
Definition: GeomApi.h:365
OrderedIGeometryPtr(ICurvePrimitivePtr const &target)
Definition: GeomApi.h:464
T Get() const
Return primary value.
Definition: GeomApi.h:178
A Non uniform, rational Bspline curve: MSBsplineCurve, RefCountedMSBsplineCurve.
Strongly typed angle services: Angle, AngleInDegrees, and YawPitchRollAngles.
RefCountedPtr< struct PolyfaceCoordinateAverageContext > PolyfaceCoordinateAverageContextPtr
Definition: GeomApi.h:123
MeshAnnotation(Utf8CP name)
array of pairs for error occurrances.
Definition: GeomApi.h:520
size_t GetTotalFail()
Query the total number of tests failed.
Definition: GeomApi.h:544
Data for face containing facets: FacetFaceData, DSegment3dOnFacets, BlockedVectorInt, FacetLocationDetail, FacetLocationDetailPair, PolyfaceEdgeChain, DirectionalVolumeData, PolyfaceQuery, PolyfaceQuery::IClipToPlaneSetOutput, PolyfaceQueryCarrier, PolyfaceVectors, PolyfaceHeader, PolyfaceVisitor, PolyfaceCoordinateMap.
A vector in xyz space: Bentley::DVec3d.
Start and end points of a line segment: DSegment3d.
A shared pointer template for reference-counted objects.
Definition: RefCounted.h:119
A 3x4 matrix for defining coordinate frames and affine transformations: Bentley::Transform.
An interval [x0,x1] on the real line: DSegment1d.
static void SortTagATagB(bvector< ValueSizeSize< T > > &data)
Lexical sort on Value, then TagA, then TagB.
Definition: GeomApi.h:213
ValidatedValue< DRay3d > ValidatedDRay3d
Definition: GeomApi.h:360
ValidatedValue< struct DPoint4d > ValidatedDPoint4d
Definition: GeomApi.h:350
Defines typedefs and constants that can be used across other namespaces. All Bentley-authored C++ sou...
OrderedIGeometryPtr(ICurvePrimitiveCR target)
Definition: GeomApi.h:440
OrderedValueSizeSize< double > DoubleSizeSize
Definition: GeomApi.h:312
ValidatedValue< struct Transform > ValidatedTransform
Definition: GeomApi.h:347
utility classes for statistical data accumulation
MSBsplineCurve with IRefCounted support for smart pointers.
Definition: MSBsplineCurve.h:1147
void IncrementFail()
Definition: GeomApi.h:523
OrderedIGeometryPtr(PolyfaceHeaderCR target)
Definition: GeomApi.h:452
Center, reference vectors, and angular range for elliptic arc: DEllipse3d.
struct Bentley::pointList PointList
RefCountedPtr< struct PolyfaceHeader > PolyfaceHeaderPtr
Definition: GeomApi.h:122
Origin and normal vector for a plane: DPlane3d.
OrderedValueSizeSize(T const &value, ptrdiff_t tagA, ptrdiff_t tagB)
Definition: GeomApi.h:246
struct ICurvePrimitive const & ICurvePrimitiveCR
Definition: msgeomstructs_typedefs.h:166
struct IGeometry const & IGeometryCR
Definition: msgeomstructs_typedefs.h:165
static bool cbCompareValue_LT(const OrderedValueSizeSize< T > &dataA, const OrderedValueSizeSize< T > &dataB)
Definition: GeomApi.h:289
struct PolyfaceHeader const & PolyfaceHeaderCR
Definition: msgeomstructs_typedefs.h:177
Desciption: ConvexClipPlaneSet, ClipPlaneSet.
struct ISolidPrimitive const & ISolidPrimitiveCR
Definition: msgeomstructs_typedefs.h:185
A point with markup fields: GraphicsPoint.
4x4 matrix used for perspective (homogeneous coordinate) calculations: DMatrix4d
static void SortByTags(bvector< ValueSizeSize< T > > &data, bool sortAFirst)
Lexical sort on Value, then TagA, then TagB.
Definition: GeomApi.h:225
bool IsValid() const
return the validity flag.
Definition: GeomApi.h:335
ValidatedValue< DEllipse3d > ValidatedDEllipse3d
Definition: GeomApi.h:359
struct Transform const & TransformCR
Definition: msgeomstructs_typedefs.h:134
Carries passthrough (interpolation) points for a curve: RefCountedMSInterpolationCurve.
A single plane described by normal and distance from origin: ClipPlane.
void SetTagB(ptrdiff_t tag)
Replace TagB.
Definition: GeomApi.h:173
Concrete class that can be used to implement the reference-counting pattern.
Definition: RefCounted.h:109
void IncrementPass()
Definition: GeomApi.h:522
static bool cbCompareTagBTagA_LT(const ValueSizeSize< T > &dataA, const ValueSizeSize< T > &dataB)
Definition: GeomApi.h:198
static void SortTagBTagA(bvector< ValueSizeSize< T > > &data)
Lexical sort on Value, then TagA, then TagB.
Definition: GeomApi.h:219
3x3 matrix commonly used for pure rotations: Bentley::RotMatrix
Utf8Char const * Utf8CP
Definition: Bentley.h:229
A range with transforms between local and world coordinates: MSBsplineSurface, RefCountedMSBsplineSur...
MeshAnnotationVector(bool recordAllTestDescriptions)
Definition: GeomApi.h:539
ValueSizeSize< DPoint3d > DPoint3dSizeSize
Definition: GeomApi.h:314
Definition: GeomApi.h:574
size_t GetTagA() const
Install TagA value.
Definition: GeomApi.h:164
bvector< std::pair< size_t, ptrdiff_t > > m_indices
Definition: GeomApi.h:517
RefCountedPtr< IGeometry > IGeometryPtr
Definition: GeomApi.h:125
DPoint3d * points
Definition: GeomApi.h:577
ValidatedValue< struct DPoint2d > ValidatedDPoint2d
Definition: GeomApi.h:348
#define BEGIN_BENTLEY_GEOMETRY_NAMESPACE
Definition: Bentley.r.h:29
struct DPoint3d const & DPoint3dCR
Definition: msgeomstructs_typedefs.h:79
4d point coordinates: DPoint4d
ValidatedValue< struct DPoint3d > ValidatedDPoint3d
Definition: GeomApi.h:349
static bool cbCompareTagAValueTagB_LT(const OrderedValueSizeSize< T > &dataA, const OrderedValueSizeSize< T > &dataB)
Definition: GeomApi.h:270
static void SortTagAValueTagB(bvector< OrderedValueSizeSize< T > > &data)
Lexical sort on TagA, then Value, then TagB.
Definition: GeomApi.h:307
A 1d interval with low and high values: DRange1d.
RefCounted boject carrying a draw method index and variable size array of size_t: CompoundDrawState...
A 3d low and high corner pair for range boxes: DRange3d.
ValidatedValue< DPlane3dByVectors > ValidatedDPlane3dByVectors
Definition: GeomApi.h:363
Identifies the source of a curve within a larger wireframe entity such as a B-Rep body or SolidPrimit...
ValueSizeSize< DRange3d > DRange3dSizeSize
Definition: GeomApi.h:313
void CompressDuplicates(bvector< T > &data, bool(*SameMember)(T const &memberA, T const &memberB))
Definition: GeomApi.h:369
size_t m_pass
Definition: GeomApi.h:515
void Record(size_t index, DPoint3dCR tag)
Definition: GeomApi.h:525
size_t m_fail
Definition: GeomApi.h:516
OrderedIGeometryPtr(CurveVectorCR target)
Definition: GeomApi.h:446
ValidatedValue< DSegment3d > ValidatedDSegment3d
Definition: GeomApi.h:356
Spline order, closure, and count data: bSplineParam, interpolationParam, bsplineDisplay, and BCurveSegment.
RefCountedPtr< RefCountedMSBsplineSurface > MSBsplineSurfacePtr
Definition: GeomApi.h:119
Class for multiple RefCounted geometry types: ICurvePrimitive, CurveVector, ISolidPrimitive, MSBsplineSurface, PolyfaceHeader.
Definition: GeomApi.h:395
SolidPrimitives: +-ISolidPrimitive, DgnRuledSweepDetail, DgnRotationalSweepDetail, DgnExtrusionDetail, DgnSphereDetail, DgnBoxDetail, DgnConeDetail, DgnTorusPipeDetail.
A 3d low and high corner pair for range boxes.
Definition: drange3d.h:20
Integer x,y rectangle coordinates for GUI: BSIRect.
A CurveVector is a collection of curve primitives.
Definition: CurveVector.h:78
A vector in xy space: Bentley::DVec2d.
static bool cbCompareValueTagATagB_LT(const OrderedValueSizeSize< T > &dataA, const OrderedValueSizeSize< T > &dataB)
Definition: GeomApi.h:251
IGeometryPtr with < operator for sorting on address of the target object.
Definition: GeomApi.h:435

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.