Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00015
00016
00017 #if !defined(ON_SPHERE_INC_)
00018 #define ON_SPHERE_INC_
00019
00020 class ON_RevSurface;
00021
00022 class ON_CLASS ON_Sphere
00023 {
00024 public:
00025
00026 ON_Plane plane;
00027 double radius;
00028
00029 ON_Sphere();
00030 ON_Sphere( const ON_3dPoint& center, double radius );
00031 ~ON_Sphere();
00032
00033 bool IsValid() const;
00034
00035 bool Create( const ON_3dPoint& center, double radius);
00036
00037 ON_Circle LatitudeRadians(double latitude_radians ) const;
00038 ON_Circle LatitudeDegrees(double latitude_degrees) const;
00039 ON_Circle LongitudeRadians(double longitude_radians) const;
00040 ON_Circle LongitudeDegrees(double longitude_degrees) const;
00041
00042 ON_3dPoint Center() const;
00043 ON_3dPoint NorthPole() const;
00044 ON_3dPoint SouthPole() const;
00045 double Diameter() const;
00046 double Radius() const;
00047
00048 ON_3dPoint PointAt(
00049 double longitude_radians,
00050 double latitude_radians
00051 ) const;
00052
00053 ON_3dVector NormalAt(
00054 double longitude_radians,
00055 double latitude_radians
00056 ) const;
00057
00058 ON_BoundingBox BoundingBox() const;
00059
00060
00061 bool ClosestPointTo(
00062 ON_3dPoint test_point,
00063 double* longitude_radians,
00064 double* latitude_radians
00065 ) const;
00066
00067
00068 ON_3dPoint ClosestPointTo(
00069 ON_3dPoint test_point
00070 ) const;
00071
00072
00073
00074
00075 bool Rotate(
00076 double sin_angle,
00077 double cos_angle,
00078 const ON_3dVector& axis_of_rotation
00079 );
00080
00081 bool Rotate(
00082 double angle_radians,
00083 const ON_3dVector& axis_of_rotation
00084 );
00085
00086
00087 bool Rotate(
00088 double sin_angle,
00089 double cos_angle,
00090 const ON_3dVector& axis_of_rotation,
00091 const ON_3dPoint& center_of_rotation
00092 );
00093
00094 bool Rotate(
00095 double angle_radians,
00096 const ON_3dVector& axis_of_rotation,
00097 const ON_3dPoint& center_of_rotation
00098 );
00099
00100 bool Translate(
00101 const ON_3dVector&
00102 );
00103
00104 bool Transform( const ON_Xform& );
00105
00106
00107 int GetNurbForm( ON_NurbsSurface& ) const;
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123 ON_RevSurface* RevSurfaceForm( bool bArcLengthParameterization, ON_RevSurface* srf = NULL ) const;
00124 ON_DEPRECATED ON_RevSurface* RevSurfaceForm( ON_RevSurface* srf = NULL ) const;
00125 };
00126
00127 #endif