]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGColumnVector3.h
Make yasim accept the launchbar and hook properties. They are not tied to anything...
[flightgear.git] / src / FDM / JSBSim / FGColumnVector3.h
index a83afacdd1aff1f8ac2db2ad9e5e599f408110e8..19a508b6bbd8168d5ada7b29f7e7646894b12ebb 100644 (file)
@@ -89,19 +89,14 @@ class FGColumnVector3 : public FGJSBBase
 {
 public:
   /** Default initializer.
-
-      Create a zero vector.
-   */
+      Create a zero vector.   */
   FGColumnVector3(void);
 
   /** Initialization by given values.
-
       @param X value of the x-conponent.
       @param Y value of the y-conponent.
       @param Z value of the z-conponent.
-
-      Create a vector from the doubles given in the arguments.
-   */
+      Create a vector from the doubles given in the arguments.   */
   FGColumnVector3(double X, double Y, double Z) {
     data[0] = X;
     data[1] = Y;
@@ -110,11 +105,8 @@ public:
   }
 
   /** Copy constructor.
-
       @param v Vector which is used for initialization.
-
-      Create copy of the vector given in the argument.
-   */
+      Create copy of the vector given in the argument.   */
   FGColumnVector3(const FGColumnVector3& v) {
     data[0] = v.data[0];
     data[1] = v.data[1];
@@ -122,69 +114,51 @@ public:
     Debug(0);
   }
 
-  /** Destructor.
-   */
+  /// Destructor.
   ~FGColumnVector3(void) { Debug(1); }
 
-
   /** Read access the entries of the vector.
-
       @param idx the component index.
-
       Return the value of the matrix entry at the given index.
       Indices are counted starting with 1.
-
-      Note that the index given in the argument is unchecked.
-   */
+      Note that the index given in the argument is unchecked.   */
   double operator()(unsigned int idx) const { return Entry(idx); }
 
   /** Write access the entries of the vector.
-
       @param idx the component index.
-
       Return a reference to the vector entry at the given index.
       Indices are counted starting with 1.
-
-      Note that the index given in the argument is unchecked.
-   */
+      Note that the index given in the argument is unchecked.   */
   double& operator()(unsigned int idx) { return Entry(idx); }
 
   /** Read access the entries of the vector.
-
       @param idx the component index.
-
       Return the value of the matrix entry at the given index.
       Indices are counted starting with 1.
-
       This function is just a shortcut for the @ref double
       operator()(unsigned int idx) const function. It is
       used internally to access the elements in a more convenient way.
-
-      Note that the index given in the argument is unchecked.
-   */
+      Note that the index given in the argument is unchecked.   */
   double Entry(unsigned int idx) const { return data[idx-1]; }
 
   /** Write access the entries of the vector.
-
       @param idx the component index.
-
       Return a reference to the vector entry at the given index.
       Indices are counted starting with 1.
-
       This function is just a shortcut for the @ref double&
       operator()(unsigned int idx) function. It is
       used internally to access the elements in a more convenient way.
-
-      Note that the index given in the argument is unchecked.
-   */
+      Note that the index given in the argument is unchecked.   */
   double& Entry(unsigned int idx) { return data[idx-1]; }
 
-  /** Assignment operator.
+  /** Prints the contents of the vector
+      @param delimeter the item separator (tab or comma)
+      @return a string with the delimeter-separated contents of the vector  */
+  string Dump(string delimeter) const;
 
+  /** Assignment operator.
       @param b source vector.
-
-      Copy the content of the vector given in the argument into *this.
-   */
+      Copy the content of the vector given in the argument into *this.   */
   FGColumnVector3& operator=(const FGColumnVector3& b) {
     data[0] = b.data[0];
     data[1] = b.data[1];
@@ -193,71 +167,53 @@ public:
   }
 
   /**  Comparison operator.
-
       @param b other vector.
-
-      Returns true if both vectors are exactly the same.
-   */
+      Returns true if both vectors are exactly the same.   */
   bool operator==(const FGColumnVector3& b) const {
     return data[0] == b.data[0] && data[1] == b.data[1] && data[2] == b.data[2];
   }
 
   /** Comparison operator.
-
       @param b other vector.
-
-      Returns false if both vectors are exactly the same.
-   */
+      Returns false if both vectors are exactly the same.   */
   bool operator!=(const FGColumnVector3& b) const { return ! operator==(b); }
 
   /** Multiplication by a scalar.
-
       @param scalar scalar value to multiply the vector with.
       @return The resulting vector from the multiplication with that scalar.
-
-      Multiply the vector with the scalar given in the argument.
-   */
+      Multiply the vector with the scalar given in the argument.   */
   FGColumnVector3 operator*(const double scalar) const {
     return FGColumnVector3(scalar*Entry(1), scalar*Entry(2), scalar*Entry(3));
   }
 
   /** Multiply by 1/scalar.
-
       @param scalar scalar value to devide the vector through.
       @return The resulting vector from the division through that scalar.
-
-      Multiply the vector with the 1/scalar given in the argument.
-   */
+      Multiply the vector with the 1/scalar given in the argument.   */
   FGColumnVector3 operator/(const double scalar) const;
 
   /** Cross product multiplication.
-
       @param v vector to multiply with.
       @return The resulting vector from the cross product multiplication.
-
       Compute and return the cross product of the current vector with
-      the given argument.
-   */
+      the given argument.   */
   FGColumnVector3 operator*(const FGColumnVector3& V) const {
     return FGColumnVector3( Entry(2) * V(3) - Entry(3) * V(2),
                             Entry(3) * V(1) - Entry(1) * V(3),
                             Entry(1) * V(2) - Entry(2) * V(1) );
   }
 
-  /** Addition operator.
-   */
+  /// Addition operator.
   FGColumnVector3 operator+(const FGColumnVector3& B) const {
     return FGColumnVector3( Entry(1) + B(1), Entry(2) + B(2), Entry(3) + B(3) );
   }
 
-  /** Subtraction operator.
-   */
+  /// Subtraction operator.
   FGColumnVector3 operator-(const FGColumnVector3& B) const {
     return FGColumnVector3( Entry(1) - B(1), Entry(2) - B(2), Entry(3) - B(3) );
   }
 
-  /** Subtract an other vector.
-   */
+  /// Subtract an other vector.
   FGColumnVector3& operator-=(const FGColumnVector3 &B) {
     Entry(1) -= B(1);
     Entry(2) -= B(2);
@@ -265,8 +221,7 @@ public:
     return *this;
   }
 
-  /** Add an other vector.
-   */
+  /// Add an other vector.
   FGColumnVector3& operator+=(const FGColumnVector3 &B) {
     Entry(1) += B(1);
     Entry(2) += B(2);
@@ -274,8 +229,7 @@ public:
     return *this;
   }
 
-  /** Scale by a scalar.
-   */
+  /// Scale by a scalar.
   FGColumnVector3& operator*=(const double scalar) {
     Entry(1) *= scalar;
     Entry(2) *= scalar;
@@ -283,8 +237,7 @@ public:
     return *this;
   }
 
-  /** Scale by a 1/scalar.
-   */
+  /// Scale by a 1/scalar.
   FGColumnVector3& operator/=(const double scalar);
 
   void InitMatrix(void) { data[0] = data[1] = data[2] = 0.0; }
@@ -294,25 +247,19 @@ public:
   }
 
   /** Length of the vector.
-
-      Compute and return the euclidean norm of this vector.
-   */
+      Compute and return the euclidean norm of this vector.   */
   double Magnitude(void) const;
 
   /** Length of the vector in a coordinate axis plane.
-
       Compute and return the euclidean norm of this vector projected into
-      the coordinate axis plane idx1-idx2.
-   */
+      the coordinate axis plane idx1-idx2.   */
   double Magnitude(int idx1, int idx2) const {
     return sqrt( Entry(idx1)*Entry(idx1) +  Entry(idx2)*Entry(idx2) );
   }
 
   /** Normalize.
-
       Normalize the vector to have the Magnitude() == 1.0. If the vector
-      is equal to zero it is left untouched.
-   */
+      is equal to zero it is left untouched.   */
   FGColumnVector3& Normalize(void);
 
   // ??? Is this something sensible ??
@@ -340,24 +287,18 @@ private:
 };
 
 /** Scalar multiplication.
-
     @param scalar scalar value to multiply with.
     @param A Vector to multiply.
-
-    Multiply the Vector with a scalar value.
-*/
+    Multiply the Vector with a scalar value.*/
 inline FGColumnVector3 operator*(double scalar, const FGColumnVector3& A) {
   // use already defined operation.
   return A*scalar;
 }
 
 /** Write vector to a stream.
-
     @param os Stream to write to.
     @param M Matrix to write.
-
-    Write the matrix to a stream.
-*/
+    Write the matrix to a stream.*/
 ostream& operator<<(ostream& os, const FGColumnVector3& col);
 
 } // namespace JSBSim