QCAD
Open Source 2D CAD
Loading...
Searching...
No Matches
opennurbs_pointgeometry.h
Go to the documentation of this file.
1/* $NoKeywords: $ */
2/*
3//
4// Copyright (c) 1993-2007 Robert McNeel & Associates. All rights reserved.
5// Rhinoceros is a registered trademark of Robert McNeel & Assoicates.
6//
7// THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
8// ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF
9// MERCHANTABILITY ARE HEREBY DISCLAIMED.
10//
11// For complete openNURBS copyright information see <http://www.opennurbs.org>.
12//
14*/
15
16#if !defined(OPENNURBS_POINT_GEOMETRY_INC_)
17#define OPENNURBS_POINT_GEOMETRY_INC_
18
19// NOTE: ON_3dPoint is much more efficient than ON_Point.
20// Use ON_Point when you need a polymorphic 3d point
21// that is derived from ON_Geometry or ON_Object.
22
24{
25public:
27
28 ON_Point();
29 ON_Point(const ON_Point&);
30 ON_Point(const ON_3dPoint&);
31 ON_Point(double,double,double);
32 ~ON_Point();
35
36 operator double*();
37 operator const double*() const;
38 operator ON_3dPoint*();
39 operator const ON_3dPoint*() const;
40 operator ON_3dPoint&();
41 operator const ON_3dPoint&() const;
42
44 //
45 // ON_Object overrides
46 //
47
48 /*
49 Description:
50 Tests an object to see if its data members are correctly
51 initialized.
52 Parameters:
53 text_log - [in] if the object is not valid and text_log
54 is not NULL, then a brief englis description of the
55 reason the object is not valid is appened to the log.
56 The information appended to text_log is suitable for
57 low-level debugging purposes by programmers and is
58 not intended to be useful as a high level user
59 interface tool.
60 Returns:
61 @untitled table
62 true object is valid
63 false object is invalid, uninitialized, etc.
64 Remarks:
65 Overrides virtual ON_Object::IsValid
66 */
67 ON_BOOL32 IsValid( ON_TextLog* text_log = NULL ) const;
68
69 void Dump( ON_TextLog& ) const; // for debugging
70
72 ON_BinaryArchive& // serialize definition to binary archive
73 ) const;
74
76 ON_BinaryArchive& // restore definition from binary archive
77 );
78
79 ON::object_type ObjectType() const;
80
82 //
83 // ON_Geometry overrides
84 //
85
86 int Dimension() const;
87
88 ON_BOOL32 GetBBox( // returns true if successful
89 double*, // boxmin[dim]
90 double*, // boxmax[dim]
91 ON_BOOL32 = false // true means grow box
92 ) const;
93
95 const ON_Xform&
96 );
97
98 // virtual ON_Geometry::IsDeformable() override
99 bool IsDeformable() const;
100
101 // virtual ON_Geometry::MakeDeformable() override
102 bool MakeDeformable();
103
105 int, int // indices of coords to swap
106 );
107
108 // virtual ON_Geometry override
109 bool Morph( const ON_SpaceMorph& morph );
110
111 // virtual ON_Geometry override
112 bool IsMorphable() const;
113
114private:
116};
117
118#endif
@ Transform
Definition RSMetaType.h:67
Definition opennurbs_point.h:403
Definition opennurbs_archive.h:152
Definition opennurbs_geometry.h:36
virtual bool IsDeformable() const
Definition opennurbs_geometry.cpp:205
virtual ON_BOOL32 GetBBox(double *boxmin, double *boxmax, int bGrowBox=false) const =0
virtual ON_BOOL32 SwapCoordinates(int i, int j)
Definition opennurbs_geometry.cpp:135
virtual bool MakeDeformable()
Definition opennurbs_geometry.cpp:210
ON_Geometry & operator=(const ON_Geometry &)
Definition opennurbs_geometry.cpp:26
virtual bool Morph(const ON_SpaceMorph &morph)
Definition opennurbs_geometry.cpp:254
virtual int Dimension() const =0
virtual bool IsMorphable() const
Definition opennurbs_geometry.cpp:259
virtual void Dump(ON_TextLog &) const
Definition opennurbs_object.cpp:1695
virtual ON_BOOL32 IsValid(ON_TextLog *text_log=NULL) const =0
virtual ON_BOOL32 Read(ON_BinaryArchive &binary_archive)
Definition opennurbs_object.cpp:1734
virtual ON_BOOL32 Write(ON_BinaryArchive &binary_archive) const
Definition opennurbs_object.cpp:1714
virtual ON::object_type ObjectType() const
Definition opennurbs_object.cpp:1616
Definition opennurbs_pointgeometry.h:24
ON_OBJECT_DECLARE(ON_Point)
ON_3dPoint point
Definition opennurbs_pointgeometry.h:26
Definition opennurbs_xform.h:1146
Definition opennurbs_textlog.h:20
Definition opennurbs_xform.h:28
#define ON_CLASS
Definition opennurbs_defines.h:91
#define NULL
Definition opennurbs_system.h:256
int ON_BOOL32
Definition opennurbs_system.h:362