Point Cloud Library (PCL)  1.14.1-dev
opennurbs_pointgeometry.h
1 /* $NoKeywords: $ */
2 /*
3 //
4 // Copyright (c) 1993-2012 Robert McNeel & Associates. All rights reserved.
5 // OpenNURBS, Rhinoceros, and Rhino3D are registered trademarks of Robert
6 // McNeel & Associates.
7 //
8 // THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
9 // ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF
10 // MERCHANTABILITY ARE HEREBY DISCLAIMED.
11 //
12 // For complete openNURBS copyright information see <http://www.opennurbs.org>.
13 //
14 ////////////////////////////////////////////////////////////////
15 */
16 
17 #if !defined(OPENNURBS_POINT_GEOMETRY_INC_)
18 #define OPENNURBS_POINT_GEOMETRY_INC_
19 
20 // NOTE: ON_3dPoint is much more efficient than ON_Point.
21 // Use ON_Point when you need a polymorphic 3d point
22 // that is derived from ON_Geometry or ON_Object.
23 
24 class ON_CLASS ON_Point : public ON_Geometry
25 {
26 public:
28 
30  ON_Point(const ON_Point&);
32  ON_Point(double,double,double);
36 
37  operator double*();
38  operator const double*() const;
39  operator ON_3dPoint*();
40  operator const ON_3dPoint*() const;
41  operator ON_3dPoint&();
42  operator const ON_3dPoint&() const;
43 
44  /////////////////////////////////////////////////////////////////
45  //
46  // ON_Object overrides
47  //
48 
49  /*
50  Description:
51  Tests an object to see if its data members are correctly
52  initialized.
53  Parameters:
54  text_log - [in] if the object is not valid and text_log
55  is not NULL, then a brief englis description of the
56  reason the object is not valid is appened to the log.
57  The information appended to text_log is suitable for
58  low-level debugging purposes by programmers and is
59  not intended to be useful as a high level user
60  interface tool.
61  Returns:
62  @untitled table
63  true object is valid
64  false object is invalid, uninitialized, etc.
65  Remarks:
66  Overrides virtual ON_Object::IsValid
67  */
68  ON_BOOL32 IsValid( ON_TextLog* text_log = NULL ) const;
69 
70  void Dump( ON_TextLog& ) const; // for debugging
71 
72  ON_BOOL32 Write(
73  ON_BinaryArchive& // serialize definition to binary archive
74  ) const;
75 
76  ON_BOOL32 Read(
77  ON_BinaryArchive& // restore definition from binary archive
78  );
79 
80  ON::object_type ObjectType() const;
81 
82  /////////////////////////////////////////////////////////////////
83  //
84  // ON_Geometry overrides
85  //
86 
87  int Dimension() const;
88 
89  ON_BOOL32 GetBBox( // returns true if successful
90  double*, // boxmin[dim]
91  double*, // boxmax[dim]
92  ON_BOOL32 = false // true means grow box
93  ) const;
94 
95  ON_BOOL32 Transform(
96  const ON_Xform&
97  );
98 
99  // virtual ON_Geometry::IsDeformable() override
100  bool IsDeformable() const;
101 
102  // virtual ON_Geometry::MakeDeformable() override
104 
105  ON_BOOL32 SwapCoordinates(
106  int, int // indices of coords to swap
107  );
108 
109 private:
110  ON_OBJECT_DECLARE(ON_Point);
111 };
112 
113 #endif
ON_Point(double, double, double)
void Dump(ON_TextLog &) const
ON_BOOL32 Transform(const ON_Xform &)
ON_Point & operator=(const ON_3dPoint &)
ON_Point(const ON_3dPoint &)
bool IsDeformable() const
ON_Point & operator=(const ON_Point &)
ON_BOOL32 IsValid(ON_TextLog *text_log=NULL) const
ON_BOOL32 Read(ON_BinaryArchive &)
ON_Point(const ON_Point &)
ON_BOOL32 GetBBox(double *, double *, ON_BOOL32=false) const
ON_BOOL32 SwapCoordinates(int, int)
ON::object_type ObjectType() const
int Dimension() const
ON_BOOL32 Write(ON_BinaryArchive &) const
bool MakeDeformable()