]> git.mxchange.org Git - simgear.git/blobdiff - simgear/math/point3d.hxx
Patch from Melchior Franz:
[simgear.git] / simgear / math / point3d.hxx
index 37c3055d1f86a7c0066b33785ea0d9307c2aa51d..3537d45cbf4f5c5a42d2eced1b706a5e184fad9e 100644 (file)
@@ -1,7 +1,13 @@
-// point3d.hxx -- a 3d point class.  
-//
-// Adapted from algebra3 by Jean-Francois Doue, started October 1998.
-//
+/**
+ * \file point3d.hxx
+ * A 3d point class (depricated).  This class is depricated and we are
+ * in the process of removing all usage of it in favor of plib's "sg"
+ * library of point, vector, and math routines.  Plib's sg lib is less
+ * object oriented, but integrates more seamlessly with opengl.
+ *
+ * Adapted from algebra3 by Jean-Francois Doue, started October 1998.
+ */
+
 // Copyright (C) 1998  Curtis L. Olson  - curt@me.umn.edu
 //
 // This library is free software; you can redistribute it and/or
@@ -73,11 +79,9 @@ Point3D operator- (const Point3D& p);                    // -p1
 bool operator== (const Point3D& a, const Point3D& b);  // p1 == p2?
 
 
-///////////////////////////
-//
-// 3D Point
-//
-///////////////////////////
+/**
+ * 3D Point class.
+ */
 
 class Point3D {
 
@@ -87,8 +91,7 @@ protected:
 
 public:
 
-    // Constructors
-
+    /** Default constructor */
     Point3D();
     Point3D(const double x, const double y, const double z);
     explicit Point3D(const double d);
@@ -105,6 +108,10 @@ public:
     void setx(const double x);
     void sety(const double y);
     void setz(const double z);
+    void setlon(const double x);
+    void setlat(const double y);
+    void setradius(const double z);
+    void setelev(const double z);
 
     // Queries 
 
@@ -237,6 +244,22 @@ inline void Point3D::setz(const double z) {
     n[PZ] = z;
 }
 
+inline void Point3D::setlon(const double x) {
+    n[PX] = x;
+}
+
+inline void Point3D::setlat(const double y) {
+    n[PY] = y;
+}
+
+inline void Point3D::setradius(const double z) {
+    n[PZ] = z;
+}
+
+inline void Point3D::setelev(const double z) {
+    n[PZ] = z;
+}
+
 // QUERIES
 
 inline double& Point3D::operator [] ( int i)