Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-06-02 08:48:23

0001 #ifndef VECTOR_3D_H
0002 #define VECTOR_3D_H
0003 
0004 /**
0005  * @file Vector3D.h
0006  * @author Bryan BERTHOU (SPhN / CEA Saclay)
0007  * @date 26 November 2014
0008  * @version 1.0
0009  */
0010 
0011 #include <string>
0012 
0013 #include "Vector2D.h"
0014 
0015 namespace NumA {
0016 
0017 //TODO mathematique function add, sub, ...
0018 
0019 /**
0020  * @class Vector3D
0021  *
0022  * Object representing a three-dimensional vector.
0023  */
0024 class Vector3D: public Vector2D {
0025 public:
0026     /**
0027      * Default constructor.
0028      */
0029     Vector3D();
0030     /**
0031      * Constructor.
0032      * @param x x-coordinate.
0033      * @param y y-coordinate.
0034      * @param z z-coordinate.
0035      */
0036     Vector3D(double x, double y, double z);
0037     /**
0038      * Default destructor.
0039      */
0040     ~Vector3D();
0041 
0042     // Scalar operation
0043     /**
0044      * Scalar product.
0045      * @param rhs Vector3D.
0046      * @return double
0047      */
0048     double operator*(const Vector3D &rhs) const;
0049 
0050     // ##### GETTERS & SETTERS #####
0051 
0052     /**
0053      *
0054      * @return z-coordinate.
0055      */
0056     double getZ() const;
0057     /**
0058      *
0059      * @param z z-coordinate.
0060      */
0061     void setZ(double z);
0062 
0063     /**
0064      * Return a formatted characters string to display vector's values.
0065      *
0066      * @return std::string
0067      */
0068     std::string toString() const;
0069 
0070 private:
0071     double m_z; ///< z-coordinate.
0072 };
0073 
0074 } /* namespace NumA */
0075 
0076 #endif /* VECTOR_3D_H */