BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
tube.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 // $Id: tube.h,v 1.11.16.1 2007-03-25 21:26:12 oliver Exp $
5 //
6 
7 #ifndef BALL_VIEW_PRIMITIV_TUBE_H
8 #define BALL_VIEW_PRIMITIV_TUBE_H
9 
10 #ifndef BALL_VIEW_KERNEL_GEOMETRICOBJECT_H
12 #endif
13 
14 #ifndef BALL_VIEW_DATATYPE_VERTEX2_H
16 #endif
17 
18 namespace BALL
19 {
20  namespace VIEW
21  {
22 
38  : public GeometricObject,
39  public Vertex2
40  {
41  public:
42 
44 
45 
48 
62  Tube();
63 
69  Tube(const Tube& tube);
70 
72 
74 
78  virtual ~Tube();
79 
88  virtual void clear();
89 
91 
94 
99  void set(const Tube& tube);
100 
104  const Tube& operator = (const Tube& tube);
105 
110  void swap(Tube& tube);
111 
113 
115 
120  float getLength() const
121  {return (getVertex1() - getVertex2()).getLength();}
122 
127  float getSquareLength() const
128  {return (getVertex1() - getVertex2()).getSquareLength();}
129 
131 
133 
146  virtual bool isValid() const;
147 
160  virtual void dump(std::ostream& s = std::cout, Size depth = 0) const;
161 
162  // Method to get all vertices from a geometric object
163  virtual void getVertices(vector<Vector3>& vertices) const;
164 
166 
168 
171  float getRadius() const
172  { return radius_;}
173 
176  void setRadius(float radius)
177  { radius_ = radius;}
178 
180 
181  private:
182 
183  float radius_;
184  };
185 
186  } // namespace VIEW
187 
188 } // namespace BALL
189 
190 #endif // BALL_VIEW_PRIMITIV_TUBE_H
void setRadius(float radius)
Definition: tube.h:176
#define BALL_CREATE(name)
Definition: create.h:62
float getLength() const
Definition: tube.h:120
#define BALL_VIEW_EXPORT
Definition: COMMON/global.h:52
float getRadius() const
Definition: tube.h:171
float getSquareLength() const
Definition: tube.h:127