BALL
1.4.1
|
00001 // -*- Mode: C++; tab-width: 2; -*- 00002 // vi: set ts=2: 00003 // 00004 // $Id: twoColoredLine.h,v 1.10.16.1 2007-03-25 21:26:12 oliver Exp $ 00005 // 00006 00007 #ifndef BALL_VIEW_VIEW_PRIMITIVES_TWOCOLOREDLINE_H 00008 #define BALL_VIEW_VIEW_PRIMITIVES_TWOCOLOREDLINE_H 00009 00010 #ifndef BALL_VIEW_DATATYPE_COLOREXTENSIONS_H 00011 # include <BALL/VIEW/DATATYPE/colorExtensions.h> 00012 #endif 00013 00014 #ifndef BALL_VIEW_KERNEL_GEOMETRICOBJECT_H 00015 # include <BALL/VIEW/KERNEL/geometricObject.h> 00016 #endif 00017 00018 #ifndef BALL_VIEW_DATATPYE_VERTEX2_H 00019 # include <BALL/VIEW/DATATYPE/vertex2.h> 00020 #endif 00021 00022 namespace BALL 00023 { 00024 namespace VIEW 00025 { 00045 class BALL_VIEW_EXPORT TwoColoredLine 00046 : public GeometricObject, 00047 public ColorExtension2, 00048 public Vertex2 00049 { 00050 public: 00051 00052 BALL_CREATE(TwoColoredLine) 00053 00054 00056 00070 TwoColoredLine(); 00071 00077 TwoColoredLine(const TwoColoredLine& two_colored_line); 00078 00080 00082 00086 virtual ~TwoColoredLine(); 00087 00096 virtual void clear(); 00097 00099 00101 00110 void set(const TwoColoredLine& two_colored_line); 00111 00115 const TwoColoredLine& operator = (const TwoColoredLine& two_colored_line); 00116 00119 void swap(TwoColoredLine& two_colored_line); 00120 00122 00124 00131 Vector3 getMiddleVertex() const; 00132 00134 00136 00147 virtual bool isValid() const; 00148 00161 virtual void dump(std::ostream& s = std::cout, Size depth = 0) const; 00162 00163 // Method to get all vertices from a geometric object 00164 virtual void getVertices(vector<Vector3>& vertices) const; 00165 00167 }; 00168 00169 #ifndef BALL_NO_INLINE_FUNCTIONS 00170 # include <BALL/VIEW/PRIMITIVES/twoColoredLine.iC> 00171 #endif 00172 00173 } // namespace VIEW 00174 } // namespace BALL 00175 00176 #endif // BALL_VIEW_VIEW_PRIMITIVES_TWOCOLOREDLINE_H