UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
u2d_wpoint.hpp
1 /* u2d_wpoint.hpp */
2 /* $Id$ */
3 #ifndef __u2d_wpoint_hpp
4 #define __u2d_wpoint_hpp
5 
6 #include <mth/u2d_point.hpp>
7 
9 class U2dWPoint : public U2dPoint
10 {
11 public:
12 
14  U2dWPoint() : U2dPoint(), m_W(0.){;}
15 
17  U2dWPoint(double x, double z) : U2dPoint(x, z), m_W(0.){;}
18 
20  U2dWPoint(double x, double z, double W) : U2dPoint(x, z), m_W(W){;}
21 
22  U2dWPoint& operator=(const U2dWPoint& p_);
23 
25  double getW() const { return m_W; }
26 
28  void setW(double W) { m_W = W; }
29 
30 protected:
31 
33  double m_W;
34 };
35 
36 inline U2dWPoint& U2dWPoint::operator=(const U2dWPoint& p_)
37 {
38  U2dPoint::operator=(U2dPoint(p_.getX(), p_.getZ()));
39  m_W = p_.getW();
40  return *this;
41 }
42 
44 typedef std::vector<U2dWPoint> U2dWPoints;
45 
46 
47 #endif /* u2d_wpoint.hpp */
double m_W
Definition: u2d_wpoint.hpp:33
double getW() const
Definition: u2d_wpoint.hpp:25
U2dPoint & operator=(const U2dPoint &p)
Definition: u2d_point.hpp:112
Definition: u2d_point.hpp:10
U2dWPoint()
Definition: u2d_wpoint.hpp:14
U2dWPoint(double x, double z, double W)
Definition: u2d_wpoint.hpp:20
double getX() const
Definition: u2d_point.hpp:120
void setW(double W)
Definition: u2d_wpoint.hpp:28
Definition: u2d_wpoint.hpp:9
double getZ() const
Definition: u2d_point.hpp:126
U2dPoint()
Definition: u2d_point.hpp:92
U2dWPoint(double x, double z)
Definition: u2d_wpoint.hpp:17