00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00015
00016
00018
00019
00020
00022 #if !defined(ON_POINT_INC_)
00023 #define ON_POINT_INC_
00024
00025 #include <pcl/pcl_exports.h>
00026
00027 class ON_BoundingBox;
00028 class ON_Xform;
00029 class ON_Line;
00030 class ON_Plane;
00031
00032 class ON_2dPoint;
00033 class ON_3dPoint;
00034 class ON_4dPoint;
00035
00036 class ON_2dVector;
00037 class ON_3dVector;
00038
00039 class ON_2fVector;
00040 class ON_3fVector;
00041
00042 class ON_Interval;
00043
00045
00046
00047
00048 class PCL_EXPORTS ON_CLASS ON_Interval
00049 {
00050 public:
00051
00052 static const ON_Interval EmptyInterval;
00053
00055
00056 ON_Interval();
00057
00058 ON_Interval(double t0,double t1);
00059
00060 ~ON_Interval();
00061
00062 bool operator!=(const ON_Interval&) const;
00063 bool operator==(const ON_Interval&) const;
00064
00065
00066 double m_t[2];
00067
00068
00069
00070
00071
00072
00073
00074 void Destroy();
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085 void Set(
00086 double t0,
00087 double t1
00088 );
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101 double ParameterAt (
00102 double normalized_parameter
00103 ) const;
00104 ON_Interval ParameterAt (
00105 ON_Interval normalized_interval
00106 ) const;
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119 double NormalizedParameterAt (
00120 double interval_parameter
00121 ) const;
00122 ON_Interval NormalizedParameterAt (
00123 ON_Interval interval_parameter
00124 ) const;
00125
00126 double& operator[](int);
00127 double operator[](int) const;
00128 double& operator[](unsigned int);
00129 double operator[](unsigned int) const;
00130
00131 double Min() const;
00132 double Max() const;
00133 double Mid() const;
00134 double Length() const;
00135
00136 bool IsIncreasing() const;
00137 bool IsDecreasing() const;
00138 bool IsInterval() const;
00139 bool IsSingleton() const;
00140 bool IsEmptyInterval() const;
00141 bool IsValid() const;
00142
00143
00144 bool IsEmptySet() const;
00145
00146 bool MakeIncreasing();
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157 int Compare( const ON_Interval& other ) const;
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171 bool Includes(
00172 double t,
00173 bool bTestOpenInterval = false
00174 ) const;
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189 bool Includes(
00190 const ON_Interval& other,
00191 bool bProperSubSet = false
00192 ) const;
00193
00194
00195
00196
00197
00198 void Reverse();
00199
00200
00201
00202
00203
00204 void Swap();
00205
00207
00208
00209
00210
00211
00212
00213 bool Intersection(
00214 const ON_Interval&
00215 );
00216
00218
00219
00220
00221
00222
00223
00224 bool Intersection(
00225 const ON_Interval&,
00226 const ON_Interval&
00227 );
00228
00230
00231
00232
00233
00234
00235
00236 bool Union(
00237 const ON_Interval&
00238 );
00239
00240 bool Union(
00241 double t
00242 );
00243
00244 bool Union(
00245 int count,
00246 const double* t
00247 );
00248
00250
00251
00252
00253
00254
00255
00256 bool Union(
00257 const ON_Interval&,
00258 const ON_Interval&
00259 );
00260 };
00261
00263
00264
00265
00266 class PCL_EXPORTS ON_CLASS ON_2dPoint
00267 {
00268 public:
00269 double x, y;
00270
00271 static const ON_2dPoint Origin;
00272 static const ON_2dPoint UnsetPoint;
00273
00274
00275 ON_2dPoint();
00276 ON_2dPoint(double x,double y);
00277 ON_2dPoint(const ON_3dPoint& );
00278 ON_2dPoint(const ON_4dPoint& );
00279 ON_2dPoint(const ON_2dVector& );
00280 ON_2dPoint(const ON_3dVector& );
00281 ON_2dPoint(const double*);
00282
00283 ON_2dPoint(const class ON_2fPoint&);
00284 ON_2dPoint(const class ON_3fPoint&);
00285 ON_2dPoint(const class ON_4fPoint&);
00286 ON_2dPoint(const class ON_2fVector&);
00287 ON_2dPoint(const class ON_3fVector&);
00288 ON_2dPoint(const float*);
00289
00290
00291 operator double*();
00292 operator const double*() const;
00293
00294
00295 ON_2dPoint& operator=(const ON_3dPoint&);
00296 ON_2dPoint& operator=(const ON_4dPoint&);
00297 ON_2dPoint& operator=(const ON_2dVector&);
00298 ON_2dPoint& operator=(const ON_3dVector&);
00299 ON_2dPoint& operator=(const double*);
00300
00301 ON_2dPoint& operator=(const ON_2fPoint&);
00302 ON_2dPoint& operator=(const ON_3fPoint&);
00303 ON_2dPoint& operator=(const ON_4fPoint&);
00304 ON_2dPoint& operator=(const ON_2fVector&);
00305 ON_2dPoint& operator=(const ON_3fVector&);
00306 ON_2dPoint& operator=(const float*);
00307
00308 ON_2dPoint& operator*=(double);
00309 ON_2dPoint& operator/=(double);
00310 ON_2dPoint& operator+=(const ON_2dPoint&);
00311 ON_2dPoint& operator+=(const ON_2dVector&);
00312 ON_2dPoint& operator+=(const ON_3dVector&);
00313 ON_2dPoint& operator-=(const ON_2dPoint&);
00314 ON_2dPoint& operator-=(const ON_2dVector&);
00315 ON_2dPoint& operator-=(const ON_3dVector&);
00316
00317 ON_2dPoint operator*(int) const;
00318 ON_2dPoint operator/(int) const;
00319 ON_2dPoint operator*(float) const;
00320 ON_2dPoint operator/(float) const;
00321 ON_2dPoint operator*(double) const;
00322 ON_2dPoint operator/(double) const;
00323
00324 ON_2dPoint operator+(const ON_2dPoint&) const;
00325 ON_2dPoint operator+(const ON_2dVector&) const;
00326 ON_2dVector operator-(const ON_2dPoint&) const;
00327 ON_2dPoint operator-(const ON_2dVector&) const;
00328 ON_3dPoint operator+(const ON_3dPoint&) const;
00329 ON_3dPoint operator+(const ON_3dVector&) const;
00330 ON_3dVector operator-(const ON_3dPoint&) const;
00331 ON_3dPoint operator-(const ON_3dVector&) const;
00332
00333 ON_2dPoint operator+(const ON_2fPoint&) const;
00334 ON_2dPoint operator+(const ON_2fVector&) const;
00335 ON_2dVector operator-(const ON_2fPoint&) const;
00336 ON_2dPoint operator-(const ON_2fVector&) const;
00337 ON_3dPoint operator+(const ON_3fPoint&) const;
00338 ON_3dPoint operator+(const ON_3fVector&) const;
00339 ON_3dVector operator-(const ON_3fPoint&) const;
00340 ON_3dPoint operator-(const ON_3fVector&) const;
00341
00342 double operator*(const ON_2dPoint&) const;
00343 double operator*(const ON_2dVector&) const;
00344 double operator*(const ON_4dPoint&) const;
00345 ON_2dPoint operator*(const ON_Xform&) const;
00346
00347 bool operator==(const ON_2dPoint&) const;
00348 bool operator!=(const ON_2dPoint&) const;
00349
00350
00351 bool operator<=(const ON_2dPoint&) const;
00352 bool operator>=(const ON_2dPoint&) const;
00353 bool operator<(const ON_2dPoint&) const;
00354 bool operator>(const ON_2dPoint&) const;
00355
00356
00357 double& operator[](int);
00358 double operator[](int) const;
00359 double& operator[](unsigned int);
00360 double operator[](unsigned int) const;
00361
00362
00363
00364
00365
00366 bool IsValid() const;
00367
00368
00369
00370
00371
00372 bool IsUnsetPoint() const;
00373
00374
00375 void Set(double x,double y);
00376
00377 double DistanceTo( const ON_2dPoint& ) const;
00378
00379 int MaximumCoordinateIndex() const;
00380 double MaximumCoordinate() const;
00381
00382 int MinimumCoordinateIndex() const;
00383 double MinimumCoordinate() const;
00384
00385 void Zero();
00386
00387
00388
00389 void Transform(
00390 const ON_Xform&
00391 );
00392
00393 void Rotate(
00394 double angle,
00395 const ON_2dPoint& center
00396 );
00397
00398 void Rotate(
00399 double sin_angle,
00400 double cos_angle,
00401 const ON_2dPoint& center
00402 );
00403 };
00404
00405 ON_DECL
00406 ON_2dPoint operator*(int, const ON_2dPoint&);
00407
00408 ON_DECL
00409 ON_2dPoint operator*(float, const ON_2dPoint&);
00410
00411 ON_DECL
00412 ON_2dPoint operator*(double, const ON_2dPoint&);
00413
00415
00416
00417
00418 class PCL_EXPORTS ON_CLASS ON_3dPoint
00419 {
00420 public:
00421 double x, y, z;
00422
00423 static const ON_3dPoint Origin;
00424 static const ON_3dPoint UnsetPoint;
00425
00426
00427 ON_3dPoint();
00428 ON_3dPoint(double x,double y,double z);
00429 ON_3dPoint(const ON_2dPoint& );
00430 ON_3dPoint(const ON_4dPoint& );
00431 ON_3dPoint(const ON_2dVector& );
00432 ON_3dPoint(const ON_3dVector& );
00433 ON_3dPoint(const double*);
00434
00435 ON_3dPoint(const class ON_2fPoint&);
00436 ON_3dPoint(const class ON_3fPoint&);
00437 ON_3dPoint(const class ON_4fPoint&);
00438 ON_3dPoint(const class ON_2fVector&);
00439 ON_3dPoint(const class ON_3fVector&);
00440 ON_3dPoint(const float*);
00441
00442
00443 operator double*();
00444 operator const double*() const;
00445
00446
00447 ON_3dPoint& operator=(const ON_2dPoint&);
00448 ON_3dPoint& operator=(const ON_4dPoint&);
00449 ON_3dPoint& operator=(const ON_2dVector&);
00450 ON_3dPoint& operator=(const ON_3dVector&);
00451 ON_3dPoint& operator=(const double*);
00452
00453 ON_3dPoint& operator=(const class ON_2fPoint&);
00454 ON_3dPoint& operator=(const class ON_3fPoint&);
00455 ON_3dPoint& operator=(const class ON_4fPoint&);
00456 ON_3dPoint& operator=(const class ON_2fVector&);
00457 ON_3dPoint& operator=(const class ON_3fVector&);
00458 ON_3dPoint& operator=(const float*);
00459
00460 ON_3dPoint& operator*=(double);
00461 ON_3dPoint& operator/=(double);
00462 ON_3dPoint& operator+=(const ON_3dPoint&);
00463 ON_3dPoint& operator+=(const ON_3dVector&);
00464 ON_3dPoint& operator-=(const ON_3dPoint&);
00465 ON_3dPoint& operator-=(const ON_3dVector&);
00466
00467 ON_3dPoint operator*(int) const;
00468 ON_3dPoint operator/(int) const;
00469 ON_3dPoint operator*(float) const;
00470 ON_3dPoint operator/(float) const;
00471 ON_3dPoint operator*(double) const;
00472 ON_3dPoint operator/(double) const;
00473
00474 ON_3dPoint operator+(const ON_3dPoint&) const;
00475 ON_3dPoint operator+(const ON_3dVector&) const;
00476 ON_3dVector operator-(const ON_3dPoint&) const;
00477 ON_3dPoint operator-(const ON_3dVector&) const;
00478 ON_3dPoint operator+(const ON_2dPoint&) const;
00479 ON_3dPoint operator+(const ON_2dVector&) const;
00480 ON_3dVector operator-(const ON_2dPoint&) const;
00481 ON_3dPoint operator-(const ON_2dVector&) const;
00482
00483 ON_3dPoint operator+(const ON_3fPoint&) const;
00484 ON_3dPoint operator+(const ON_3fVector&) const;
00485 ON_3dVector operator-(const ON_3fPoint&) const;
00486 ON_3dPoint operator-(const ON_3fVector&) const;
00487 ON_3dPoint operator+(const ON_2fPoint&) const;
00488 ON_3dPoint operator+(const ON_2fVector&) const;
00489 ON_3dVector operator-(const ON_2fPoint&) const;
00490 ON_3dPoint operator-(const ON_2fVector&) const;
00491
00492 double operator*(const ON_3dPoint&) const;
00493 double operator*(const ON_3dVector&) const;
00494 double operator*(const ON_4dPoint&) const;
00495 ON_3dPoint operator*(const ON_Xform&) const;
00496
00497 bool operator==(const ON_3dPoint&) const;
00498 bool operator!=(const ON_3dPoint&) const;
00499
00500
00501 bool operator<=(const ON_3dPoint&) const;
00502 bool operator>=(const ON_3dPoint&) const;
00503 bool operator<(const ON_3dPoint&) const;
00504 bool operator>(const ON_3dPoint&) const;
00505
00506
00507 double& operator[](int);
00508 double operator[](int) const;
00509 double& operator[](unsigned int);
00510 double operator[](unsigned int) const;
00511
00512
00513
00514
00515
00516 bool IsValid() const;
00517
00518
00519
00520
00521
00522 bool IsUnsetPoint() const;
00523
00524
00525 void Set(double x,double y,double z);
00526
00527 double DistanceTo( const ON_3dPoint& ) const;
00528
00529 int MaximumCoordinateIndex() const;
00530 double MaximumCoordinate() const;
00531
00532 int MinimumCoordinateIndex() const;
00533 double MinimumCoordinate() const;
00534
00535 double Fuzz( double tolerance = ON_ZERO_TOLERANCE ) const;
00536
00537 void Zero();
00538
00539
00540
00541 void Transform(
00542 const ON_Xform&
00543 );
00544
00545 void Rotate(
00546 double angle,
00547 const ON_3dVector& axis,
00548 const ON_3dPoint& center
00549 );
00550
00551 void Rotate(
00552 double sin_angle,
00553 double cos_angle,
00554 const ON_3dVector& axis,
00555 const ON_3dPoint& center
00556 );
00557 };
00558
00559 ON_DECL
00560 ON_3dPoint operator*(int, const ON_3dPoint&);
00561
00562 ON_DECL
00563 ON_3dPoint operator*(float, const ON_3dPoint&);
00564
00565 ON_DECL
00566 ON_3dPoint operator*(double, const ON_3dPoint&);
00567
00569
00570
00571
00572 class PCL_EXPORTS ON_CLASS ON_4dPoint
00573 {
00574 public:
00575 double x, y, z, w;
00576
00577
00578 ON_4dPoint();
00579 ON_4dPoint(double x,double y,double z,double w);
00580
00581 ON_4dPoint(const ON_2dPoint& );
00582 ON_4dPoint(const ON_3dPoint& );
00583 ON_4dPoint(const ON_2dVector& );
00584 ON_4dPoint(const ON_3dVector& );
00585 ON_4dPoint(const double*);
00586
00587 ON_4dPoint(const ON_2fPoint& );
00588 ON_4dPoint(const ON_3fPoint& );
00589 ON_4dPoint(const ON_4fPoint& );
00590 ON_4dPoint(const ON_2fVector& );
00591 ON_4dPoint(const ON_3fVector& );
00592 ON_4dPoint(const float*);
00593
00594
00595 operator double*();
00596 operator const double*() const;
00597
00598
00599 ON_4dPoint& operator=(const ON_2dPoint&);
00600 ON_4dPoint& operator=(const ON_3dPoint&);
00601 ON_4dPoint& operator=(const ON_2dVector&);
00602 ON_4dPoint& operator=(const ON_3dVector&);
00603 ON_4dPoint& operator=(const double*);
00604
00605 ON_4dPoint& operator=(const class ON_2fPoint&);
00606 ON_4dPoint& operator=(const class ON_3fPoint&);
00607 ON_4dPoint& operator=(const class ON_4fPoint&);
00608 ON_4dPoint& operator=(const class ON_2fVector&);
00609 ON_4dPoint& operator=(const class ON_3fVector&);
00610 ON_4dPoint& operator=(const float*);
00611
00612 ON_4dPoint& operator*=(double);
00613 ON_4dPoint& operator/=(double);
00614 ON_4dPoint& operator+=(const ON_4dPoint&);
00615 ON_4dPoint& operator-=(const ON_4dPoint&);
00616
00617 ON_4dPoint operator*(double) const;
00618 ON_4dPoint operator/(double) const;
00619 ON_4dPoint operator+(const ON_4dPoint&) const;
00620 ON_4dPoint operator-(const ON_4dPoint&) const;
00621
00622 double operator*(const ON_4dPoint&) const;
00623 ON_4dPoint operator*(const ON_Xform&) const;
00624
00625
00626
00627 bool operator==(ON_4dPoint) const;
00628 bool operator!=(const ON_4dPoint&) const;
00629
00630
00631 double& operator[](int);
00632 double operator[](int) const;
00633 double& operator[](unsigned int);
00634 double operator[](unsigned int) const;
00635
00636
00637
00638
00639
00640 bool IsValid() const;
00641
00642
00643
00644
00645
00646 bool IsUnsetPoint() const;
00647
00648
00649 void Set(double x,double y,double z,double w);
00650
00651 int MaximumCoordinateIndex() const;
00652 double MaximumCoordinate() const;
00653
00654 int MinimumCoordinateIndex() const;
00655 double MinimumCoordinate() const;
00656
00657 void Zero();
00658 bool Normalize();
00659
00660
00661
00662 void Transform(
00663 const ON_Xform&
00664 );
00665 };
00666
00667 ON_DECL
00668 ON_4dPoint operator*(double, const ON_4dPoint&);
00669
00671
00672
00673
00674 class PCL_EXPORTS ON_CLASS ON_2dVector
00675 {
00676 public:
00677 double x, y;
00678
00679 static const ON_2dVector ZeroVector;
00680 static const ON_2dVector XAxis;
00681 static const ON_2dVector YAxis;
00682 static const ON_2dVector UnsetVector;
00683
00684
00685
00686
00687
00688
00689
00690 static const ON_2dVector& UnitVector(
00691 int
00692 );
00693
00694
00695 ON_2dVector();
00696 ON_2dVector(double x,double y);
00697
00698 ON_2dVector(const ON_3dVector& );
00699 ON_2dVector(const ON_2dPoint& );
00700 ON_2dVector(const ON_3dPoint& );
00701 ON_2dVector(const double*);
00702
00703 ON_2dVector(const ON_2fVector& );
00704 ON_2dVector(const ON_3fVector& );
00705 ON_2dVector(const ON_2fPoint& );
00706 ON_2dVector(const ON_3fPoint& );
00707 ON_2dVector(const float*);
00708
00709
00710 operator double*();
00711 operator const double*() const;
00712
00713
00714 ON_2dVector& operator=(const ON_3dVector&);
00715 ON_2dVector& operator=(const ON_2dPoint&);
00716 ON_2dVector& operator=(const ON_3dPoint&);
00717 ON_2dVector& operator=(const double*);
00718
00719 ON_2dVector& operator=(const ON_2fVector&);
00720 ON_2dVector& operator=(const ON_3fVector&);
00721 ON_2dVector& operator=(const ON_2fPoint&);
00722 ON_2dVector& operator=(const ON_3fPoint&);
00723 ON_2dVector& operator=(const float*);
00724
00725 ON_2dVector operator-() const;
00726
00727 ON_2dVector& operator*=(double);
00728 ON_2dVector& operator/=(double);
00729 ON_2dVector& operator+=(const ON_2dVector&);
00730 ON_2dVector& operator-=(const ON_2dVector&);
00731
00732
00733 double operator*(const ON_2dVector&) const;
00734 double operator*(const ON_2dPoint&) const;
00735 double operator*(const ON_2fVector&) const;
00736
00737 ON_2dVector operator*(int) const;
00738 ON_2dVector operator/(int) const;
00739 ON_2dVector operator*(float) const;
00740 ON_2dVector operator/(float) const;
00741 ON_2dVector operator*(double) const;
00742 ON_2dVector operator/(double) const;
00743
00744 ON_2dVector operator+(const ON_2dVector&) const;
00745 ON_2dPoint operator+(const ON_2dPoint&) const;
00746 ON_2dVector operator-(const ON_2dVector&) const;
00747 ON_2dPoint operator-(const ON_2dPoint&) const;
00748 ON_3dVector operator+(const ON_3dVector&) const;
00749 ON_3dPoint operator+(const ON_3dPoint&) const;
00750 ON_3dVector operator-(const ON_3dVector&) const;
00751 ON_3dPoint operator-(const ON_3dPoint&) const;
00752
00753 ON_2dVector operator+(const ON_2fVector&) const;
00754 ON_2dPoint operator+(const ON_2fPoint&) const;
00755 ON_2dVector operator-(const ON_2fVector&) const;
00756 ON_2dPoint operator-(const ON_2fPoint&) const;
00757 ON_3dVector operator+(const ON_3fVector&) const;
00758 ON_3dPoint operator+(const ON_3fPoint&) const;
00759 ON_3dVector operator-(const ON_3fVector&) const;
00760 ON_3dPoint operator-(const ON_3fPoint&) const;
00761
00762 double operator*(const ON_4dPoint&) const;
00763 ON_2dVector operator*(const ON_Xform&) const;
00764
00765 bool operator==(const ON_2dVector&) const;
00766 bool operator!=(const ON_2dVector&) const;
00767
00768
00769 bool operator<=(const ON_2dVector&) const;
00770 bool operator>=(const ON_2dVector&) const;
00771 bool operator<(const ON_2dVector&) const;
00772 bool operator>(const ON_2dVector&) const;
00773
00774
00775 double& operator[](int);
00776 double operator[](int) const;
00777 double& operator[](unsigned int);
00778 double operator[](unsigned int) const;
00779
00780
00781
00782
00783
00784 bool IsValid() const;
00785
00786
00787
00788
00789
00790 bool IsUnsetVector() const;
00791
00792
00793 void Set(double x,double y);
00794
00795 int MaximumCoordinateIndex() const;
00796 double MaximumCoordinate() const;
00797
00798 int MinimumCoordinateIndex() const;
00799 double MinimumCoordinate() const;
00800
00801 double LengthSquared() const;
00802 double Length() const;
00803
00804
00805
00806 double WedgeProduct(const ON_2dVector& B) const;
00807
00808 bool Decompose(
00809
00810
00811
00812
00813
00814
00815 const ON_2dVector&,
00816 const ON_2dVector&,
00817 double*,
00818 double*
00819 ) const;
00820
00821 int IsParallelTo(
00822
00823
00824
00825
00826 const ON_2dVector& other,
00827 double angle_tolerance = ON_DEFAULT_ANGLE_TOLERANCE
00828 ) const;
00829
00830 bool IsPerpendicularTo(
00831
00832
00833
00834 const ON_2dVector& other,
00835 double angle_tolerance = ON_DEFAULT_ANGLE_TOLERANCE
00836 ) const;
00837
00838 void Zero();
00839 void Reverse();
00840 bool Unitize();
00841
00842
00843
00844
00845
00846
00847
00848
00849
00850
00851
00852 bool IsTiny(
00853 double tiny_tol = ON_ZERO_TOLERANCE
00854 ) const;
00855
00856
00857
00858 bool IsZero() const;
00859
00860
00861
00862 bool IsUnitVector() const;
00863
00864
00865 bool PerpendicularTo(
00866
00867 const ON_2dVector&
00868 );
00869
00870
00871 bool PerpendicularTo(
00872 const ON_2dPoint&,
00873 const ON_2dPoint&
00874 );
00875
00876
00877
00878 void Transform(
00879 const ON_Xform&
00880 );
00881
00882 void Rotate(
00883 double angle
00884 );
00885
00886 void Rotate(
00887 double sin_angle,
00888 double cos_angle
00889 );
00890 };
00891
00892 ON_DECL
00893 ON_2dVector operator*(int, const ON_2dVector&);
00894
00895 ON_DECL
00896 ON_2dVector operator*(float, const ON_2dVector&);
00897
00898 ON_DECL
00899 ON_2dVector operator*(double, const ON_2dVector&);
00900
00902
00903
00904
00905
00906 ON_DECL
00907 double
00908 ON_DotProduct(
00909 const ON_2dVector&,
00910 const ON_2dVector&
00911 );
00912
00913 ON_DECL
00914 ON_3dVector
00915 ON_CrossProduct(
00916 const ON_2dVector&,
00917 const ON_2dVector&
00918 );
00919
00920 ON_DECL
00921 double
00922 ON_WedgeProduct(
00923 const ON_2dVector& A,
00924 const ON_2dVector& B
00925 );
00926
00927 ON_DECL
00928 bool
00929 ON_IsOrthogonalFrame(
00930 const ON_2dVector&,
00931 const ON_2dVector&
00932 );
00933
00934 ON_DECL
00935 bool
00936 ON_IsOrthonormalFrame(
00937 const ON_2dVector&,
00938 const ON_2dVector&
00939 );
00940
00941 ON_DECL
00942 bool
00943 ON_IsRightHandFrame(
00944 const ON_2dVector&,
00945 const ON_2dVector&
00946 );
00947
00949
00950
00951
00952 class PCL_EXPORTS ON_CLASS ON_3dVector
00953 {
00954 public:
00955 double x, y, z;
00956
00957 static const ON_3dVector ZeroVector;
00958 static const ON_3dVector XAxis;
00959 static const ON_3dVector YAxis;
00960 static const ON_3dVector ZAxis;
00961 static const ON_3dVector UnsetVector;
00962
00963
00964
00965
00966
00967
00968
00969
00970 static const ON_3dVector& UnitVector(
00971 int
00972 );
00973
00974
00975 ON_3dVector();
00976 ON_3dVector(double x,double y,double z);
00977 ON_3dVector(const ON_2dVector& );
00978 ON_3dVector(const ON_2dPoint& );
00979 ON_3dVector(const ON_3dPoint& );
00980 ON_3dVector(const double*);
00981
00982 ON_3dVector(const ON_2fVector& );
00983 ON_3dVector(const ON_3fVector& );
00984 ON_3dVector(const ON_2fPoint& );
00985 ON_3dVector(const ON_3fPoint& );
00986 ON_3dVector(const float*);
00987
00988
00989 operator double*();
00990 operator const double*() const;
00991
00992
00993 ON_3dVector& operator=(const ON_2dVector&);
00994 ON_3dVector& operator=(const ON_2dPoint&);
00995 ON_3dVector& operator=(const ON_3dPoint&);
00996 ON_3dVector& operator=(const double*);
00997
00998 ON_3dVector& operator=(const ON_2fVector&);
00999 ON_3dVector& operator=(const ON_3fVector&);
01000 ON_3dVector& operator=(const ON_2fPoint&);
01001 ON_3dVector& operator=(const ON_3fPoint&);
01002 ON_3dVector& operator=(const float*);
01003
01004 ON_3dVector operator-() const;
01005
01006 ON_3dVector& operator*=(double);
01007 ON_3dVector& operator/=(double);
01008 ON_3dVector& operator+=(const ON_3dVector&);
01009 ON_3dVector& operator-=(const ON_3dVector&);
01010
01011
01012 double operator*(const ON_3dVector&) const;
01013 double operator*(const ON_3dPoint&) const;
01014 double operator*(const ON_3fVector&) const;
01015
01016 ON_3dVector operator*(int) const;
01017 ON_3dVector operator/(int) const;
01018 ON_3dVector operator*(float) const;
01019 ON_3dVector operator/(float) const;
01020 ON_3dVector operator*(double) const;
01021 ON_3dVector operator/(double) const;
01022
01023 ON_3dVector operator+(const ON_3dVector&) const;
01024 ON_3dPoint operator+(const ON_3dPoint&) const;
01025 ON_3dVector operator-(const ON_3dVector&) const;
01026 ON_3dPoint operator-(const ON_3dPoint&) const;
01027 ON_3dVector operator+(const ON_2dVector&) const;
01028 ON_3dPoint operator+(const ON_2dPoint&) const;
01029 ON_3dVector operator-(const ON_2dVector&) const;
01030 ON_3dPoint operator-(const ON_2dPoint&) const;
01031
01032 ON_3dVector operator+(const ON_3fVector&) const;
01033 ON_3dPoint operator+(const ON_3fPoint&) const;
01034 ON_3dVector operator-(const ON_3fVector&) const;
01035 ON_3dPoint operator-(const ON_3fPoint&) const;
01036 ON_3dVector operator+(const ON_2fVector&) const;
01037 ON_3dPoint operator+(const ON_2fPoint&) const;
01038 ON_3dVector operator-(const ON_2fVector&) const;
01039 ON_3dPoint operator-(const ON_2fPoint&) const;
01040
01041 double operator*(const ON_4dPoint&) const;
01042 ON_3dVector operator*(const ON_Xform&) const;
01043
01044 bool operator==(const ON_3dVector&) const;
01045 bool operator!=(const ON_3dVector&) const;
01046
01047
01048 bool operator<=(const ON_3dVector&) const;
01049 bool operator>=(const ON_3dVector&) const;
01050 bool operator<(const ON_3dVector&) const;
01051 bool operator>(const ON_3dVector&) const;
01052
01053
01054 double& operator[](int);
01055 double operator[](int) const;
01056 double& operator[](unsigned int);
01057 double operator[](unsigned int) const;
01058
01059
01060
01061
01062
01063 bool IsValid() const;
01064
01065
01066
01067
01068
01069 bool IsUnsetVector() const;
01070
01071
01072 void Set(double x,double y,double z);
01073
01074 int MaximumCoordinateIndex() const;
01075 double MaximumCoordinate() const;
01076
01077 int MinimumCoordinateIndex() const;
01078 double MinimumCoordinate() const;
01079
01080 double LengthSquared() const;
01081 double Length() const;
01082
01083 bool Decompose(
01084
01085
01086
01087
01088
01089
01090 const ON_3dVector&,
01091 const ON_3dVector&,
01092 const ON_3dVector&,
01093 double*,
01094 double*,
01095 double*
01096 ) const;
01097
01098 int IsParallelTo(
01099
01100
01101
01102
01103 const ON_3dVector& other,
01104 double angle_tolerance = ON_DEFAULT_ANGLE_TOLERANCE
01105 ) const;
01106
01107 bool IsPerpendicularTo(
01108
01109
01110
01111 const ON_3dVector& other,
01112 double angle_tolerance = ON_DEFAULT_ANGLE_TOLERANCE
01113 ) const;
01114
01115 double Fuzz( double tolerance = ON_ZERO_TOLERANCE ) const;
01116
01117 void Zero();
01118 void Reverse();
01119 bool Unitize();
01120 double LengthAndUnitize();
01121
01122
01123
01124
01125
01126
01127
01128
01129
01130
01131
01132 bool IsTiny(
01133 double tiny_tol = ON_ZERO_TOLERANCE
01134 ) const;
01135
01136
01137
01138 bool IsZero() const;
01139
01140
01141
01142 bool IsUnitVector() const;
01143
01144
01145 bool PerpendicularTo(
01146
01147 const ON_3dVector&
01148 );
01149
01150
01151 bool PerpendicularTo(
01152
01153
01154
01155
01156 const ON_3dPoint&, const ON_3dPoint&, const ON_3dPoint&
01157 );
01158
01159
01160
01161 void Transform(
01162 const ON_Xform&
01163 );
01164
01165 void Rotate(
01166 double angle,
01167 const ON_3dVector& axis
01168 );
01169
01170 void Rotate(
01171 double sin_angle,
01172 double cos_angle,
01173 const ON_3dVector& axis
01174 );
01175 };
01176
01177 class PCL_EXPORTS ON_CLASS ON_3dRay
01178 {
01179 public:
01180 ON_3dRay();
01181 ~ON_3dRay();
01182
01183 ON_3dPoint m_P;
01184 ON_3dVector m_V;
01185 };
01186
01187
01188
01189
01190
01191
01192 class PCL_EXPORTS ON_CLASS ON_PlaneEquation : public ON_3dVector
01193 {
01194 public:
01195
01196
01197
01198 static const ON_PlaneEquation UnsetPlaneEquation;
01199 static const ON_PlaneEquation ZeroPlaneEquation;
01200
01201 ON_PlaneEquation();
01202
01203 ON_PlaneEquation(double xx, double yy, double zz, double dd);
01204
01205
01206
01207
01208
01209
01210
01211
01212
01213 bool IsValid() const;
01214
01215
01216
01217
01218
01219
01220 bool IsSet() const;
01221
01222
01223
01224
01225
01226
01227
01228
01229
01230
01231
01232 bool Create( ON_3dPoint P, ON_3dVector N );
01233
01234
01235
01236
01237
01238
01239
01240
01241
01242 double ValueAt(ON_3dPoint P) const;
01243 double ValueAt(ON_4dPoint P) const;
01244 double ValueAt(ON_3dVector P) const;
01245 double ValueAt(double x, double y, double z) const;
01246
01247
01248
01249
01250
01251
01252
01253
01254
01255
01256
01257
01258
01259
01260
01261
01262
01263
01264
01265
01266
01267 double* ValueAt(
01268 int Pcount,
01269 const ON_3fPoint* P,
01270 double* value,
01271 double value_range[2]
01272 ) const;
01273
01274 double* ValueAt(
01275 int Pcount,
01276 const ON_3dPoint* P,
01277 double* value,
01278 double value_range[2]
01279 ) const;
01280
01281
01282
01283
01284
01285
01286
01287
01288 double ZeroTolerance() const;
01289
01290
01291
01292
01293
01294
01295
01296
01297
01298
01299
01300
01301
01302
01303
01304
01305
01306
01307
01308
01309 bool Transform( const ON_Xform& xform );
01310
01311
01312
01313
01314
01315
01316
01317
01318
01319 ON_3dPoint ClosestPointTo( ON_3dPoint point ) const;
01320
01321
01322
01323
01324
01325
01326
01327
01328
01329
01330 double MinimumValueAt(const ON_BoundingBox& bbox) const;
01331
01332
01333
01334
01335
01336
01337
01338
01339
01340
01341 double MaximumValueAt(const ON_BoundingBox& bbox) const;
01342
01343
01344
01345
01346
01347
01348
01349
01350
01351
01352
01353
01354
01355
01356
01357
01358
01359
01360
01361
01362
01363
01364 double MaximumValueAt(
01365 bool bRational,
01366 int point_count,
01367 int point_stride,
01368 const double* points,
01369 double stop_value
01370 ) const;
01371
01372
01373
01374
01375
01376
01377
01378
01379
01380
01381
01382
01383
01384
01385
01386
01387
01388
01389
01390
01391
01392
01393 double MinimumValueAt(
01394 bool bRational,
01395 int point_count,
01396 int point_stride,
01397 const double* points,
01398 double stop_value
01399 ) const;
01400
01401
01402
01403
01404
01405
01406
01407
01408
01409
01410
01411
01412
01413
01414
01415
01416
01417
01418
01419
01420
01421
01422
01423 double MaximumAbsoluteValueAt(
01424 bool bRational,
01425 int point_count,
01426 int point_stride,
01427 const double* points,
01428 double stop_value
01429 ) const;
01430
01431
01432
01433
01434
01435
01436
01437
01438
01439
01440
01441
01442
01443
01444
01445
01446
01447
01448
01449
01450
01451
01452
01453
01454
01455 bool IsNearerThan(
01456 const class ON_BezierCurve& bezcrv,
01457 double s0,
01458 double s1,
01459 int sample_count,
01460 double endpoint_tolerance,
01461 double interior_tolerance,
01462 double* smin,
01463 double* smax
01464 ) const;
01465
01466 bool operator==(const ON_PlaneEquation&) const;
01467 bool operator!=(const ON_PlaneEquation&) const;
01468
01469 double d;
01470 };
01471
01472 ON_DECL
01473 ON_3dVector operator*(int, const ON_3dVector&);
01474
01475 ON_DECL
01476 ON_3dVector operator*(float, const ON_3dVector&);
01477
01478 ON_DECL
01479 ON_3dVector operator*(double, const ON_3dVector&);
01480
01482
01483
01484
01485
01486 ON_DECL
01487 double
01488 ON_DotProduct(
01489 const ON_3dVector&,
01490 const ON_3dVector&
01491 );
01492
01493
01494 ON_DECL
01495 ON_3dVector
01496 ON_CrossProduct(
01497 const ON_3dVector&,
01498 const ON_3dVector&
01499 );
01500
01501 ON_DECL
01502 ON_3dVector
01503 ON_CrossProduct(
01504 const double*,
01505 const double*
01506 );
01507
01508 ON_DECL
01509 double
01510 ON_TripleProduct(
01511 const ON_3dVector&,
01512 const ON_3dVector&,
01513 const ON_3dVector&
01514 );
01515
01516 ON_DECL
01517 double
01518 ON_TripleProduct(
01519 const double*,
01520 const double*,
01521 const double*
01522 );
01523
01524 ON_DECL
01525 bool
01526 ON_IsOrthogonalFrame(
01527 const ON_3dVector&,
01528 const ON_3dVector&,
01529 const ON_3dVector&
01530 );
01531
01532 ON_DECL
01533 bool
01534 ON_IsOrthonormalFrame(
01535 const ON_3dVector&,
01536 const ON_3dVector&,
01537 const ON_3dVector&
01538 );
01539
01540 ON_DECL
01541 bool
01542 ON_IsRightHandFrame(
01543 const ON_3dVector&,
01544 const ON_3dVector&,
01545 const ON_3dVector&
01546 );
01547
01549
01550
01551
01552
01553 #define ON_unset_point ON_UNSET_POINT
01554
01555
01556 extern ON_EXTERN_DECL const ON_3dPoint ON_UNSET_POINT;
01557
01558
01559 extern ON_EXTERN_DECL const ON_3dVector ON_UNSET_VECTOR;
01560
01561
01562 extern ON_EXTERN_DECL const ON_3dPoint ON_origin;
01563
01564
01565 extern ON_EXTERN_DECL const ON_3dVector ON_xaxis;
01566
01567
01568 extern ON_EXTERN_DECL const ON_3dVector ON_yaxis;
01569
01570
01571 extern ON_EXTERN_DECL const ON_3dVector ON_zaxis;
01572
01573 #include "opennurbs_fpoint.h"
01574
01576
01577
01578
01579 class PCL_EXPORTS ON_CLASS ON_SurfaceCurvature
01580 {
01581 public:
01582 double k1, k2;
01583
01584 double GaussianCurvature() const;
01585 double MeanCurvature() const;
01586 double MinimumRadius() const;
01587 double MaximumRadius() const;
01588 };
01589
01590 #endif
01591